Fedora

Install NVIDIA Drivers on Fedora 35

If you have an NVIDIA GPU installed on your computer, installing the NVIDIA GPU driver is the first thing you would want to do after installing Fedora 35 on your computer.

In this article, I am going to show you how to install NVIDIA Drivers on Fedora 35. I will also show you how to install NVIDIA CUDA Drivers on Fedora 35. So, let’s get started.

Table of Contents:

Checking Installed GPUs and Used Drivers:

You can check whether your computer has an NVIDIA GPU installed or not with the following command:

$ lspci | egrep 'VGA


As you can see, I have an NVIDIA GeForce GTX 1050 Ti GPU installed on my computer.


By default, Fedora 35 will use the open-source Nouveau drivers if you have an NVIDIA GPU installed on your computer, as you can see in the screenshot below.

$ lsmod | grep nouveau


As you can see, NVIDIA drivers are not used by default on Fedora 35.

$ lsmod | grep nvidia

Updating the System:

Before installing NVIDIA drivers on Fedora 35, I strongly recommend you to upgrade the existing packages of your Fedora 35 operating system. Otherwise, you may have issues getting NVIDIA drivers to work on Fedora 35.

First, update the DNF package repository cache with the following command:

$ sudo dnf makecache

To upgrade all the installed packages of your Fedora 35 to their latest version, run the following command:

$ sudo dnf update


If there are any updates to be installed, the DNF package manager should show you a summary of the upgrade, as shown in the screenshot below. Otherwise, it will tell you that your system is up to date.

If you do have updates to install, press Y and then press <Enter> to install the updates.


The DNF package manager will download all the required updates from the internet. It may take a while to complete.


Updates are being installed. It may take a while to complete.


At this point, all the updates should be installed.


For the changes to take effect, reboot your computer with the following command:

$ sudo reboot

Installing RPM Fusion Repositories:

NVIDIA drivers packages are available in the RPM Fusion package repository. So, to install NVIDIA drivers on Fedora 35, you will have to install the RPM Fusion package repository on your computer.

To install the RPM Fusion Free repository, run the following command:

$ sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm


To confirm the installation, press Y and then press <Enter>.


RPM Fusion Free repository should be installed.


To install the RPM Fusion Non-Free repository, run the following command:

$ sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm


To confirm the installation, press Y and then press <Enter>.


RPM Fusion Non-Free repository should be installed.


Once the RPM Fusion repositories are installed, run the following command to update the DNF package repository cache:

$ sudo dnf makecache

Installing NVIDIA Drivers:

Once you’ve performed a system upgrade and installed the RPM Fusion package repositories, you can install NVIDIA drivers from the RPM Fusion repository with the following command:

$ sudo dnf install akmod-nvidia


To confirm the installation, press Y and then press <Enter>.


The DNF package manager will download all the required packages from the internet. It may take a while to complete.


The NVIDIA drivers packages and all the required dependency packages are being installed. It may take a while to complete.


At this point, NVIDIA drivers should be installed.


For the changes to take effect, reboot your computer with the following command:

$ sudo reboot

Once your computer boots, you should find the NVIDIA X Server Settings app in the Application Menu of Fedora 35. Click on the NVIDIA X Server Settings app icon as marked in the screenshot below.


If the NVIDIA drivers are installed correctly, the NVIDIA X Server Settings app should run without errors and show you information related to your NVIDIA GPU, as you can see in the screenshot below.


The proprietary NVIDIA drivers are used, as you can see in the screenshot below.

$ lsmod | grep nvidia


The open-source Nouveau drivers are no longer used.

$ lsmod | grep nouveau

Installing NVIDIA CUDA Libraries:

If you’re a software developer and you need the NVIDIA CUDA libraries, you can install them from the RPM Fusion package repository with the following command:

$ sudo dnf install xorg-x11-drv-nvidia-cuda


To confirm the installation, press Y and then press <Enter>.


The DNF package manager will download and install all the required packages. It may take a while to complete.


At this point, NVIDIA CUDA libraries should be installed.


For the changes to take effect, reboot your computer with the following command:

$ sudo reboot

Conclusion:

This article shows you how to install NVIDIA GPU drivers and NVIDIA CUDA libraries on Fedora 35. I have used an NVIDIA GTX 1050Ti GPU for the demonstration. But, the procedures shown in this article should work for any NVIDIA GPU.

References:

[1] Howto/NVIDIA – RPM Fusion

About the author

Shahriar Shovon

Freelancer & Linux System Administrator. Also loves Web API development with Node.js and JavaScript. I was born in Bangladesh. I am currently studying Electronics and Communication Engineering at Khulna University of Engineering & Technology (KUET), one of the demanding public engineering universities of Bangladesh.