Nvidia rocky 10 guide

hey everyone, is there any guides on install nvidida on 10?? or is it the same as 9 - used to foloow this because of safe boot. - How to Install NVIDIA Driver and CUDA on Rocky 9.1 - #10 by timppu

I have not seen something written for 10. On 8 and 9, modules were the preferred way to go, and I have done a lot of NVIDIA installs using modules. Modules were a horrible experiment in the Enterprise environment, imo! With 10, if you type “dnf module list --all” you will not see any modules - yeah! So I tried using the installer. The first step is to disable the nouveau driver. On my NVIDIA system, this also removes sound. When I put the NVIDIA drivers on, sound was still listed as dummy. I did not research more as the driver is not critical for me, but I will personally wait for guidance from NVIDIA before I try again.

There seems to be clear agreement on that. Red Hat introduced Software Collections (SCL) for RHEL 7 (and RHEL 6). On RHEL 8 they made everything a module (“application stream”), hoping to replace SCL. They saw issues when RHEL 8 was in use, but kept some for RHEL 9. In RHEL 10 they chose to have no modules.


There have been many packagers of NVidia drivers for EL distros:

  • NVidia has the .run file, which bypasses package management. This is the oldest and available for most major versions. However, “source installs” that mess up package management are not nice
  • NVidia has driver as RPM too as they now distribute CUDA as packages. Alas, it lags a bit behind; they have now repo for ‘rhel10’, but no content yet
  • ELRepo builds kernel modules that RHEL does not provide. Solid, when they get it rolling. (Not yet for el10)
  • RPM Fusion builds too. They seem to have ‘575.64-1.el10’ packages now
  • negativo17 Nvidia driver, CUDA tools and libraries – negativo17.org seems to have NVidia packages for el9 and el10
  • AlmaLinux 10 offers kernel module as extra, but uses negativo’s packages for the rest of the driver

I do prefer ELRepo and NVidia’s CUDA repo, but they are not yet possible for el10.


Most packaged drivers do that on install.

With most package sources one simply installs packages. NVidia has guide for their offerings; they even mention Rocky.

2 Likes

I generally found using modules to be a lot better than SCL, but I guess it can be a personal preference. Maybe with EL8 they went overboard and had too many of them. With EL9 it seemed quite a good balance, and generally never had any issues with it personally. For me was far worse with SCL.

They are solutions for slightly different problems.

The SCL, like Environment Modules, is about how to have more than one version installed simultaneously. User has to state which version to use (today).

The DNF modules, application streams, are about installing one version. One could have separate repo for each version; modules allows packages to be in same repo.

‘modular’ RPM’s are what made EL 8.x an abomination…
‘I’ gave up on it 1 week after attempting to install/use it…
Skipped over to ‘9.x’ which at least allowed you to just ignore them…
Someone figured out what they were by 10.x and got rid of them…
May they burn on the scrap heap of bad code…
Just my opinion…

would this work you think for 10??? ive always used it for 9 no problems… its from anotehr post

I actually found instructions that seem to be working, without having to disable Secure Boot:

https://www.reddit.com/r/RockyLinux/comments/woqgij/rocky_9_nvidia_drivers_secure_boot_success/

I changed the instructions a bit, e.g. the non-working “sudo echo >” commands in the original instructions:

sudo dnf install epel-release 
sudo dnf upgrade
sudo reboot

After the reboot:

sudo dnf config-manager --add-repo http://developer.download.nvidia.com/compute/cuda/repos/rhel9/$(uname -i)/cuda-rhel9.repo
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
sudo dnf module install nvidia-driver:latest-dkms
echo "blacklist nouveau" | sudo tee /etc/modprobe.d/blacklist-nouveau.conf
echo 'omit_drivers+=" nouveau "' | sudo tee /etc/dracut.conf.d/blacklist-nouveau.conf
sudo dracut --regenerate-all --force
sudo depmod -a

The mokutil command will prompt for you to make up a password, which will be used during reboot

sudo mokutil --import /var/lib/dkms/mok.pub
sudo reboot

After the reboot, your system should ask you if you want to enroll a key or something like that, say yes and it asks for the password you gave in the mokutil command.

Later on, check that the nvidia drivers are installed:

nvidia-smi

If you dual boot windows, a windows-driven firmware update may reset the TPM chip (?). Anyway, any time this happens you’ll need to re-run ‘mokutil --import /var/lib/dkms/mok.pub’

That has already more steps than one needs. You can look at 1. Introduction — NVIDIA Driver Installation Guide r580 documentation for shorter list (for Rocky 9, among all the text).

Alas, the https://developer.download.nvidia.com/compute/cuda/repos/rhel9/$(uname -i)/
is for Rocky 9, not for Rocky 10.
One has to wait until NVidia builds packages for rhel10 and puts them into
https://developer.download.nvidia.com/compute/cuda/repos/rhel10/ (or something),
before one can use this “CUDA repo method” with el10.

got yah… i thought it would jsut still work with the 9 stuff… im still new to all this…

do you know where id keep an eye out for the update…

The GPU driver has two parts:

  • kernel module that talks to the hardware. It must be built for the kernel that is in use. The el10 has entirely different kernel from el9
  • Drivers in the windowing system. The el9 had X11 and Wayland. The el10 has only Wayland, and I bet the version differs.

More generally, packages should be built for the target platform, because the build invariably links to system libraries and libs in different platforms (e.g. el9 vs el10) are not totally compatible.

@pkjack

i used my own and tweaks from nixos - fedora and working great so far:

for starters:

sudo dnf install -y \
  https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-10.noarch.rpm \
  https://mirrors.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-10.noarch.rpm

I just replaced the 9 to 10 and used certain nvidia flags. if your interested, ill DM you my script.I did my own custom driver script, I just wanted it to work and be done with it.

2 Likes

wow.. top stuff there!!! i dont suppose you run davinci resolve do you?

1 Like

@pkjack

nope, i rarely use OBS even.

I just got samba and GUI interface working to share folders. abit of a mission but all done

you can install nix package manager and install it that way perhaps?

well ive just had mega problems… ive used rocky 9… install a few times fresh and follwoed the same install insructions for nvivida.. never had a problem. now out of the blue it will still install all okay… but everytihng is messed up… glitches, chrome doesnt open, videos dont play and so on…

even though before, all worked perfectly. i jsut dont get it.

But as soon as i plug into my built in graphics… all the problems go

Have u tried rocky10. Today I had a horrible realisation that Linux is heading towards the direction of no longer being old pc friendly. I tried to install RL 10 on my hp folio i7 3gen and it refused to install and displayed that it no longer supports machines that have v2 and lower CPU.

In your case maybe try rl10. I did pass afew global env sessions that I predominately use in all my general and nixos

ive litrally jsut finished installing 10… maybe they updated the drivers on that install i used to do… gutted as its worked perfectly.. have you got any insrutions at all to install nvivida on 10.. well try to anyways

1 Like

i can send via messenger or email:

fb; tolga erok

gtx1650

rocky10 kde

NVidia has finally created packages for “rhel10”.


Short version with their packages:

dnf config-manager --enable crb
dnf install epel-release https://developer.download.nvidia.com/compute/cuda/repos/rhel10/x86_64/cuda-rhel10.repo

# IF pre-Turing GPU (i.e. Maxwell, Pascal, Volta):
dnf install cuda-drivers
# ELIF Turing or never:
dnf install nvidia-open

# IF Secure Boot is in use AND dkms key is not yet in UEFI:
mokutil --import /var/lib/dkms/mok.pub

systemctl reboot

# Complete key import on boot IF mokutil was used

The above installs both desktop and compute drivers. If one will not install/use CUDA, then:
dnf install nvidia-driver kmod-nvidia-latest-dkms
for pre-Turing, or
dnf install nvidia-driver kmod-nvidia-open-dkms

If one will use only CUDA, no desktop, then:
dnf install nvidia-driver-cuda kmod-nvidia-latest-dkms
for pre-Turing, or
dnf install nvidia-driver-cuda kmod-nvidia-open-dkms

5 Likes

Yeah cheers for that … in my case my script already handles the GUI side and sets up CUDA support too, mainly through akmod for rebuild safety. So it’s a bit of a hybrid setup :rofl: …. desktop performance with compute fallback when needed. My personal script works well so far as its literally a mish mesh of what worked in nixos, rhel and fedora workstation. I really would have liked to use negativo17 repo as its more complete… oh well, next time. But thanks for the great news!