Install Nvidia Drivers on CentOS

28/12/2020
Chưa phân loại

Install Nvidia Optimus Graphics Drivers on CentOS 7

In this article, I will show you how to set up new Nvidia Optimus supported graphics card in hybrid graphics configuration on CentOS 7. All the new laptops/notebooks these days use these type of configuration. So it’s very common these days. I used ASUS UX303UB with 2GB Nvidia GeForce 940M and Intel HD Graphics 520 to test everything of this article. Let’s get started.

This article is only for Nvidia Optimus supported graphics card or hybrid graphics configuration. You can check whether your Nvidia graphics card supports Optimus technology or not with the following command:

“lspci | grep ‘NVIDIA|VGA’”

If you have 2 graphics card listed, as it is in the screen shot, you can follow this article and expect everything to work.

Note: Before proceeding with the installation, turn off Secure Boot from BIOS settings.

First, we have to add some package repositories to our CentOS 7 operating system. Run the following commands to add the package repositories:

Add elrepo repository:

  sudo rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org  sudo rpm -Uvh http://www.elrepo.org/elrepo-release-7.0.3.el7.elrepo.noarch.rpm  

Add epel repository:

sudo yum install epel-release

Add bumblebee repository:

sudo yum -y --nogpgcheck install   http://install.linux.ncsu.edu/pub/yum/itecs/public/bumblebee/rhel7/noarch/bumblebee-release-1.2-1.noarch.rpm  

sudo yum -y --nogpgcheck install   http://install.linux.ncsu.edu/pub/yum/itecs/public/bumblebee-nonfree/rhel7/noarch/bumblebee-nonfree-release-1.2-1.noarch.rpm

 

Now we have to update the kernel of CentOS 7. Otherwise it will not work.

sudo yum --enablerepo=elrepo-kernel install kernel-ml

Install new kernel development package with the following command:

sudo yum --enablerepo=elrepo-kernel install kernel-ml-devel

As you see, I’ve already done that and restarted my computer. From the ‘uname -r’ command, you can see that my kernel version is now ‘4.13.11’. You should restart your computer after installing a new kernel and kernel-ml-devel package.

Now we are ready to install bumblebee Nvidia Optimus drivers. To install bumblebee, run the following command:

sudo yum install bumblebee-nvidia bbswitch-dkms primus kernel-devel

Or the following command, if you want 32-bit compatibility:

sudo yum install bumblebee-nvidia bbswitch-dkms VirtualGL.x86_64 VirtualGL.i686 primus.x86_64 primus.i686 kernel-devel

I will go with the first command.

Once you run the command, press ‘y’ and then press <Enter> to confirm the installation.

 

Your installation should start. It may take several minutes to finish.

Once installed, run the following command to add your user to the bumblebee group.

sudo usermod -aG bumblebee YOUR_USERNAME

Now restart your computer. Once your computer restarts, you should be able to run “Nvidia Settings” control panel. It verifies that everything is working correctly.

 

You can check if everything is working correctly from the command line as well. Run the following command to check if Nvidia driver and bumblebee is working:

bumblebee-nvidia --check

From the following output, you can see that everything is working correctly.

If you have any problem, you should try running the following command:

sudo bumblebee-nvidia --debug --force

If you want to uninstall Nvidia Optimus drivers by Bumblebee, run the following command:

sudo yum remove bumblebee-nvidia bbswitch-dkms primus kernel-devel

Press ‘y’ and press . Bumblebee Nvidia Optimus drivers should be removed.

 

 

You can also remove the updated kernel with the following commands:

sudo yum remove kernel-ml kernel-ml-dev

Although, removing the kernel is not required. You can use them if you want.
So that’s how you install and uninstall the new Nvidia Optimus drivers on CentOS 7. Thanks for reading this article.

ONET IDC thành lập vào năm 2012, là công ty chuyên nghiệp tại Việt Nam trong lĩnh vực cung cấp dịch vụ Hosting, VPS, máy chủ vật lý, dịch vụ Firewall Anti DDoS, SSL… Với 10 năm xây dựng và phát triển, ứng dụng nhiều công nghệ hiện đại, ONET IDC đã giúp hàng ngàn khách hàng tin tưởng lựa chọn, mang lại sự ổn định tuyệt đối cho website của khách hàng để thúc đẩy việc kinh doanh đạt được hiệu quả và thành công.
Bài viết liên quan

Vì sao cần thuê proxy xoay? Địa chỉ cung cấp proxy xoay uy tín

Nhu cầu sử dụng proxy ngày càng tăng cao bởi những lợi ích tuyệt vời mà nó đem lại. Một trong...
05/10/2023

5 Open Source Big Data Platforms

This article will give you a glimpse of five popular open source tools that can be used for creating a platform of data...
29/12/2020

Increase VirtualBox Disk Size

Virtual machines are some of the most important tools in an IT professional’s tool-kit. You can test unknown software,...
28/12/2020
Bài Viết

Bài Viết Mới Cập Nhật

Mua Proxy V6 Nuôi Facebook Spam Hiệu Quả Tại Onetcomvn
03/06/2024

Hướng dẫn cách sử dụng ProxyDroid để duyệt web ẩn danh
03/06/2024

Mua proxy Onet uy tín tại Onet.com.vn
03/06/2024

Thuê mua IPv4 giá rẻ, tốc độ nhanh, uy tín #1
28/05/2024

Thuê địa chỉ IPv4 IPv6 trọn gói ở đâu chất lượng, giá RẺ nhất?
27/05/2024