How to Install NVIDIA Drivers on AlmaLinux 9

Most modern Linux Desktop systems, such as AlmaLinux, come with an NVIDIA driver pre-installed in the Nouveau open-source graphics device driver for Nvidia video cards. For the most part, this is acceptable; however, if you use your Linux system for graphical design or gaming, you may get better drivers.

Historically, the Nouveau proprietary drivers are slower than Nvidia’s, which lacks the latest graphics card hardware features, software technology, and support. In most situations, upgrading your Nvidia Drivers with proper NVIDIA drivers is more beneficial than not. In some cases, you may see some substantial improvements overall.

In the following tutorial, you will learn how to install the Nvidia Graphic Drivers from the Nvidia Proprietary Repository RPM, giving you the latest software on AlmaLinux 9, the command line terminal.

Update AlmaLinux

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

sudo dnf upgrade --refresh

Install EPEL/EPEL Next Repository

The first task is to install the EPEL repository, and the recommendation is to install both repositories.


First, enable the CRB repository.

sudo dnf config-manager --set-enabled crb

Next, install EPEL using the following (dnf) terminal command.

sudo dnf install \ \

Install NVIDIA Drivers – NVIDIA Repository Method


The second method is installing the NVIDIA drivers directory from the source. This can be beneficial, along with the ability to grab updates as soon as they appear. Beta drivers are also available in this repository, making it possibly more appealing than RPM Fusion, which often breaks desktops and servers.

See also  How to Install Nvidia Drivers on LMDE 5

First, import the repository for your system.

sudo dnf config-manager --add-repo$(uname -i)/cuda-rhel9.repo

Install required dependencies for safe measures.


sudo dnf install kernel-headers-$(uname -r) kernel-devel-$(uname -r) 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.

sudo dnf module install nvidia-driver:latest-dkms

Note you will be prompted to import GPG keys during the installation. This is safe to do so for newer users, type Y when prompted.

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

sudo dnf module list nvidia-driver

For open-source users, you can install this module instead of the proprietary, and I suggest keeping the latest. However, as mentioned above, this is still new so issues may be encountered possibly slightly more, but this should be rare. Any problems, install the non-open source.


sudo dnf module install nvidia-driver:open-dkms

Lastly, reboot your system once done.



Verify NVIDIA Drivers Installation

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

Activities > Show Applications > NVIDIA X Server

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


Example if installation successful:

Users who installed Cuda support can run the following command in your terminal.


Example output:


How to Install NVIDIA Drivers on AlmaLinux 9

As mentioned above, at the time of the tutorial, NVIDIA 515 is the latest, which you can see is installed due to the fact we are installing directly from the NVIDIA repository; in the future, this version will change pretty quickly as the tutorial ages.

How to Update Nvidia Drivers

All future updates will be in the standard dnf refresh command procedure; I would advise most users to run this command as much as possible to ensure your system and your Nvidia drivers are up-to-date.

sudo dnf upgrade --refresh


Slow Boot Times with Nvidia Drivers

A common complaint when installing Nvidia drivers is the slow boot time. This is mainly caused due to Nvidia, with the kernel searching for USB-C drivers that support VR devices.

See also  How to Upgrade Mesa Drivers on Linux Mint 21 LTS

Depending on your system setup, the following methods may work to fix it.


Blacklist the USB-C driver by opening the following “/etc/sysconfig/grub” location.

nano /etc/sysconfig/grub

Find the line with “GRUB_CMDLINE_LINUX=” and add the following as the last entry under it.



Refresh grub.

grub2-mkconfig -o /boot/grub2/grub.cfg

Then reboot your system.



Blacklist the USB-C driver

sudo echo "blacklist i2c_nvidia_gpu" >> /etc/modprobe.d/blacklist_i2c-nvidia-gpu.conf

Refresh grub.

sudo grub2-mkconfig -o /boot/efi/EFI/almalinux/grub.cfg

Then reboot your system.


Comments and Conclusion

The tutorial taught you how to install the Nvidia Drivers on your workstation desktop. Given you are installing these drivers straight from Nvidia’s repository, you will always be up-to-date with the latest features and security fixes.


Not what you were looking for? Try searching for additional tutorials.

Leave a Comment