# Cannot install Nvidia drivers

**URL:** <https://discussion.fedoraproject.org/t/cannot-install-nvidia-drivers/85146>\
**Category:** Ask Fedora\
**Tags:** f38, nvidia, workstation, gnome\
**Created:** [July 2, 2023, 10:32pm UTC](https://discussion.fedoraproject.org/t/cannot-install-nvidia-drivers/85146 "2023-07-02T22:32:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![herorareheart](https://avatars.discourse-cdn.com/v4/letter/h/3c6eb4/32.png) [@herorareheart](https://discussion.fedoraproject.org/u/herorareheart)\
**Post date:** [July 2, 2023, 10:32pm UTC](https://discussion.fedoraproject.org/t/cannot-install-nvidia-drivers/85146/1 "2023-07-02T22:32:44Z")

</div>

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;

```auto
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.

---

<div class="post-metadata">

**Author:** ![computersavvy](https://sea1.discourse-cdn.com/fedoraproject/user_avatar/discussion.fedoraproject.org/computersavvy/32/4741_2.png) [@computersavvy](https://discussion.fedoraproject.org/u/computersavvy)\
**Post date:** [July 2, 2023, 10:41pm UTC](https://discussion.fedoraproject.org/t/cannot-install-nvidia-drivers/85146/2 "2023-07-02T22:41:11Z")

</div>

> [@herorareheart](#):
>
> 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;

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)](https://rpmfusion.org/Howto/Secure%20Boot?highlight=%28%5CbCategoryHowto%5Cb%29)

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.

---

<div class="post-metadata">

**Author:** ![herorareheart](https://avatars.discourse-cdn.com/v4/letter/h/3c6eb4/32.png) [@herorareheart](https://discussion.fedoraproject.org/u/herorareheart)\
**Post date:** [July 2, 2023, 10:47pm UTC](https://discussion.fedoraproject.org/t/cannot-install-nvidia-drivers/85146/3 "2023-07-02T22:47:43Z")

</div>

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;

```auto
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.

---

<div class="post-metadata">

**Author:** ![computersavvy](https://sea1.discourse-cdn.com/fedoraproject/user_avatar/discussion.fedoraproject.org/computersavvy/32/4741_2.png) [@computersavvy](https://discussion.fedoraproject.org/u/computersavvy)\
**Post date:** [July 2, 2023, 10:57pm UTC](https://discussion.fedoraproject.org/t/cannot-install-nvidia-drivers/85146/4 "2023-07-02T22:57:29Z")

</div>

`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.

---

<div class="post-metadata">

**Author:** ![herorareheart](https://avatars.discourse-cdn.com/v4/letter/h/3c6eb4/32.png) [@herorareheart](https://discussion.fedoraproject.org/u/herorareheart)\
**Post date:** [July 2, 2023, 11:28pm UTC](https://discussion.fedoraproject.org/t/cannot-install-nvidia-drivers/85146/5 "2023-07-02T23:28:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jakfrost](https://sea1.discourse-cdn.com/fedoraproject/user_avatar/discussion.fedoraproject.org/jakfrost/32/30655_2.png) [@jakfrost](https://discussion.fedoraproject.org/u/jakfrost)\
**Post date:** [July 3, 2023, 12:05am UTC](https://discussion.fedoraproject.org/t/cannot-install-nvidia-drivers/85146/6 "2023-07-03T00:05:33Z")

</div>

> [@herorareheart](#):
>
> a fully open source actually usable Nvidia driver is bundled into the kernel,

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

> [@herorareheart](#):
>
> Even if this is fixable I’m at my anger and frustration limit.

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