Here is a no nonsense tutorial on how to get nvidia gpu working with Rocky Linux desktop! It works great on nvidia rtx 2080 and others.

  1. sudo dnf update && sudo dnf upgrade -y

  2. sudo dnf install epel-release

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

  4. sudo dnf install kernel-devel-$(uname -r) kernel-headers-$(uname -r)

  5. sudo dnf install nvidia-driver nvidia-settings

  6. sudo dnf install cuda-driver

  7. sudo reboot now


Nice, but there is an another version (particularly if one does not need CUDA):

  1. sudo dnf update
  2. sudo reboot
  3. sudo dnf install elrepo-release
  4. sudo dnf install nvidia-detect
  5. sudo dnf install $(nvidia-detect)
  6. sudo reboot

Note though that you definitely do not want both ELRepo and NVidia’s repo simultaneously enabled.

cool, thank you!! I will re-install in a day or so and report back here on how the newer version worked out. I take it you are saying I should use your version? I do not even know what cuda is for so i dont need cuda one would assume?

CUDA is the NVIDIA framework for GPU parallel programming.


Hi. After performing the above steps and rebooting, I am still running with nouveau. Is there another step to get the NVIDIA drivers working?

We have listed to mutually exclusive sets of steps. Which ones did you use?

I used the first method listed. To confirm, I’ve installed Nvidia 495.29.05 and confirmed it with nvidia-settings. The problem is that according to “sudo lshw -c video” the driver=nouveau. How can I tell the OS to use the Nvidia? Rebooting after the procedure does not change it.

I don’t know how the content from NVidia’s own repo installs.

  • The ELrepo packages apped nouveau.modeset=0 rd.driver.blacklist=nouveau plymouth.ignore-udev to kernel command-line options
  • They also add
Section "Device"
	Identifier  "Videocard0"
	Driver      "nvidia"

into X11 configuration. Furthermore, they did disable Wayland too. (Not sure if they still do.)

OK now. To recap: I had two issues. First, in order to disengage nouveau, I had to get back to the Rocky/Fedora boot menu which was configured secondary to Manjaro’s. (It’s seems strange to me that nouveau can only be blacklisted in the grub bootmenu, not in the OS itself.) Once I did that I finally got to the install with the nvidia driver. However, the nvidia install I used from the 1st post here wasn’t working properly as the screen was stuck at a stretched 1024x768 res. I needed to restart the procedure so I removed the nvidia driver with:

`sudo dnf remove ‘nvidia

after which I was back with nouveau. From there I ran jlehtone’s steps in post 2. That went smoothly and I now seem to have a correctly configured desktop with nvidia drivers. In my setup I just have a couple extra steps using the efi setting boot menu.

1 Like

There are some important information here if you want to use NVIDIA GPU within a virtual machine :

'cuda are fish that swim in da sea.