Fedora systems often default to the open-source Nouveau graphics driver, which can limit GPU performance and compatibility with demanding applications. Switching to the official NVIDIA driver unlocks advanced features for gaming, 3D rendering, and GPU-accelerated tasks. However, installing NVIDIA drivers on Fedora requires careful attention to repository setup, driver selection, and compatibility with Secure Boot and kernel updates.
Install NVIDIA Drivers Using RPM Fusion (Recommended Method)
sudo dnf update
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
lspci | grep VGA
Compare your card model with the supported driver series listed on the RPM Fusion NVIDIA Howto page. For most current GPUs, the standard driver (akmod-nvidia) is suitable. Legacy cards (such as GeForce 400/500 or earlier) require specific packages (e.g., akmod-nvidia-390xx).
sudo dnf install akmod-nvidia
For legacy GPUs, substitute the package name as needed (e.g., akmod-nvidia-470xx for certain older models).
This process will also install dependencies such as kernel modules and CUDA libraries if available. The akmod system automatically builds kernel modules for your running kernel version, reducing the risk of breakage after kernel updates.
sudo reboot
After reboot, verify the driver is active by running:
nvidia-smi
This command should display your GPU information and driver version. If you see an error or fallback to Nouveau, double-check that the correct driver version matches your hardware and that Secure Boot is not blocking kernel module loading.
Step 6 (If Using Secure Boot): Secure Boot can prevent unsigned kernel modules, including NVIDIA drivers, from loading. To maintain Secure Boot, you must enroll a Machine Owner Key (MOK) during installation. The RPM Fusion Secure Boot Howto provides detailed instructions. Typically, after installing the driver, you’ll be prompted to create and enroll a key, then reboot and complete the process via the MOK manager interface.
Step 7 (Optional): If you have an Optimus laptop (integrated Intel/AMD GPU + discrete NVIDIA GPU), Fedora supports GPU switching using switcheroo-control. You can select which GPU to use for each application via right-click menus in GNOME or KDE, or with environment variables such as __NV_PRIME_RENDER_OFFLOAD=1 for command-line launches.
Join readers who trust AllThings.How
Add us as a preferred source on Google so our practical guides show up first next time you search.
Add to Google Preferences →Install NVIDIA Drivers Using the Official NVIDIA Repository (Advanced)
Fedora 41 and newer support direct installation of NVIDIA drivers from the official NVIDIA repository, which offers both open and proprietary kernel modules. This method is best for users needing the absolute latest drivers or specific kernel module flavors.
sudo dnf install kernel-devel-matched kernel-headers
sudo dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/fedora41/x86_64/cuda-fedora41.repo
sudo dnf clean expire-cache
- To install the open kernel module flavor:
sudo dnf install nvidia-open
- To install the proprietary kernel module flavor:
sudo dnf install cuda-drivers
sudo reboot
Switching between open and proprietary modules is possible with the –allowerasing flag:
sudo dnf install --allowerasing nvidia-open
or
sudo dnf install --allowerasing cuda-drivers
nvidia-smi and check for errors in dmesg or journalctl -k if the driver does not load.Manually Install NVIDIA Drivers from Nvidia.com (.run Package) (Not Recommended)
Direct installation using the .run installer from NVIDIA’s website is discouraged on Fedora. This method bypasses the package manager, often causes conflicts with system updates, and complicates future maintenance. Only use this approach if you have a unique requirement and are comfortable troubleshooting issues.
chmod +x NVIDIA-Linux-x86_64-*.run
sudo dnf install kernel-devel kernel-headers gcc make dkms acpid libglvnd-glx libglvnd-opengl libglvnd-devel pkgconfig
echo -e "blacklist nouveau\noptions nouveau modeset=0" | sudo tee /etc/modprobe.d/blacklist-nouveau.conf
sudo dracut --force
sudo systemctl set-default multi-user.target
sudo reboot
sudo ./NVIDIA-Linux-x86_64-*.run
Follow the prompts to build and install the driver. Accept DKMS and 32-bit libraries if you need Steam or legacy applications. If you see errors related to Secure Boot, you must disable it or sign the kernel modules yourself.
sudo systemctl set-default graphical.target
sudo reboot
Manual installations are prone to breakage after kernel or Xorg updates. If you encounter issues, consider reverting to the RPM Fusion or official repository method for easier maintenance.
Troubleshooting and Maintenance Tips
After installing the NVIDIA driver, monitor system updates closely. Kernel updates may require rebuilding the NVIDIA kernel module (handled automatically by akmods or DKMS in most cases). If you experience a black screen or fallback to Nouveau after an update, verify that the kernel headers for your running kernel are installed and, if necessary, manually trigger a rebuild:
sudo akmods --force
sudo dracut --force
sudo reboot
For Secure Boot systems, ensure your MOK key remains valid after major changes. If you reinstall Windows or Fedora, you may need to re-enroll keys. Dual-boot users should be cautious with bootloader and Secure Boot configurations, as missteps can prevent access to Windows or Fedora.
To uninstall the NVIDIA driver (RPM Fusion method):
sudo dnf remove akmod-nvidia xorg-x11-drv-nvidia\*
This command reverts your system to the open-source Nouveau driver.
Switching to the official NVIDIA driver on Fedora unlocks improved graphics performance and better compatibility for demanding workloads. Sticking with the RPM Fusion or NVIDIA repository methods ensures smoother updates and easier troubleshooting in the long term.






