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

How to Install and Configure KDE on CentOS 7

In the CentOS 7 installer, when you choose Server with GUI, GNOME desktop environment is installed by default. But you...
29/12/2020

How to Install SQLite Browser 3.9.1 on Ubuntu

SQLite Browser is a GUI tool used for creating, designing as well as editing SQL database files compatible with SQLite....
12/02/2020

Google DNS Tutorial

On 3 December 2009, Google announced its free alternative Domain Name System (DNS) service, Google Public DNS, which can...
28/12/2020
Bài Viết

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

Dịch Vụ Xây Dựng Hệ Thống Peering Với Internet Exchange (IXP)
04/04/2025

Dịch Vụ Triển Khai VPN Site-to-Site & Remote Access
04/04/2025

Dịch Vụ Thiết Lập Hệ Thống Tường Lửa (Firewall)
04/04/2025

Dịch Vụ Triển Khai Hệ Thống Ảo Hóa & Cloud
04/04/2025

Dịch Vụ Triển Khai Hệ Thống Ceph
04/04/2025