[Fedora 34] Issues Installing Nvidia Drivers

Hello everyone, I’ve recently tried to replace my Ubuntu version with Fedora 34.

The installation worked fine, however I cannot seem to get the Nvidia driver running.
After seeing this being an issue on multiple threads on Nvidia’s forum, I checked and secure boot is disabled.

Before each of the guides, I installed a fresh version of Fedora 34, ran sudo dnf update and switched to Xorg by changing /etc/gdm/custom.conf's [daemon] part to this:

[daemon]
WaylandEnable=false
DefaultSession=gnome-xorg.desktop

I tried these guides:
https://rpmfusion.org/Howto/NVIDIA

sudo nvautoinstall --rpmadd
sudo nvautoinstall --driver

After each of these, I was able to reboot successfully. The driver did not function. It wasn’t possible to open the settings application and trying to execute nvidia-settings resulted in different errors:
ERROR: NVIDIA driver is not loaded
ERROR: Unable to load info from any available system
ERROR: Unable to find display on any available system

Both before install:

Screenfetch

Neofetch

I also heard about the driver having issues with 5.11 kernels. Is this true?
I attempted to use another kernel, however that didn’t end up working (getting the kernel to compile).
Another idea was to force the kernel module (?) to force build, however there were some dependencies missing I couldn’t find.

Any help is highly appreciated. Please let me know if additional information is required and where to get it, I am quite new to Linux, and Fedora, so I’m not very familiar with the system.
Thank you.

I suggest you remove all the installed nvidia drivers from all the different sources, as some of them don’t play well with others since they come from different sources.
A simple "sudo dnf erase ‘*nvidia*’ " will handle that.

Then repeat the install using only the procedure from t0xic0der’s copr repo.

Following that you should reboot again and everything should just work.

The first link you followed is wrong since it has you install the kmod-nvidia package, which is only needed on certain machines. The correct procedure installs the akmod-nvidia package so your system can rebuild the driver with every kernel update.

The second (if not true then false) I have never used in the last 10 years so I cannot vouch for it’s accuracy.

I have repeatedly used the procedure with the copr repo and can vouch that it works well 100% of the time as long as you do not have conflicting packages that interfere. Potential interference is why I suggested you remove everything related then repeat the install with that procedure only. The end result of doing that is you will have the rpmfusion free and non-free repos enabled and routine updates will keep the drivers current as the drivers and kernels are updated.

Note: You also need to verify that the card you are using is supported by the current nvidia driver. Most cards today are, but older ones need either the 340 or 390 drivers and are difficult to use with the current kernels.

I’ve used this repo for the past 5yrs with my Nvidia build, and it updates with no problem. If you would like to try, it does all you need and stays current with development of the driver.

I used to use this repo before i switched. I had too many issues and it was all manual.

Thanks for all the suggestions.

I tried using the nvautoinstall script but that didn’t end up working. ERROR: Unable to load info from any available system.

This was pointed out in a comment on the post, so I tried it with akmod instead of kmod.

The repo didn’t have any Nvidia stuff in the gnome software store as described. They also state that this is the case for unsupported cards, but I am running a RTX 20-Series card so I think it’d be fair to assume they still receive support. The installation per terminal, as stated below the gnome software part, did not work either. It also refuses to load with ERROR: Unable to load info from any available system.

Note that these messages are coming from nvidia-settings, I have no clue where else how to to verify if the driver is running etc.

Relying on the gnome software store is good for some things but those of us who really take care of our systems use dnf and do not rely on the whims of those who try to meet the needs of the average user.

This is why I recommend you use the command line.

To find out if it is already running simply run lsmod | grep nvidia and see the output. If the nvidia driver is loading and running it will return something like this

# lsmod | grep nvidia
nvidia_drm             69632  9
nvidia_modeset       1187840  16 nvidia_drm
nvidia_uvm           1163264  0
nvidia              34988032  899 nvidia_uvm,nvidia_modeset
drm_kms_helper        290816  1 nvidia_drm
drm                   626688  12 drm_kms_helper,nvidia_drm

If it returns nothing then the driver is not loaded and running.

When running lsmod | grep nvidia the output is this:

i2c_nvidia_gpu         16384  0

After I just installed the driver through nvautoinstall I received an error message (after reboot), stating that an error occurred within “kernel-core”.

Under Reports this got linked: ABRT Analytics - Report #35739 - kernel in __switch_to. I couldn’t find a way to export any information into a file from the interface, therefore I can’t really attach a file or something on this.

Might this kernel-core error and the driver not running be related somehow?

Yes, they are probably related. With secure boot active it prevents the kernel from loading “tainted” modules.

I think if you go into bios and disable secure boot that the errors will go away and the modules will load so the nvidia driver is active.

This happens because the nvidia driver is proprietary and the kernel does not see a valid signature for the module so it won’t load the driver until either it has a valid signature or secure boot is disabled.

Hey, secure boot is disabled.

This was always pointed out religiously so I verified it and it’s disabled.
I did run nvidia-bug-report.sh and it stated secure boot to be disabled.

Crawling through the file revealed nothing except xset not working even though the package, xorg-x11-server-utils, is installed.

Shell Output

unknown2

No info online on this command. What’s xset? Is it critical for it to function for the driver?

Apparently you have something other than the drivers from rpmfusion installed. I do not have that module listed as you can see above.
Please post the output of "sudo dnf list installed ‘*nvidia*’ ". That will tell us what packages you actually have currently installed for the nvidia drivers.

That also makes me wonder if you have all the xorg packages installed for nvidia but we will see with the output of the above.

You also missed the info that the “xset” package was not installed.

The xorg utilities were split up.

You’ll have to install it.

https://linux.die.net/man/1/xset

Running sudo dnf list installed ‘*nvidia*’ had this output:
image

The xorg utilities were split up.

That makes sense now. Installing the xset package worked.

That list tells me you do not have all the required packages installed and that the akmod-nvidia package was not able to build the kernel modules.
Note that my list below has a kmod-nvidia package for each kernel installed. Those kmod-nvidia packages are compiled from the akmod-nvidia package so it is likely you need to install the kernel-devel & kernel-headers packages as well. I would also suggest you install the other xorg packages in my list that you are missing. While I realize there are some differences between F33 and F34 the basics are still the same in that all the tools are needed before you can get the system to auto-build the nvidia module for you.

akmod-nvidia.x86_64                                   3:465.31-1.fc33            @rpmfusion-nonfree-updates
kmod-nvidia-5.11.21-200.fc33.x86_64.x86_64            3:465.31-1.fc33            @@commandline             
kmod-nvidia-5.12.12-200.fc33.x86_64.x86_64            3:465.31-1.fc33            @@commandline             
kmod-nvidia-5.12.13-200.fc33.x86_64.x86_64            3:465.31-1.fc33            @@commandline             
kmod-nvidia-5.12.8-200.fc33.x86_64.x86_64             3:465.31-1.fc33            @@commandline             
kmod-nvidia-5.12.9-200.fc33.x86_64.x86_64             3:465.31-1.fc33            @@commandline             
nvidia-modprobe.x86_64                                3:465.31-1.fc33            @rpmfusion-nonfree-updates
nvidia-persistenced.x86_64                            3:465.31-1.fc33            @rpmfusion-nonfree-updates
nvidia-settings.x86_64                                3:465.31-1.fc33            @rpmfusion-nonfree-updates
nvidia-xconfig.x86_64                                 3:465.31-1.fc33            @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia.x86_64                            3:465.31-1.fc33            @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-cuda.x86_64                       3:465.31-1.fc33            @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-cuda-libs.x86_64                  3:465.31-1.fc33            @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-devel.x86_64                      3:465.31-1.fc33            @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-kmodsrc.x86_64                    3:465.31-1.fc33            @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-libs.x86_64                       3:465.31-1.fc33            @rpmfusion-nonfree-updates

These packages are installed now:

Rebooting didn’t fix the issue. Do I have to manually build the module? If so, what do I need in order to do that?

Did you verify that you have kernel-devel and kernel-headers installed?

Try a reinstall of akmod-nvidia after verifying the above. The akmod-nvidia package should automatically build the needed nvidia modules for your kernel when it is installed.

The other thing to check is the kernel command line from grub during boot. If not properly formatted it can fail to install the nvidia module and instead fall back to the nouveau driver.

Mine is

GRUB_CMDLINE_LINUX="rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1 rd.lvm.lv=fedora/root rhgb quiet"

and can be found in /etc/default/grub and also seen by booting with the grub menu and pressing the “e” key while the grub menu is displayed during boot.

If yours is not similar with the nouveau drivers blacklisted and the nvidia driver activated then that also could cause the failure to load the proper driver.

Installing all the nvidia packages should have done all the needed config but checking may reveal where it is failing.

If you have not recently updated the kernel that also could be the issue because I am not sure that grub automatically updates the grub.cfg file with just the driver install. I know it does with a kernel update.

Hey, GRUB was indeed the issue.

I should’ve included this critical information but I didn’t see it as relevant. I was booting into Fedora using Ubutu’s GRUB. That GRUB did not have the updated configuration. When booting into Fedora’s GRUB, everything worked fine. (I created two GRUB partitions because I am not sure it’s possible to share one and I didn’t want to destroy Ubuntu’s.)

Long story short, booting into Fedora’s GRUB worked.
That solved the issue.

Thank you very much for your help and time.

BTW, for future reference, a single efi partition works. The only interference is dependent upon which OS controls the grub config. It is possible to set it up to allow only one to control the grub config even with a single efi partition but I have not had that issue since I use fedora as my main OS and all others are in VMs.

1 Like