How to Install Nvidia Drivers on Fedora Linux 34/35

nvidia and fedora logos on a green gradient background

Fedora comes with an open-source NVIDIA driver. The driver installed is Nouveau, an open-source graphics driver for NVIDIA video cards.

However, Nouveau drivers are considered slower than Nvidia’s proprietary drivers. This won’t matter much if you only use your device for light use, but if you are into design or gaming, you’ll surely start to feel it – in this case it would be a good choice to install the latest NVIDIA drivers.

In this tutorial we’ll be installing the latest NVIDIA drivers on Fedora 34/35 using the RPM Fusion repositories and also through the manual method of downloading the driver from the Nvidia website.

Install the Latest NVIDIA Drivers on Fedora Using the RPM Fusion Repositories

To install the latest NVIDIA drivers on Fedora Linux 34/35, follow the steps given below carefully.

Step 1: Update Fedora

It’s not necessary, but a good idea to make sure all your existing packages are up to date to prevent problems that may later arise during the installation.

To update Fedora, execute the following command in the terminal:

sudo dnf upgrade --refresh -y

Step 2: Determine Your Graphics Card

There are different driver series available for NVIDIA. One hardware support is incapable of handling all of them. So, we need to determine which driver we need to install. Drivers are graphics card model specific. So, to determine which driver we need to install, we need to know which graphics card we have.

Execute the command below to identify the model of your graphics card:

lshw -class display

Consider the following output.

*-display                 
       description: 3D controller
       product: GP107M [GeForce GTX 1050 Ti Mobile]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: bus_master cap_list rom
       configuration: driver=nvidia latency=0
       resources: irq:16 memory:a3000000-a3ffffff memory:90000000-9fffffff memory:a0000000-a1ffffff ioport:5000(size=128)

After finding out your graphics card, check the supported NVIDIA GPU products on the Nvidia website:

Now you have two options to install the NVIDIA drivers. One is the manual method, where you must go to NVIDIA’s downloads page and download the latest version of your required driver. This method is discussed later in this article.

For now, we shall add the RPM Fusion repositories to Fedora.

Step 3: Add the RPM Fusion Repositories to Fedora.

The packages that aren’t already available on your Fedora or Red Hat Linux can be acquired through the RPM Fusion repository. The packages in the RPM Fusion repositories are ready for installation.

Run the following command to install the RPM Fusion repository in your Fedora 34/35 :

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

Then, accept the installation process to enable the RPM Fusion repository on your system.

Step 4: Install the NVIDIA GPU Graphics Driver on Your Fedora

First, checking whether the RPM Fusion repository installation was successful makes sense. The best indicator would be finding the akmod-nvidia on search.

sudo dnf search akmod-nvidia

Once the added repositories are functional, you can move on to the installation process.

To install the NVIDIA driver, use the following command:

sudo dnf install akmod-nvidia

The latest NVIDIA driver will be installed on your Fedora 34/35.

Note that the changes will not come into effect right after the installation. You’ll need to reboot your PC to complete the installation process finally. You can reboot using the reboot icon or using the command below:

sudo reboot

To make sure you’ve successfully installed the latest NVIDIA driver on our Fedora, open your terminal and run the following command:

nvidia-smi

Finally, you’ve got the latest NVIDIA driver of your need on your Fedora.

Install the Latest Nvidia Drivers on Fedora From the NVIDIA Downloads Page (Manual Method)

We do not use the RPM Fusion repositories to install the drivers using this method.

Check which NVIDIA GPU model you have following the previous method. Then, you are required to visit NVIDIA’s download page.

Here, choose the options from the dropdowns that are suited for you. Then click search, and the driver available for you should pop up according to your choices in these boxes.

Once you get to this page, click Download and another Download page open up. Next, right-click on Download and copy the link address. Then we’ll use wget further to make this easy.

wget https://us.download.nvidia.com/XFree86/Linux-x86_64/515.57/NVIDIA-Linux-x86_64-515.57.run

Note: This link above is just an example link. It might not be the latest version depending on when it’s viewed. Users are advised to follow the steps involved themselves instead of copying this.

Once it’s done, we shall install Linux Headers and compilation dependencies using the code below:

sudo dnf install kernel-devel kernel-headers gcc make dkms acpid libglvnd-glx libglvnd-opengl libglvnd-devel pkgconfig -y

As the nouveau driver is working by default, blacklist the nouveau driver. To do that, you can create a blacklist file. Execute the following command:

sudo nano /etc/modprobe.d/blacklist-nouveau.conf

Once you’ve opened the file, add:

blacklist nouveau
options nouveau modeset=0

Press Ctrl+O to save the file. Press CTRL+X to exit.

Then run these commands one after another:

sudo dracut -v -f

Ignore any unusual messages.

sudo systemctl set-default multi-user.target

The command above sets up for reboot to the multi-user run level.

Reboot the system.

sudo reboot now

Once the computer has rebooted, go to the folder where you downloaded your driver’s .run file. Then start the installation by running the following command:

sudo bash NVIDIA-Linux-x86_64-515.57.run

Make sure to write the .run file you downloaded in the command above.

On the first prompt regarding DKMS, it is generally recommended to select Yes. On the second prompt, choose Yes or No according to your choice regarding the 32-bit compatibility.

On the next prompt regarding nvidia-xconfig, the choice is optional, but the recommended option is Yes for users that have little to no idea about the subject or are unsure.

The last prompt will inform you regarding your successful installation. Once you see it, all the steps for installation are complete. Now, only post-installation steps remain.

Before you reboot your system, you need to switch to the GUI. It can be done with the code:

sudo systemctl set-default graphical.target

Reboot the system:

sudo reboot now

Once you’re back in the system, check whether the drivers you just installed are working.

nvidia-smi

You should see many information and some processes on the output.

Conclusion

In this article, we learned how to install the latest NVIDIA drivers on Fedora Linux 34/35 using two methods: 1) Using the RPM Fusion repositories and 2) Using the download file from NVIDIA’s download page. Any of the two methods will help you install your required drivers.

0 Shares:
Subscribe
Notify of
guest
Receive notifications when your comment receives a reply. (Optional)
Your username will link to your website. (Optional)

0 Comments
Inline Feedbacks
View all comments
You May Also Like