How to Install NVIDIA Drivers on Fedora

TechZerg is reader supported. When you purchase through links on our site, we may earn a commission.

SHARE ON:
  • Fedora does not include NVIDIA drivers by default due to licensing restrictions.
  • Identify your NVIDIA GPU model using lspci or lshw before installing drivers.
  • Enable RPM Fusion repositories to access proprietary NVIDIA drivers.
  • Install the drivers using sudo dnf install akmod-nvidia -y.
  • Reboot after installation and verify with nvidia-smi.
  • Secure Boot may block the drivers, requiring manual key signing.
  • Black screen issues can be fixed by reinstalling or switching to Xorg.
  • If a kernel update breaks the driver, rebuild it using akmods --force.
  • Wayland may cause compatibility issues; switching to Xorg can help.
  • Update drivers regularly with sudo dnf upgrade --refresh -y.
  • Uninstall NVIDIA drivers using sudo dnf remove akmod-nvidia -y.
  • Reboot after any major driver change for proper functionality.

Introduction

Fedora is a popular Linux distribution known for its stability, security, and cutting-edge features. However, installing proprietary drivers, such as those from NVIDIA, can be a challenge for new users. Fedora does not include NVIDIA drivers by default due to licensing restrictions.

If you have an NVIDIA graphics card, you may need to install the proprietary drivers to get the best performance, support for CUDA applications, and an optimal gaming experience.

This guide explains how to install NVIDIA drivers on Fedora step by step. Whether you need drivers for gaming, deep learning, or general GPU performance, this tutorial covers all essential aspects, including enabling RPM Fusion repositories, installing the correct driver version, and troubleshooting common issues.

Checking Your NVIDIA GPU Model

Before installing any drivers, confirm your NVIDIA GPU model. This helps you choose the right driver package.

  1. Open a terminal.
  2. Run the following command: lspci | grep -E "VGA|3D" This will output a line similar to: 01:00.0 VGA compatible controller: NVIDIA Corporation GP107 [GeForce GTX 1050 Ti] (rev a1)
  3. If you want more details, install and use the lshw tool: sudo dnf install lshw -y sudo lshw -C display This provides extra information about your graphics card.

Once you have identified your GPU, you are ready to install the NVIDIA drivers.

Enabling RPM Fusion Repositories

Fedora does not include proprietary software by default, but the RPM Fusion repository provides official NVIDIA drivers. You need to enable this repository before proceeding.

Steps to Enable RPM Fusion

  1. Open a terminal.
  2. Run the following command to enable RPM Fusion: 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 -y
  3. After enabling RPM Fusion, update your package list: sudo dnf upgrade --refresh -y

RPM Fusion is now enabled, allowing you to install NVIDIA drivers easily.

Installing NVIDIA Drivers on Fedora

Now that RPM Fusion is enabled, you can install the latest NVIDIA driver.

You may like:  How to Switch from NVIDIA to AMD GPU (2025)

Installing the NVIDIA Driver

  1. Install the driver package with: sudo dnf install akmod-nvidia -y This command installs the kernel module for your current and future kernels.
  2. Install necessary dependencies: sudo dnf install xorg-x11-drv-nvidia-cuda -y This package is useful for CUDA applications.
  3. Reboot your system to apply changes: sudo reboot

After rebooting, your NVIDIA drivers should be active. You can check by running:

nvidia-smi

This displays information about your GPU and driver version.

Configuring Secure Boot (If Needed)

If your system uses Secure Boot, Fedora may prevent the NVIDIA driver from loading. You need to sign the kernel module manually.

Steps to Sign NVIDIA Drivers for Secure Boot

  1. Install required packages: sudo dnf install mokutil -y
  2. Check if Secure Boot is enabled: mokutil --sb-state
  3. If Secure Boot is enabled, generate keys: sudo mokutil --generate-key
  4. Sign the NVIDIA kernel module: sudo mokutil --import MOK.der
  5. Reboot and follow the instructions to enroll the key in your firmware.

After completing these steps, your NVIDIA drivers should work with Secure Boot enabled.

Handling Common Issues

Sometimes, you may encounter problems after installing NVIDIA drivers on Fedora. Here’s how to fix them.

Black Screen After Installing Drivers

If your system boots to a black screen, switch to a terminal using Ctrl + Alt + F3 and log in. Then, run:

sudo dnf remove akmod-nvidia -y
sudo dnf remove xorg-x11-drv-nvidia-cuda -y

Reboot and try reinstalling the drivers.

Driver Not Loading After Kernel Update

If a Fedora update includes a new kernel, the NVIDIA driver may stop working. Fix this by running:

sudo akmods --force
sudo dracut --force
sudo reboot

This rebuilds the NVIDIA kernel module for the new kernel.

Wayland Issues with NVIDIA Drivers

By default, Fedora uses Wayland, which may not work well with NVIDIA drivers. To force Fedora to use Xorg:

  1. Open /etc/gdm/custom.conf in a text editor: sudo nano /etc/gdm/custom.conf
  2. Uncomment or add this line under [daemon]: WaylandEnable=false
  3. Save and close the file, then reboot: sudo reboot

Now Fedora will use Xorg instead of Wayland.

Updating NVIDIA Drivers

NVIDIA regularly releases new driver updates. To keep your drivers up to date:

  1. Update all packages: sudo dnf upgrade --refresh -y
  2. If a new driver version is available, update it manually: sudo dnf install akmod-nvidia --best -y

Reboot to apply the changes.

Uninstalling NVIDIA Drivers

If you need to remove the drivers for any reason, use the following commands:

sudo dnf remove akmod-nvidia -y
sudo dnf remove xorg-x11-drv-nvidia-cuda -y
sudo dnf autoremove -y

Then, reboot:

sudo reboot

Your system will now revert to the default open-source Nouveau driver.

Frequently Asked Questions

Here are some of the related questions people also ask:

How do I check if my NVIDIA drivers are installed on Fedora?

You can check if NVIDIA drivers are installed by running nvidia-smi in the terminal. If the drivers are installed correctly, it will display GPU details and driver information.

Why doesn’t Fedora include NVIDIA drivers by default?

Fedora does not include NVIDIA drivers by default because they are proprietary software, and Fedora prioritizes open-source packages.

What is RPM Fusion, and why is it needed for NVIDIA drivers?

RPM Fusion is a third-party repository that provides access to proprietary software, including NVIDIA drivers, which are not available in Fedora’s official repositories.

How do I switch from Wayland to Xorg for better NVIDIA driver compatibility?

Edit the file /etc/gdm/custom.conf, find the line WaylandEnable=false, uncomment or add it, and then reboot your system.

What should I do if I get a black screen after installing NVIDIA drivers on Fedora?

Switch to a terminal using Ctrl + Alt + F3, remove the drivers with sudo dnf remove akmod-nvidia -y, and try reinstalling them after rebooting.

How do I enable Secure Boot support for NVIDIA drivers on Fedora?

You need to manually sign the NVIDIA kernel module using mokutil and enroll the key during the next reboot.

How can I update my NVIDIA drivers on Fedora?

Run sudo dnf upgrade --refresh -y, and if an update is available, install it using sudo dnf install akmod-nvidia --best -y, then reboot.

How do I uninstall NVIDIA drivers and revert to open-source drivers on Fedora?

Remove the drivers using sudo dnf remove akmod-nvidia -y, run sudo dnf autoremove -y, and reboot your system.

What command should I use to check my NVIDIA GPU model in Fedora?

Use lspci | grep -E "VGA|3D" or sudo lshw -C display to find your GPU model and details.

The Bottom Line

This guide explained how to install NVIDIA drivers on Fedora using the RPM Fusion repository. We covered checking your GPU model, enabling RPM Fusion, installing drivers, handling Secure Boot, troubleshooting, and updating or uninstalling drivers.

By following these steps, you can install and maintain NVIDIA drivers on Fedora without issues. Whether you need drivers for gaming, AI development, or general performance, this guide ensures you get the best results.

If you encounter any issues, check the Fedora forums or the official NVIDIA documentation for additional help.