Install Nvidia Drivers on Fedora

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

Install Nvidia Optimus Graphics Drivers on Fedora 26

In this article, I will show you how to install Nvidia drivers on Fedora 26. Let’s get started. I am using Fedora 26 KDE Desktop. For other Fedora 26 desktops, the process is similar.

By default, the latest version of Fedora, which is Fedora 26 as of this writing, uses open source nouveau Nvidia drivers. In this article, I will show you how to install the proprietary Nvidia drivers on Fedora. I am using Nvidia GeForce 940M Graphics card on my laptop ASUS Zenbook UX303UB. It supports Nvidia Optimus technology. So I am able to run it alongside my Intel HD Graphics in a hybrid graphics configuration. All the new Nvidia cards should have this feature.

NOTE: Before you proceed with the driver installation, turn of secure boot from BIOS.

Let’s first check if our NVIDIA graphics card is detected by the operating system. To do that, run the following commands:

lspci | grep 'VGA|NVIDIA'

You can see that, Fedora 26 detected the Intel HD Graphics 520 and Nvidia GeForce 940M Graphics of my laptop. If you see 2 graphics cards like this, it means your Nvidia graphics card supports Optimus and you can follow this tutorial and expect everything to work. Otherwise, it may be that your graphics card is too new or Optimus is not supported.

You can check that nouveau driver is in use with the following command:

“lsmod | grep ”nouveau’”

You can see that nouveau driver is active.

Now I am going to install the Nvidia proprietary graphics using bumblebee. If you want to know, bumblebee manages hybrid Nvidia graphics very well in Linux. It is sufficient for almost all the latest Nvidia graphics based laptops/notebooks.

To install bumblebee, first we have to add the repository of bumblebee in Fedora 26.

To do that, run the following commands:

sudo dnf -y --nogpgcheck install  http://install.linux.ncsu.edu/pub/yum/itecs/public/bumblebee/fedora$(rpm -E %fedora)/noarch/bumblebee-release-1.2-1.noarch.rpm

sudo dnf -y --nogpgcheck install  http://install.linux.ncsu.edu/pub/yum/itecs/public/bumblebee-nonfree/fedora$(rpm -E %fedora)/noarch/bumblebee-nonfree-release-1.2-1.noarch.rpm

Before installing bumblebee, don’t forget to update your kernel. I had problems with not upgrading it in the first place. To update the kernel, run the following command:

sudo dnf update kernel kernel-core kernel-modules kernel-modules-extra

After you run this, restart your computer. You can check your current kernel version with the following command:

uanme -r

Now we can install bumblebee. To install bumblebee, run the following command and press <Enter>:

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

If this command doesn’t work for you, then try the following command:

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

You should see the following on the terminal. Press ‘y’ and press <Enter> to continue:

The installation should begin. It may ask you to verify the key, if in case it does, just type in ‘y’ and press <Enter> to continue.

Now add your user to the bumblebee group with the following command:

usermod -a -G bumblebee YOUR_USERNAME

Sometimes your installation will not work if you don’t pass ‘pcie_port_pm=off’ kernel parameter to your operating system. Doing this is really easy, just open /etc/default/grub file with the following command:

sudo nano /etc/default/grub

Add the highlighted section to GRUB_CMDLINE_LINE and save the file. Then update grub with the following command:

sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg


Once these steps are complete, restart your computer.

Now you can verify bumblebee installation with the following command:

sudo bumblebee-nvidia --check



You can also check that Nvidia driver is working from Nvidia Settings.

You can see from the following figure that its working correctly.

To uninstall Nvidia drivers, run the following command:

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

Press ‘y’ and then press <Enter> to continue.

Then run the following command to remove the rest of the dependencies of bumblebee:

sudo dnf autoremove

Now restart your computer, Nvidia driver should be removed and nouveau drivers will start to function again.

You can see that nouveau drivers are used again.

That’s how you install and uninstall Nvidia drivers on Fedora 26. 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

Best Self-Hosted IRC Clients

While IRC (Internet Relay Chat) may not feel as fresh today as it did during its golden era, which spans from the 1990s...
28/12/2020

[linux_basic] Quản trị Users and Groups

Trong bài viết này, mình sẽ giúp các bạn hiểu rõ hơn về cấu trúc user và group trong hệ điều hành...
30/12/2020

Jinja 2 Templates

JInja2 is a widely-used and fully featured template engine for Python. Being modern it is hence also design-friendly language...
29/12/2020
Bài Viết

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

Reliable IPv4 and IPv6 Subnet Rental Services: The Perfect Solution for Global Businesses
23/12/2024

Tìm Hiểu Về Thuê Proxy US – Lợi Ích và Cách Sử Dụng Hiệu Quả
11/12/2024

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