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.
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
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
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
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:
udo dnf install xorg-x11-drv-nvidia-cuda
To make the changes take effect, reboot your system and login.
For Legacy Graphics Card
Note: Keep in mind that there are only three drivers available to install, even though the Nvidia list shows more. Old devices are supported by the nvidia-390 and nvidia-340 drivers.
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
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?