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 and some stutters.
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 39 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
While Fedora does not ship with the Nvidia driver, you have the option to enable third-party repositories during its installation onboarding steps.
If you have not enabled it during setup, you can head to GNOME Software and head to manage the βSoftware Repositoriesβ from the menu to proceed to enable the RPM Fusion repository for NVIDIA drivers.
Of course, you can manually add the RPMFusion repos to your Fedora system to install more programs like VLC or additional multimedia codecs as well.
For that, 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
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
Step 4
To proceed to install the latest NVIDIA graphics driver available in the RPM Fusion repo for the Fedora version you are using, enter the following command in the terminal:
sudo dnf install akmod-nvidia
Once you confirm it by hitting "y", it will download the packages and again ask for another confirmation. Approve it to proceed installing.
Optionally, you can enable CUDA support for the driver, which lets you check the stats for your NVIDIA card from the terminal using nvidia-smi:
The command for it is:
sudo dnf install xorg-x11-drv-nvidia-cuda
Step 5
To make the changes take effect, reboot your system and login.
For Legacy Graphics Card
You can look up what driver corresponds to a specific chip. You can find a list of the Nvidia chips here. Furthermore, you can also use this tool to search for your device.
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
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?