This article will cover how to install NVIDIA drivers on Rocky Linux 9.

This is a step by step tutorial.

In order for the driver to install and work correctly you need to disable secure boot, this is by design.

First we need to get EPEL enabled, we can do this with the command below.

sudo dnf install epel-release
Code language: Bash (bash)

Now we need to add the official NVIDIA repository to our Rocky Linux system, we can do this with the command below.

sudo dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel9/x86_64/cuda-rhel9.repo
Code language: Bash (bash)

Its time to get the kernel-devel and kernel-headers used by the drivers.

sudo dnf install kernel-devel-$(uname -r) kernel-headers-$(uname -r)
Code language: JavaScript (javascript)

Let’s finally install the NVIDIA drivers.

sudo dnf install nvidia-driver nvidia-settings

To install CUDA drivers, this is optional, you can use the command below.

sudo dnf install cuda-driver

You will need to reboot in order for this change to take an effect.

After the reboot you can enter the command below to check if the drivers work, if it shows you GPU information that means the drivers work, if this errors out it means the drivers have failed to load

nvidia-smi

If you found this guide helpful or come across any issues or error leave a comment below. I will be happy to help and reply as soon as I can.

Darryl Dias

I’m Darryl. I’m a 3D Artist, Programmer and Linux enthusiast. On this site I share my insights, tips and tricks, tutorials, methods and best practices.

Join the Conversation

3 Comments

  1. hello again Darryl. I see these days you are using Newspack to run your blog. But that costs a minimum of $750+ /month!! How can you afford that on a small blog? And why did you abandon your previous great wordpress setup, which was always super fast loading?

    1. Hi Glen,

      The Newspack theme is open source and I have my website self hosted on a Digital Ocean droplet.

      You can find the GitHub repository of the Newspack theme here

  2. TY for the effort in sharing the installation, but developer repo literally was a shoot in the knees for me.

    Flatpak requires the same driver version of host what means after a update from 515 to 520 on host my ‘flatpak system’ literally gone away because it doesn’t have the same version.

    All 3D applications stop working due to the mismatch between them.

    So. There is a ‘stable’ repo or a way to choose which driver version will be installed?

    like: sudo dnf install nvidia-driver-515 or something like?

Leave a comment

Your email address will not be published. Required fields are marked *