I’m new to Rocky and I want to install nvidia driver and cuda on my newly installed rocky 9.1. After ONE-DAY-LONGED tried times, I still fail to have them installed on my OS, CAN SOMEONE HELP ME with this, here is the basic info:
There’re many ways I tried, Including disable nouveau and so on, at end I still failed. Finally I followed the step of the 1st solution in the blog https://forums.rockylinux.org/t/tutorial-for-nvidia-gpu/4234 . I successfully exec all the command:
First, the the mokutil --sb merely shows whether SecureBoot is enabled or not.
One has to enable/disable SecureBoot in the UEFI.
The dmesg | grep nvidia should show something even when module load fails due to lacking certificate.
One might look with dmesg | grep -i nvidia too, since some messages might use uppercase.
Lack of any messages points to total lack of kernel module. The modinfo nvidia could tell something even when module exists, but cannot be loaded.
The dkms should put the modules into /lib/modules/5.14.0-*/extra/. Do you have anything in any of those?
Let me know in this thread if you find a solution, as I seem to be fighting with the exact same problem.
I installed the drivers according to instructions (not sure if it were exactly the same steps as you, but looks somewhat familiar), no errors detected, but nvidia-smi gives similar output after a reboot.
I wouldn’t have guessed it might have something to do with e.g. secure boot, which I have enabled because I have also Windows 11 running on this laptop (I think Win11 requires it by default). I suspected the problem might be this laptop having both Intel HD and NVidia GPUs, and that somehow messing up the installation. E.g. lspci | grep -e VGA listed the Intel HD graphics chipset for me, not the Geforce GPU.
I think I used these instructions:
There also seems to be some discussion on this forum:
If you have Secure Boot enabled I don’t think the driver from Nvidia’s official CUDA repo will work out of the box. You may have to manually install the downloaded .run file from Nvidia driver website. Make sure you generate something called a “key pair” when the installer asks you (the first time you install the driver), and then use mokutil to sign it manually after installation.
I followed an installation guide to install nvidia driver for Fedora 37/38 which I think also works for RHEL I’ll try to find it if you need
Do you have the installation guide?
I’d like to have more precise commands to follow, as I have no idea how to e.g. sign the keypair manually with mokutil (?).
I am generally hesitant to test out different things with secure boot as I have some times ended up with unbootable OS installations when I have played with the secure boot settings on my own, without really understanding fully what I am doing.
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’