Fedora is a popular Linux distribution known for its cutting-edge features and robust performance. While it comes pre-installed with the open-source Nouveau driver for NVIDIA graphics cards, users seeking enhanced performance and compatibility often opt for NVIDIA’s proprietary drivers. This guide will walk you through the process of installing these drivers on your Fedora system.
Understanding Nouveau and NVIDIA Drivers
The Nouveau driver is an open-source driver for NVIDIA GPUs, integrated into the Linux kernel and serving as the default for many distributions, including Fedora. While it offers basic functionality, it may not fully leverage the capabilities of newer NVIDIA hardware, leading to suboptimal performance in graphics-intensive applications. On the other hand, NVIDIA’s proprietary drivers are tailored to provide full functionality and optimal performance for their GPUs, making them the preferred choice for users requiring advanced graphics features.
Preparing Your System
Before installing the NVIDIA drivers, it’s crucial to update your system to ensure all packages are current. Open a terminal and execute:
sudo dnf update --refresh
After the update completes, reboot your system to apply any changes:
sudo reboot
Determining Your NVIDIA GPU Model
Identifying your NVIDIA GPU model is essential to ensure compatibility with the appropriate driver version. To find your GPU model, run:
lspci | grep -Ei 'VGA|3D'
This command will display information about your graphics devices. For example:
01:00.0 VGA compatible controller: NVIDIA Corporation GA104 [GeForce RTX 3070] (rev a1)
With this information, you can determine the appropriate driver for your GPU.
Installing NVIDIA Drivers Using RPM Fusion

The recommended method for installing NVIDIA drivers on Fedora is through the RPM Fusion repositories, which provide pre-packaged NVIDIA drivers compatible with Fedora’s kernel.
Step 1: Enable RPM Fusion Repositories
First, enable both the free and non-free RPM Fusion repositories:
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
After enabling the repositories, refresh the DNF cache:
sudo dnf makecache
Step 2: Install Kernel Development Tools and Headers
Install the necessary development tools and kernel headers required for building the NVIDIA kernel modules:
sudo dnf install kernel-devel kernel-headers gcc make dkms acpid libglvnd-glx libglvnd-opengl libglvnd-devel pkgconfig
Step 3: Install the NVIDIA Driver
Now, install the NVIDIA driver and CUDA support:
sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda
The akmod-nvidia
package ensures that the NVIDIA kernel module is automatically rebuilt when a new kernel is installed. The xorg-x11-drv-nvidia-cuda
package provides CUDA support for GPU computing.
Step 4: Reboot Your System
After the installation, reboot your system to load the new NVIDIA drivers:
sudo reboot
Post-Installation Steps
Upon rebooting, verify that the NVIDIA drivers are correctly installed and loaded. You can check the NVIDIA driver version with:
cat /proc/driver/nvidia/version
Additionally, the nvidia-smi
command provides information about your NVIDIA GPU:
bashCopyEditnvidia-smi
If these commands return information about your NVIDIA GPU and driver version, the installation was successful.
Troubleshooting Common Issues
Issue 1: Secure Boot
If your system uses Secure Boot, the NVIDIA kernel modules must be signed to be loaded. Follow Fedora’s Secure Boot guide to sign the modules.
Issue 2: Black Screen After Boot
A black screen after boot may indicate a conflict between the Nouveau and NVIDIA drivers. Ensure that the Nouveau driver is blacklisted by creating a file at /etc/modprobe.d/blacklist-nouveau.conf
with the following content:
blacklist nouveau
options nouveau modeset=0
Then, regenerate the initramfs:
sudo dracut --force
Reboot your system afterward.
Issue 3: Driver Mismatch After Kernel Update
After a kernel update, you might encounter issues if the NVIDIA driver modules are not rebuilt for the new kernel. Using akmod
helps mitigate this by automatically rebuilding the driver modules. However, if you face issues, you can manually rebuild the modules:
sudo akmods --force
sudo dracut --force
Then, reboot your system.
Easily Remove NVIDIA Drivers from Your Linux Machine
Conclusion
Installing the proprietary NVIDIA drivers on Fedora enhances your system’s graphical capabilities, providing better performance for applications that require intensive GPU usage. By following this guide, you should be able to install the appropriate drivers for your NVIDIA GPU and troubleshoot common issues that may arise. Always ensure your system is updated, and refer to Fedora’s official documentation and forums for additional support.