How to Install Nvidia Drivers on Fedora Linux

Like most Linux distributions, Fedora does not come with the proprietary Nvidia drivers installed by default.

The default open source Nouveau driver works in most situations, but you may encounter issues like screen tearing with it.

Fedora with Nouveau driver
Display issue in Fedora with Nouveau graphics driver

If you encounter such graphics/video issues, you may want to install the official proprietary Nvidia drivers in Fedora. Let me show you how to do that.

Installing Nvidia drivers in Fedora

I am using Fedora 32 in this tutorial but it should be applicable to other Fedora versions.

Step 1

Before you do anything else, make sure that your system is up-to-date. You can either use the Software Center or use the following command in the terminal:

 sudo dnf update

Step 2

Since Fedora doesn’t ship the Nvidia driver, you need to add the RPMFusion repos to your Fedora system. You can use the following command in the terminal

sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
Don’t like terminal? Use GUI method to add RPMFusion repository

If you are using Firefox, you can also add the RPMFusion repositories from your browser. Go to the Configuration page and scroll down to the “Graphical Setup via Firefox web browser” section. Click the link for the free and then the nonfree repo. This will download the .rpm file, which will eventually install the repository.

RPMFusion Browser Installation
RPMFusion Browser Installation

You can double click on the downloaded RPM file to install it.

RPMFusion in the Software Center
RPMFusion in the Software Center

Step 3

Now you need to determine what graphics card (or chip) you have in your Linux system. Pull up the terminal and enter the following command:

lspci -vnn | grep VGA
Video Card Lookup Fedora
Video Card Lookup in Fedora

Next, you need to look up what driver corresponds to that chip. You can find a list of the Nvidia chips here. You can also use this tool to search for your device.

Note: Keep in mind that there are only three drivers available to install, even though the Nvidia list shows more. The most recent cards are supported by the Nvidia driver. Old devices are supported by the nvidia-390 and nvidia-340 drivers.

Step 4

To install the required driver, enter one of the commands into the terminal. The following command is the one I had to use for my card. Update as appropriate for your system.

sudo dnf install akmod-nvidia sudo dnf install xorg-x11-drv-nvidia-390xx akmod-nvidia-390xx sudo dnf install xorg-x11-drv-nvidia-340xx akmod-nvidia-340xx
Nvidia terminal installation
Nvidia terminal installation

Step 5

To make the changes take effect, reboot your system. It might take longer for your system to reboot because it is injecting the Nvidia driver into the Linux kernel.

Once you log in to your system after reboot, you should have a better visual performance and no screen tearing.

Fedora with Nvidia driver
Fedora with Nvidia drivers

Bonus Tip:

This is an optional step but it is recommended. When you add the RPMFusion repos, you get access to multimedia packages that are not available in the regular repos.

This command will install packages for applications that use gstreamer:

sudo dnf groupupdate multimedia --setop="install_weak_deps=False" --exclude=PackageKit-gstreamer-plugin

This command will install packages needed by sound and video packages:

sudo dnf groupupdate sound-and-video

Hopefully, you find this tutorial useful in installing Nvidia drivers on Fedora. What other Fedora tutorials would you like to see on It’s FOSS?

Similar Posts

  • @John Paul

    Thanks for this article!

    I had previously been installing nvidia drivers the manual way… since I also had enabled automatic updates (sudo dnf install -y dnf-automatic;sudo systemctl enable –now dnf-automatic-install.timer;
    ), whenever a new kernel version was released and automatically installed, that would always jack my system up by breaking my desktop manager. Was fixable by booting to old kernel and repeating the manual install with the latest nvidia driver… but really hoping that I can avoid that chore by following the rpmfusion install process you gave here!

    One suggestion though: the code block where you have the ‘sudo dnf install …’ command. That appears to actually be 3 separate commands, presumably for each of the 3 respective driver scenarios of ‘newest’, ‘legacy-v390’, and ‘legacy-v340’. I’m sure it was probably just a formatting issue, but you might want to separate it out onto 3 separate lines and add comments to avoid confusing newbies :-)

    Also, I would recommend the addition of nvidia-settings for newest and 390 (i don’t think there is one for 340 but I don’t have that card so not sure… basing this purely off descriptions in dnf search)

    e.g.
    # newest
    sudo dnf install -y akmod-nvidia nvidia-settings;

    # 390
    sudo dnf install -y xorg-x11-drv-nvidia-390xx akmod-nvidia-390xx nvidia-settings-390xx;

    # 340
    sudo dnf install -y xorg-x11-drv-nvidia-340xx akmod-nvidia-340xx;