How to Install NVIDIA Drivers on Fedora 37 Linux

Advertisement

When it comes to graphics processing, speed is often of the essence. For any Linux user who relies on their system for gaming or graphic design, having the fastest drivers possible is essential. While most modern Linux distributions come with Nouveau drivers pre-installed, these are often not the most up-to-date or well-supported drivers available. However, the Nouveau open-source graphics device driver for Nvidia video cards is typically slower than Nvidia’s proprietary or open-source driver and lacks support for the latest hardware features and software technology. In most cases, upgrading to proper NVIDIA drivers will provide a much better experience. In some situations, the improvement in speed and performance can be substantial.

The following tutorial will teach you how to install the Nvidia Drivers on Fedora 37 Linux from RPM Fusion or Nvidia RPM Cuda REPO using cli with the command line terminal.

Update Fedora

Before you begin, update your system to ensure all existing packages are up to date to avoid any conflicts, this is essential when installing drivers such as graphic card drivers and kernels, etc.

sudo dnf upgrade --refresh -y

Install Nvidia Drivers from Nvidia CUDA RPM

Another method for users to install Nvidia Drivers is to install the drivers directly from the CUDA repository.

At the time of this tutorial, Nvidia has not released the Fedora 37 branch, given its beta, and it generally takes a few weeks to appear after an official release. However, the Fedora 36 repository can be imported and does work given the package dependencies minimum versions meet the requirements. I have tested this personally on three different Nvidia cards and PCs, but I would recommend doing a full backup before using this method, just in case.

Advertisement

WARNING, X86_64 ARCHITECTURE IS ONLY SUPPORTED IN THIS METHOD FROM NVIDIA.

First, import the repository for your system.

Advertisement
sudo dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/fedora36/x86_64/cuda-fedora36.repo

Install required dependencies for safe measures.

sudo dnf install kernel-headers kernel-devel tar bzip2 make automake gcc gcc-c++ pciutils elfutils-libelf-devel libglvnd-opengl libglvnd-glx libglvnd-devel acpid pkgconfig dkms

Next, install the latest NVIDIA drivers using the following command.

sudo dnf module install nvidia-driver:latest-dkms

Example output:

How to Install NVIDIA Drivers on Fedora 37 Linux

Alternatively, you can list the modules of Nvidia RPM using the following command.

Advertisement

sudo dnf module list nvidia-driver

Example output:

How to Install NVIDIA Drivers on Fedora 37 Linux

Alternatively, you can install another module, and I suggest keeping the latest. However, as above, you can install the recently released Nvidia open-source branch for those who prefer to use this instead of the proprietary branch.

Example:

sudo dnf module install nvidia-driver:open-dkms

Lastly, I would strongly suggest always using a branch that has -dkms added on, or else you may encounter issues in the future when you upgrade your system.

Advertisement

Install Nvidia Drivers – RPM Fusion Method

By default, like most Linux distributions, Fedora does not come with NVIDIA proprietary drivers. The best method to install these on Fedora 37 is to use the RPM fusion repository.

First, open your terminal and add the following repositories

Advertisement

Import RPM Fusion Free

sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm

Import RPM Fusion Nonfree

sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

Once done, refresh your repository list.

sudo dnf update --refresh

Install NVIDIA Drivers

After importing the RPM Fusion repository, execute the following command to install the latest Nvidia drivers on your Fedora system.

sudo dnf install akmod-nvidia -y

Next, install the CUDA driver’s support. Ideally, you may not need this, but sometimes if issues persist, installing the CUDA support can solve problems.

sudo dnf install xorg-x11-drv-nvidia-cuda

Once everything has been installed, you must restart your Fedora system. By default, this will also disable Nouveau drivers automatically.

reboot

Optional Method – Enable RPM Fusion TESTING Branch

RPM Fusion’s testing mainly contains testing or beta packages. This can be useful for those who want to install bleeding-edge NVIDIA drivers.

First, enable the RPM Fusion Testing repository using the following command.

Advertisement
Advertisement

Enable the Free Repository

sudo dnf config-manager --set-enabled rpmfusion-free-updates-testing

Enable the Non-Free Repository

sudo dnf config-manager --set-enabled rpmfusion-nonfree-updates-testing

Once enabled, proceed to install the drivers or run an update. If new bleeding-edge drivers in a test or, more likely, beta drivers will appear here, and you can begin to update to these, remember they may be buggy, so do not be surprised.

Sometimes you may want to disable the RPM Fusion testing repository. This can be quickly done by using the following command, to re-enable, use the following commands above and rinse and repeat.

Disable the Free Repository

sudo dnf config-manager --set-disabled rpmfusion-free-updates-testing

Disable the Non-Free Repository

sudo dnf config-manager --set-disabled rpmfusion-nonfree-updates-testing

Install NVIDIA Legacy Drivers

For those who upgraded Fedora and require older drivers, their graphics card is no longer supported in Nvidia’s newest driver packages. Below are some option installation drivers, do note these are often not updated as much, and security flaws could exist.

Install GeForce 600/700 NVIDIA series drivers:

sudo dnf install xorg-x11-drv-nvidia-470xx akmod-nvidia-470xx xorg-x11-drv-nvidia-470xx-cuda

Install GeForce 400/500 NVIDIA series drivers:

sudo dnf install xorg-x11-drv-nvidia-390xx akmod-nvidia-390xx xorg-x11-drv-nvidia-390xx-cuda

Install GeForce 8/9/200/300 NVIDIA series drivers:

sudo dnf install xorg-x11-drv-nvidia-340xx akmod-nvidia-340xx xorg-x11-drv-nvidia-340xx-cuda

How to Update Nvidia Drivers

All future updates will be in the standard dnf refresh command procedure, and this will check the RPM Fusion repository for updates and the rest of your Fedora packages.

To check for updates:

sudo dnf upgrade --refresh

Verify NVIDIA Drivers Installation

Once you have returned, view the NVIDIA X Server Settings using the following path.

Advertisement

Activities > Show Applications > NVIDIA X Server

Alternatively, if you opened a terminal, use the following command.

Advertisement
nvidia-settings

Example if installation successful:

How to Install NVIDIA Drivers on Fedora 37 Linux

Alternatively, you can use the CLI command in your terminal. This will work with the Nvidia RPM installation method. RPM Fusion users, this may not work since it is designed for desktops in mind more than CLI.

nvidia-smi

Example if installation successful:

How to Install NVIDIA Drivers on Fedora 37 Linux

How to Remove Nvidia Drivers and RollBack

If you do not want to continue to use the Nvidia official drivers, use the following command.

Advertisement

RPM Fusion Removal Method

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

Nvidia RPM Removal Method

sudo dnf module remove nvidia-driver:latest-dkms

This will remove all dependencies installed, and once removed, you must reboot.

reboot

During the reboot, the process will re-enable the Nouveau drivers. You will see a message stating Nvidia drivers not found re-enabling Nouveau drivers, making it easier to switch back and forth if needed.

Comments and Conclusion

If you are looking for better graphics drivers or if your system is not working well with the Nouveau driver, I suggest that you try installing the NVIDIA proprietary drivers. It may take a bit extra work to get them set up and running correctly, but in my experience, it is worth it.

Share on: