Cannot update Nvidia drivers after installing cuda

I had installed akmod-nvidia and xorg-x11-drv-nvidia from rpmfusion. After installing cuda, now when trying to run dnf update, I get errors of kind: ...from rpmfusion-nonfree-updates is filtered out by modular filtering.
How can I fix that?

The complete output:

sudo dnf update --refresh
cuda-fedora39-x86_64                                                                                                                                                                                                                                                                                                                                   22 kB/s | 3.5 kB     00:00    
Docker CE Stable - x86_64                                                                                                                                                                                                                                                                                                                              65 kB/s | 3.5 kB     00:00    
Fedora 40 - x86_64                                                                                                                                                                                                                                                                                                                                    135 kB/s |  23 kB     00:00    
Fedora 40 openh264 (From Cisco) - x86_64                                                                                                                                                                                                                                                                                                              3.4 kB/s | 989  B     00:00    
Fedora 40 - x86_64 - Updates                                                                                                                                                                                                                                                                                                                          248 kB/s |  22 kB     00:00    
Fedora 40 - x86_64 - Updates                                                                                                                                                                                                                                                                                                                          1.4 MB/s | 1.5 MB     00:01    
google-chrome                                                                                                                                                                                                                                                                                                                                          18 kB/s | 1.3 kB     00:00    
RPM Fusion for Fedora 40 - Free                                                                                                                                                                                                                                                                                                                       6.0 kB/s | 3.6 kB     00:00    
RPM Fusion for Fedora 40 - Free - Updates                                                                                                                                                                                                                                                                                                              17 kB/s | 3.9 kB     00:00    
RPM Fusion for Fedora 40 - Nonfree                                                                                                                                                                                                                                                                                                                     31 kB/s | 6.8 kB     00:00    
RPM Fusion for Fedora 40 - Nonfree - Updates                                                                                                                                                                                                                                                                                                           29 kB/s | 6.9 kB     00:00    
slack                                                                                                                                                                                                                                                                                                                                                 7.9 kB/s | 1.8 kB     00:00    
Visual Studio Code                                                                                                                                                                                                                                                                                                                                     26 kB/s | 1.5 kB     00:00    
Visual Studio Code                                                                                                                                                                                                                                                                                                                                    309 kB/s |  82 kB     00:00    
Dependencies resolved.

 Problem 1: package xorg-x11-drv-nvidia-power-3:550.78-1.fc40.x86_64 from rpmfusion-nonfree-updates requires xorg-x11-drv-nvidia(x86-64) = 3:550.78, but none of the providers can be installed
  - cannot install the best update candidate for package xorg-x11-drv-nvidia-power-3:550.76-1.fc40.x86_64
  - package xorg-x11-drv-nvidia-3:550.78-1.fc40.x86_64 from rpmfusion-nonfree-updates is filtered out by modular filtering
 Problem 2: package akmod-nvidia-3:550.78-1.fc40.x86_64 from rpmfusion-nonfree-updates requires nvidia-kmod-common >= 3:550.78, but none of the providers can be installed
  - cannot install the best update candidate for package akmod-nvidia-3:550.76-1.fc40.x86_64
  - package xorg-x11-drv-nvidia-3:550.78-1.fc40.x86_64 from rpmfusion-nonfree-updates is filtered out by modular filtering
 Problem 3: package nvidia-driver-3:550.54.15-1.fc39.x86_64 from cuda-fedora39-x86_64 conflicts with xorg-x11-drv-nvidia provided by xorg-x11-drv-nvidia-3:550.76-1.fc40.x86_64 from @System
  - package nvidia-driver-3:550.54.15-1.fc39.x86_64 from cuda-fedora39-x86_64 obsoletes xorg-x11-drv-nvidia provided by xorg-x11-drv-nvidia-3:550.76-1.fc40.x86_64 from @System
  - package kmod-nvidia-6.8.7-300.fc40.x86_64-3:550.76-1.fc40.x86_64 from @System requires nvidia-kmod-common >= 3:550.76, but none of the providers can be installed
  - cannot install the best update candidate for package xorg-x11-drv-nvidia-3:550.76-1.fc40.x86_64
  - problem with installed package kmod-nvidia-6.8.7-300.fc40.x86_64-3:550.76-1.fc40.x86_64
  - package xorg-x11-drv-nvidia-3:550.78-1.fc40.x86_64 from rpmfusion-nonfree-updates is filtered out by modular filtering
 Problem 4: cannot install both xorg-x11-drv-nvidia-cuda-libs-3:550.78-1.fc40.x86_64 from rpmfusion-nonfree-updates and xorg-x11-drv-nvidia-cuda-libs-3:550.76-1.fc40.x86_64 from @System
  - package xorg-x11-drv-nvidia-cuda-3:550.76-1.fc40.x86_64 from @System requires xorg-x11-drv-nvidia-cuda-libs(x86-64) = 3:550.76-1.fc40, but none of the providers can be installed
  - cannot install the best update candidate for package xorg-x11-drv-nvidia-cuda-libs-3:550.76-1.fc40.x86_64
  - problem with installed package xorg-x11-drv-nvidia-cuda-3:550.76-1.fc40.x86_64
 Problem 5: package akmod-nvidia-3:550.76-1.fc40.x86_64 from @System requires xorg-x11-drv-nvidia-kmodsrc = 3:550.76, but none of the providers can be installed
  - problem with installed package akmod-nvidia-3:550.76-1.fc40.x86_64
  - cannot install both xorg-x11-drv-nvidia-kmodsrc-3:550.78-1.fc40.x86_64 from rpmfusion-nonfree-updates and xorg-x11-drv-nvidia-kmodsrc-3:550.76-1.fc40.x86_64 from @System
  - package akmod-nvidia-3:550.78-1.fc40.x86_64 from rpmfusion-nonfree-updates requires nvidia-kmod-common >= 3:550.78, but none of the providers can be installed
  - cannot install the best update candidate for package xorg-x11-drv-nvidia-kmodsrc-3:550.76-1.fc40.x86_64
  - package xorg-x11-drv-nvidia-3:550.78-1.fc40.x86_64 from rpmfusion-nonfree-updates is filtered out by modular filtering
 Problem 6: package xorg-x11-drv-nvidia-power-3:550.76-1.fc40.x86_64 from @System requires xorg-x11-drv-nvidia(x86-64) = 3:550.76, but none of the providers can be installed
  - package xorg-x11-drv-nvidia-3:550.76-1.fc40.x86_64 from @System requires libnvidia-glcore.so.550.76()(64bit), but none of the providers can be installed
  - package xorg-x11-drv-nvidia-3:550.76-1.fc40.x86_64 from @System requires libnvidia-tls.so.550.76()(64bit), but none of the providers can be installed
  - package xorg-x11-drv-nvidia-3:550.76-1.fc40.x86_64 from @System requires xorg-x11-drv-nvidia-libs(x86-64) = 3:550.76-1.fc40, but none of the providers can be installed
  - problem with installed package xorg-x11-drv-nvidia-power-3:550.76-1.fc40.x86_64
  - package nvidia-driver-libs-3:550.54.15-1.fc39.x86_64 from cuda-fedora39-x86_64 conflicts with xorg-x11-drv-nvidia-libs provided by xorg-x11-drv-nvidia-libs-3:550.76-1.fc40.x86_64 from @System
  - package nvidia-driver-libs-3:550.54.15-1.fc39.x86_64 from cuda-fedora39-x86_64 obsoletes xorg-x11-drv-nvidia-libs provided by xorg-x11-drv-nvidia-libs-3:550.76-1.fc40.x86_64 from @System
  - package xorg-x11-drv-nvidia-power-3:550.78-1.fc40.x86_64 from rpmfusion-nonfree-updates requires xorg-x11-drv-nvidia(x86-64) = 3:550.78, but none of the providers can be installed
  - cannot install the best update candidate for package xorg-x11-drv-nvidia-libs-3:550.76-1.fc40.x86_64
  - package xorg-x11-drv-nvidia-3:550.78-1.fc40.x86_64 from rpmfusion-nonfree-updates is filtered out by modular filtering
======================================================================================================================================================================================================================================================================================================================================================================================
 Package                                                                                                Architecture                                                                 Version                                                                                    Repository                                                                                       Size
======================================================================================================================================================================================================================================================================================================================================================================================
Installing:
 kernel                                                                                                 x86_64                                                                       6.8.8-300.fc40                                                                             updates                                                                                         159 k
 kernel-modules                                                                                         x86_64                                                                       6.8.8-300.fc40                                                                             updates                                                                                          63 M
 kernel-modules-extra                                                                                   x86_64                                                                       6.8.8-300.fc40                                                                             updates                                                                                         2.8 M
Upgrading:
 gstreamer1                                                                                             x86_64                                                                       1.22.12-1.fc40                                                                             updates                                                                                         1.4 M
 gstreamer1-plugin-libav                                                                                x86_64                                                                       1.22.12-1.fc40                                                                             updates                                                                                         204 k
 gstreamer1-plugin-openh264                                                                             x86_64                                                                       1.22.12-1.fc40                                                                             updates                                                                                          37 k
 gstreamer1-plugins-bad-free                                                                            x86_64                                                                       1.22.12-1.fc40                                                                             updates                                                                                         2.5 M
 gstreamer1-plugins-bad-free-libs                                                                       x86_64                                                                       1.22.12-1.fc40                                                                             updates                                                                                         769 k
 gstreamer1-plugins-base                                                                                x86_64                                                                       1.22.12-1.fc40                                                                             updates                                                                                         2.2 M
 gstreamer1-plugins-good                                                                                x86_64                                                                       1.22.12-1.fc40                                                                             updates                                                                                         2.3 M
 gstreamer1-plugins-good-gtk                                                                            x86_64                                                                       1.22.12-1.fc40                                                                             updates                                                                                          33 k
 gstreamer1-plugins-good-qt                                                                             x86_64                                                                       1.22.12-1.fc40                                                                             updates                                                                                          68 k
 gstreamer1-plugins-good-qt6                                                                            x86_64                                                                       1.22.12-1.fc40                                                                             updates                                                                                          43 k
 gstreamer1-plugins-ugly-free                                                                           x86_64                                                                       1.22.12-1.fc40                                                                             updates                                                                                         279 k
 kernel-devel-matched                                                                                   x86_64                                                                       6.8.8-300.fc40                                                                             updates                                                                                         159 k
 swtpm                                                                                                  x86_64                                                                       0.8.1-7.fc40                                                                               updates                                                                                          29 k
 swtpm-libs                                                                                             x86_64                                                                       0.8.1-7.fc40                                                                               updates                                                                                          50 k
 swtpm-selinux                                                                                          noarch                                                                       0.8.1-7.fc40                                                                               updates                                                                                          21 k
 swtpm-tools                                                                                            x86_64                                                                       0.8.1-7.fc40                                                                               updates                                                                                         111 k
Installing dependencies:
 kernel-core                                                                                            x86_64                                                                       6.8.8-300.fc40                                                                             updates                                                                                          17 M
 kernel-devel                                                                                           x86_64                                                                       6.8.8-300.fc40                                                                             updates                                                                                          20 M
 kernel-modules-core                                                                                    x86_64                                                                       6.8.8-300.fc40                                                                             updates                                                                                          35 M
Skipping packages with conflicts:
(add '--best --allowerasing' to command line to force their upgrade):
 nvidia-driver                                                                                          x86_64                                                                       3:550.54.15-1.fc39                                                                         cuda-fedora39-x86_64                                                                            126 M
 nvidia-driver-libs                                                                                     x86_64                                                                       3:550.54.15-1.fc39                                                                         cuda-fedora39-x86_64                                                                            134 M
 xorg-x11-drv-nvidia-cuda-libs                                                                          x86_64                                                                       3:550.78-1.fc40                                                                            rpmfusion-nonfree-updates                                                                        41 M
 xorg-x11-drv-nvidia-kmodsrc                                                                            x86_64                                                                       3:550.78-1.fc40                                                                            rpmfusion-nonfree-updates                                                                        44 M
Skipping packages with broken dependencies:
 akmod-nvidia                                                                                           x86_64                                                                       3:550.78-1.fc40                                                                            rpmfusion-nonfree-updates                                                                        40 k
 xorg-x11-drv-nvidia-power                                                                              x86_64                                                                       3:550.78-1.fc40                                                                            rpmfusion-nonfree-updates                                                                       102 k

Transaction Summary
======================================================================================================================================================================================================================================================================================================================================================================================
Install   6 Packages
Upgrade  16 Packages
Skip      6 Packages

Total download size: 148 M
Is this ok [y/N]: n
Operation aborted.

Removed selinux

Added f39, f40

The conflicts says the packages are mismatched f39 & f40. . . Let look over the errors once more.

Also, what do you need from the fedora modular repo? Is it required?

This is your key.
Those packages from cuda-fedora39 are causing the conflict and the modular filtering

You must remove all packages installed from cuda-fedora39, which can be identified with
dnf list installed | grep cuda-fedora
then disable the module entry that they create with
sudo dnf module disable nvidia-driver
then disable the cuda-fedora39 repo with
sudo dnf config-manager --disable cuda-fedora39
then reinstall the drivers from rpmfusion with
sudo dnf reinstall akmod-nvidia

For the great majority of users installing the xorg-x11-drv-nvidia-cuda package from rpmfusion provides all the cuda support that is needed and also is tweaked to work with the nvidia packages from rpmfusion.

The choice here is to use the cuda-fedoraXX repo or the rpmfusion repo, but the packages installed when trying both cause conflicts and do not work together

2 Likes

Thanks @computersavvy
That fixed the problem

1 Like