Cannot install Nvidia drivers

I am trying to dual boot Fedora with Windows 11. I have an NVME SSD I have installed Fedora on and everything has gone great up until now. I enabled and configured RPM Fusion then installed the appropriate Nvidia drivers from the software center but despite doing that they either weren’t actually installed or weren’t working. I tried following the guide on RPM Fusion to do it all via the terminal and that resulted in a few more packages being installed but the drivers still either aren’t actually installed or aren’t working.

I am using secureboot for both security reasons and to maintain the ability to boot Windows 11, so I checked the secureboot guide on RPM fusion. I tried to run the first command but instantly hit these errors;

Generate new keypair...
Password: 
sg: failed to crypt password with previous salt: Invalid argument
chmod: cannot access '/etc/pki/akmods/certs/lorelei-main-fedora-2373435450.*': Permission denied
chmod: cannot access '/etc/pki/akmods/private/lorelei-main-fedora-2373435450.*': Permission denied
/usr/sbin/restorecon: lstat(/etc/pki/akmods/certs/lorelei-main-fedora-2373435450.der) failed: Permission denied
/usr/sbin/restorecon: lstat(/etc/pki/akmods/private/lorelei-main-fedora-2373435450.priv) failed: Permission denied
ln: failed to access '/etc/pki/akmods/certs/public_key.der': Permission denied
ln: failed to access '/etc/pki/akmods/private/private_key.priv': Permission denied

Running the command as sudo does nothing at all, what am I doing wrong? Either I’m missing something or the RPM Fusion guides are wrong, quite frankly I find the latter to be highly unlikely.

You did not link the indicated guide for secure boot so I can only guess that you may have used this one.
https://rpmfusion.org/Howto/Secure%20Boot?highlight=(\bCategoryHowto\b)

In any case, if you did follow that (and/or the instructions in /usr/share/doc/akmods/README.secureboot – which is nearly identical) but failed to rebuild the modules after creating and importing the key into bios then there are a couple steps remaining.

  1. remove the unsigned modules sudo dnf remove kmod-nvidia-\*
  2. Rebuild the modules with the key included. sudo akmods --force
  3. Wait 1 or 2 minutes after step 2 completes then reboot.

This should solve the problem.

Sorry about that, I did forget to link the guide. Yes it was indeed that guide and I did reference /usr/share/doc/akmods/README.secureboot. The issue is when I run /usr/sbin/kmodgenca it spews back the following;

Generate new keypair...
Password: 
sg: failed to crypt password with previous salt: Invalid argument
chmod: cannot access '/etc/pki/akmods/certs/lorelei-main-fedora-2373435450.*': Permission denied
chmod: cannot access '/etc/pki/akmods/private/lorelei-main-fedora-2373435450.*': Permission denied
/usr/sbin/restorecon: lstat(/etc/pki/akmods/certs/lorelei-main-fedora-2373435450.der) failed: Permission denied
/usr/sbin/restorecon: lstat(/etc/pki/akmods/private/lorelei-main-fedora-2373435450.priv) failed: Permission denied
ln: failed to access '/etc/pki/akmods/certs/public_key.der': Permission denied
ln: failed to access '/etc/pki/akmods/private/private_key.priv': Permission denied

I can’t even make the key. Yes I am entering a password and not leaving the password field blank.

kmodgenca -a to create a new key and overwrite anything that may already exist.
followed by the steps to import it into mok then reboot to completely complete the steps.

Note that all those commands in the instructions must be run with root privileges, usually by using sudo. Nothing in those instructions says anything about using chmod, restorecon, or ln.

  1. sudo kmodgenca -a

  2. sudo mokutil --import /etc/pki/akmods/certs/public_key.der
    The password used there should be a very simple password since it is for one-time use during the reboot and importing the key.

  3. reboot to import the key into bios

  4. follow the steps I gave in the earlier post above.

When I try to enroll the key my BIOS throws up an error claiming it’s not a valid key. Screw all this, I’m just going to return the NVME SSD and stick to Windows until either this process is easier, I can fully switch to Linux without having to fall back and really on Windows every now and then, a fully open source actually usable Nvidia driver is bundled into the kernel, or I build a new PC with an AMD GPU. Even if this is fixable I’m at my anger and frustration limit.

This is waiting in NVidia, unfortunately they don’t seem inclined.

Sorry to hear about that, were there issues using the nouveau driver?