Dkms NVidia on Fedora 41 not working

When trying to install the nvidia driver on Fedora 41 via dkms, which didn’t work, and after seeing the error message at startup asking me to check more information in /var/lib/dkms/nvidia/560.35.05/build/make.log, I noticed several warnings about “suggest braces around empty body in an ‘if’ statement” and others about “no previous prototype”, suggesting that some functions were not declared before being used.
Towards the end, in the nvidia-drm compilation section, there is an error:


error: ‘const struct drm_mode_config_funcs’ has no member named ‘output_poll_changed’

207 | .output_poll_changed = nv_drm_output_poll_changed,

| ^~~~~~~~~~~~~~~~~~~

This suggests that the drm_mode_config_funcs structure no longer has the output_poll_changed member in kernel 6.12.11-200.fc41.x86_64. This has probably been changed or removed in newer versions of the Linux kernel. The NVIDIA driver 560.35.05 may not be compatible with this specific kernel version.

How can I uninstall it if there are remnants left and fix this resulting in a clean install of the NVidia driver?

560.35.05 is outdated as you’ve found out and will not compile the kernel modules.

https://rpmfusion.org/Howto/NVIDIA?highlight=(\bCategoryHowto\b)#Uninstall_the_NVIDIA_driver

Rpmfusion has 565.77 for F41 or 570.86.16 for rawhide/F42 available, which you can also install if you want.

1 Like

For Fedore recommended way, RPMFusion, only akmods is available.
To use DKMS with NVIDIA you’ll have to switch to Negativo17 repository. One that has the option to choose between akmod or dkms and choose to switch between proprietary and open drivers… as far as know.

1 Like

If the nvidia driver appears to need dkms then it is apparent that you installed from some source other than rpmfusion.

Please remove the nvidia driver installed that way then reinstall it from the rpmfusion repo. The version from rpmfusion uses akmods instead of dkms, and also is tweaked/tested to perform & install properly with fedora. Those drivers are also properly updated when there are related updates in fedora.

Very very few users who install the nvidia drivers from rpmfusion ever report problems while those installing from nvidia or INTTF or negativo17 do often have problems.

I uninstalled it, cleared the cache and then used the command: sudo dnf install akmod-nvidia xorg-x11-drv-nvidia.

I got the following error in the terminal:

The package “akmod-nvidia-3:560.35.03-1.fc41.x86_64” is already installed.

The argument ‘xorg-x11-drv-nvidia’ only matches excluded packages.
Problem: package akmod-nvidia-3:565.77-1.fc41.x86_64 from rpmfusion-nonfree-updates requires nvidia-kmod-common >= 3:565.77, but none of the providers can be installed

  • can’t install the best candidate for the task
  • package xorg-x11-drv-nvidia-3:565.77-3.fc41.x86_64 from rpmfusion-nonfree-updates is excluded by exclusion filtering
  • package xorg-x11-drv-nvidia-3:565.77-3.fc41.x86_64 from rpmfusion-nonfree-nvidia-driver is excluded by exclusion filtering

I checked the files in /etc/yum/repos.d and there are no lines with exclude=

Please show us the output of dnf repolist and dnf list --installed \*nvidia\* (as preformatted text with the </> button.)

(I have been out of touch for a few days.)

repo id                                                repo name                                                           
copr:copr.fedorainfracloud.org:phracek:PyCharm         Copr repo for PyCharm owned by phracek                              
cuda-fedora39-x86_64                                   cuda-fedora39-x86_64                                                
docker-ce-stable                                       Docker CE Stable - x86_64                                           
fedora                                                 Fedora 41 - x86_64                                                  
fedora-cisco-openh264                                  Fedora 41 openh264 (From Cisco) - x86_64                            
google-chrome                                          google-chrome                                                       
metasploit                                             Metasploit                                                          
opera                                                  Opera packages                                                      
pgAdmin4                                               pgadmin4                                                            
protonvpn-fedora-stable                                ProtonVPN Fedora Stable repository                                  
rpmfusion-free                                         RPM Fusion for Fedora 41 - Free                                     
rpmfusion-free-updates                                 RPM Fusion for Fedora 41 - Free - Updates                           
rpmfusion-nonfree                                      RPM Fusion for Fedora 41 - Nonfree                                  
rpmfusion-nonfree-nvidia-driver                        RPM Fusion for Fedora 41 - Nonfree - NVIDIA Driver                  
rpmfusion-nonfree-steam                                RPM Fusion for Fedora 41 - Nonfree - Steam                          
rpmfusion-nonfree-updates                              RPM Fusion for Fedora 41 - Nonfree - Updates                        
rpmsphere                                              RPM Sphere - Basearch                                               
rpmsphere-noarch                                       RPM Sphere - Noarch                                                 
updates                                                Fedora 41 - x86_64 - Updates                                        
warpdotdev                                             warpdotdev                           
akmod-nvidia.x86_64                3:560.35.03-1.fc41 rpmfusion-nonfree
kmod-nvidia-latest-dkms.x86_64     3:560.35.05-1.fc39 cuda-fedora39-x86_64
nvidia-kmod-common.noarch          3:560.35.05-1.fc39 cuda-fedora39-x86_64
nvidia-modprobe.x86_64             3:560.35.05-1.fc39 cuda-fedora39-x86_64
xorg-x11-drv-nvidia-kmodsrc.x86_64 3:560.35.03-5.fc41 rpmfusion-nonfree

I see that you seem stuck with the 560 driver which is the latest available from the cuda-fedora39-x86_64 repo.

It is also mostly known that the 560 driver does not seem to perform appropriately with the latest kernels, and Fedora 41 uses the 6.12.15 kernel at present.

The 560 driver does not properly support the nvidia 3000 series and newer GPUs, especially on fedora.

I repeat my suggestion from above to remove the nvidia drivers installed from the nvidia owned repo (cuda-fedora39-x86_64) and install the newer drivers only from rpmfusion. (The latest kernel for f39 was one of the 6.10 kernels AFAIK.)

  1. sudo dnf remove \*nvidia\* --exclude nvidia-gpu-firmware
  2. sudo dnf module disable nvidia-driver
  3. sudo dnf config-manager setopt cuda-fedora39-x86_64.enabled=0
  4. sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda (verify that the nvidia packages being installed are coming only from one of the rpmfusion-nonfree… repos)

It seems that 99+% of all users who do this are happy with the results and I have seen no reports of anyone who reverts back to the nvidia owned repos.

1 Like

I confirm that these 4 steps did work for me.
Thank you

Glad to know that the information helped :+1: