Correct walkthru for Nvidia drivers on Fedora 41 - Gnome

I had to reistall windows 11, and afterwords my default boot device switched to my Windows drive. I tried changing the default boot order in BIOS but it would not switch back to Fedora - Grub… so I reinstalled Fedora. Now by boot order is back on Fedora but I have to get my Nvidia drivers working again. I have tried a few different walkthrus but none appear to work. Which is the correct one?

last one I did was GitHub - oddmario/NVIDIA-Fedora-Driver-Guide: A little guide to help you install & manage NVIDIA GPU drivers on your Fedora system
with this, after downloading the .run from Nvidia website and running it, it said that I was now in X11 and no longer in Wayland…
I just deleted the partition and reinstalled Fedora. So I am back to a fresh install. Which walkthru actually works in Fedora 41?

i take it that other people that use Fedora 41 have Nvidia graphics cards.

Fedora 41 - Gnome
Windows 11
Dual boot
HP Victus 16.1
Nvidia 3050 Mobile

2 Likes

To install nvidia drivers for Fedora we recommend using the rpmfusion nvidia drivers. See Howto/NVIDIA - RPM Fusion - make sure to do the secure book key setup first.

That guide you use I would not recommend as it tells you to install from nvidia.com that other fedora users have had issues with.

3 Likes

thanks.

Okay, stupid question,
where do I find how to do the secure boot key setup, which I am supposed to do first?

Looked on the site you sent, and it says nothing about that.

Also did a few searches, but don’t see any instructions on what to do.

https://rpmfusion.org/Howto/Secure%20Boot
Or the file located at /usr/share/doc/akmods/README.secureboot which is installed when the user installs the akmods package.

2 Likes
tom@fedora:~$ sudo dnf mark install akmod-nvidia
[sudo] password for tom: 
Unknown argument "install" for command "mark". Add "--help" for more information about the arguments.
tom@fedora:~$ 

Everything appeared to have worked, and I boot with no errors. Thanks.

Just didn’t know if I needed to do something because the above command didnt work.

Also, it says that my key I created went into /etc/pki/akmods but I’m not finding that dir… wanted to backup my key.

does /etc/ stand for something else? not finding this.

Thanks.

actually no, something is wrong. I followed all of this, but now whenever I try to launch ANYTHING other than Firefox, it never launches. Can’t launch terminal. Can’t launch Software. Nothing seems to work. Not sure what is going on. Had this happen when I did different nvidia walkthru’s and I just reinstalled Fedora.

Is there a way to fix this? I can’t even launch terminal.

Settings doesnt work.
It seems only Firefox works. NOTHING ELSE.

I can press Alt-Ctl-F3 and get to tty mode.
then I can submit commands.
but in normal Fedora nothing but Firefox works.

1 Like

Appears I am good after this bug fix. Just curious about the /etc/pki/akmods how i find that… and if i need to worry about the above error on

tom@fedora:~$ sudo dnf mark install akmod-nvidia
[sudo] password for tom: 
Unknown argument "install" for command "mark". Add "--help" for more information about the arguments.
tom@fedora:~$ 

it said that without this command that autoremove might screw up my pc, or something like that.

“install” is not a valid subcommand for “dnf mark <subcommand> …”
see “man dnf5-mark”

The only subcommands for “mark” are: user, dependency, weak, group

https://rpmfusion.org/Howto/NVIDIA

I’m getting that command from this walkthru.

below section…

dnf autoremove

In some conditions, the use of "dnf autoremove" command might produce some unwanted side effects against end-users having properly installed the nvidia driver using akmods. This is because the akmod packaging scheme allows the akmod-nvidia to be removed (along theses dependencies, like having a compiler and so on). This behaviour "by design" and allow to minimize the installation set of packages. To prevent autoremove to consider akmod-nvidia as uneeded, you can use the following:

sudo dnf mark install akmod-nvidia

Note that said ‘in some conditions’

First off, autoremove is not normally used.
Second, the ‘mark’ command is only necessary to prevent autoremove from removing packages that you wish to keep. Thus the whole section is not normally applicable to the topic. It applies in special conditions only.

gotcha. thanks.

Ok, just realized a big problem.

Like I said from the beginning, I dual boot.
You told me to do this
https://rpmfusion.org/Howto/Secure%20Boot
but now it is set up to do a secure boot with Fedora. It no longer displays GRUB. I tried to get to my boot menu in Bios, and select Windows. But then I get an error, and it restarts and goes back to Fedora. I tried disabling Secure Boot in Bios, but again it gave me an error, and booted back into Fedora. It seems now I can not get into Windows.

This is a huge problem.

I did disable Secure Boot in Bios, but it still will not let me boot into Windows. Grub never shows up. And if I get into my Boot menu in bios, and select to boot from Windows, it comes up with a blue screen, It gives me 3 seconds, I press any key, and I get the options Reset System, Continue boot, or Always Continue boot, and either Reset system, or Continue boot both restart my computer which loads back into Fedora. There appears to be NO WAY to boot into windows. Where is GRUB???
How do I fix this.

It looks like you may have to start all over. First re-install WIndows 11 and then install Fedora. The Windows and Linux system shares the socalled ESP file system, which you will find in /boot/efi on Fedora. This file system contains important files necessary to boot Windows. It is easy by mistake to wipe out that information when re-installing Fedora.

Above is just a guess what might have happened.

I was able to boot into the USB windows installer after disabling Secure boot on my BIOS. Ok. Will reinstall Windows… then after that try reinstalling Fedora. So when I do the Nvidia drivers next time I can Skip the whole Secure boot part, correct? I don’t want that if it makes it so I can’t boot into Windows. My computer doesn’t leave my apartment, so there is no reason I am worried about someone booting into another OS.

https://rpmfusion.org/Howto/Secure%20Boot

This whole part. Can I just skip this and do the Nvidia drivers without it?

No, the key you have enrolled is no longer valid after a re-install.

I would suggest you remove the old key(s) in this way

mokutil --export
mokutil --delete MOK-0002.der

That asks you to set a on time password like it did when you enrolled the key.
On the next reboot you will be prompted to complete the removal of the key.

If you have enrolled more keys, they will show up as MOK-0003.der, MOK-0004.der and so on. Run mokutil–delete for all of those.

Enrolling MOK keys doesn’t affect the Windows system. If my guess was right, the damage was already done before you did any of the nvidia stuff. If you can boot Windows when Secure Boot is off, you can leave it off and forget about enrolling MOK keys.

ok… but I don’t want to use secure boot. I didn’t realize it would lock me down to just Fedora.

k. cool. do i need to remove the key that i had generated before? just to clear out my system? I did delete that fedora partition and I never did backup that key. Tried to, but Fedora said I didn’t have permission to view the dir… so gave up at that point.

I can try a partition recovery program. Just deleted the partition, it should still be recoverable… if i need that key.

Don’t bother. Just create a new one.

When generating the keys you get two files

/etc/pki/akmods/private/private_key.priv is used to sign the nvidia kernel modules

/etc/pki/akmods/certs/public_key.der is enrolled in the MOK

The key you will use to sign the kernel modules must match the public key you enrolled in the MOK.

Added f41, nvidia