Akmod-nvidia error: conflicting requests

I am trying to repair a broken nvidia module from scratch. I’ve managed to remove the offending repo, cuda-repo-fedora34… and remove all nvidia packages (I think)

rpm -qa \*nvidia\*

gives no output, and my repolist is

repo id                               repo name
WineHQ                                WineHQ packages
code                                  Visual Studio Code
fedora                                Fedora 35 - x86_64
fedora-cisco-openh264                 Fedora 35 openh264 (From Cisco) - x86_64
google-chrome                         google-chrome
rpmfusion-free                        RPM Fusion for Fedora 35 - Free
rpmfusion-free-updates                RPM Fusion for Fedora 35 - Free - Updates
rpmfusion-nonfree                     RPM Fusion for Fedora 35 - Nonfree
rpmfusion-nonfree-nvidia-driver       RPM Fusion for Fedora 35 - Nonfree - NVIDIA Driver
rpmfusion-nonfree-steam               RPM Fusion for Fedora 35 - Nonfree - Steam
rpmfusion-nonfree-updates             RPM Fusion for Fedora 35 - Nonfree - Updates
slack                                 slack
sublime-text                          Sublime Text - x86_64 - Stable
updates                               Fedora 35 - x86_64 - Updates

Now to install the akmod

[bharland@bigbear ~]$ sudo dnf install akmod-nvidia
[sudo] password for bharland: 
Last metadata expiration check: 2:16:50 ago on Thu 18 Nov 2021 05:52:12 PM.
Error: 
 Problem: conflicting requests
  - package akmod-nvidia-3:470.74-1.fc35.x86_64 requires nvidia-kmod-common >= 3:470.74, but none of the providers can be installed
  - package akmod-nvidia-3:495.44-1.fc35.x86_64 requires nvidia-kmod-common >= 3:495.44, but none of the providers can be installed
  - package xorg-x11-drv-nvidia-3:470.74-1.fc35.x86_64 is filtered out by modular filtering
  - package xorg-x11-drv-nvidia-3:495.44-4.fc35.x86_64 is filtered out by modular filtering
(try to add '--skip-broken' to skip uninstallable packages)
[bharland@bigbear ~]$ sudo dnf remove *nvidia*
Error: 
 Problem: The operation would result in removing the following protected packages: kernel-core
(try to add '--skip-broken' to skip uninstallable packages)

I can’t seem to find answers in the forums/internet – any help much appreciated! Sorry if I neglected to include helpful information – I’m on Fedora 35, Linux bigbear 5.14.17-301.fc35.x86_64 #1 SMP Mon Nov 8 13:57:43 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Or maybe this helps

[bharland@bigbear ~]$ sudo dnf list kernel* --showduplicates
Last metadata expiration check: 0:03:09 ago on Thu 18 Nov 2021 05:52:12 PM.
Installed Packages
kernel.x86_64                                   5.14.16-201.fc34            @updates
kernel.x86_64                                   5.14.17-201.fc34            @updates
kernel.x86_64                                   5.14.17-301.fc35            @updates
kernel-core.x86_64                              5.14.16-201.fc34            @updates
kernel-core.x86_64                              5.14.17-201.fc34            @updates
kernel-core.x86_64                              5.14.17-301.fc35            @updates
kernel-devel.x86_64                             5.14.16-201.fc34            @updates
kernel-devel.x86_64                             5.14.17-201.fc34            @updates
kernel-devel.x86_64                             5.14.17-301.fc35            @updates
kernel-headers.x86_64                           5.14.9-300.fc35             @fedora 
kernel-modules.x86_64                           5.14.16-201.fc34            @updates
kernel-modules.x86_64                           5.14.17-201.fc34            @updates
kernel-modules.x86_64                           5.14.17-301.fc35            @updates
kernel-modules-extra.x86_64                     5.14.16-201.fc34            @updates
kernel-modules-extra.x86_64                     5.14.17-201.fc34            @updates
kernel-modules-extra.x86_64                     5.14.17-301.fc35            @updates
kernel-srpm-macros.noarch                       1.0-6.fc35                  @fedora 
Available Packages
kernel.x86_64                                   5.14.10-300.fc35            fedora  
kernel.x86_64                                   5.14.17-301.fc35            updates 
kernel-core.x86_64                              5.14.10-300.fc35            fedora  
kernel-core.x86_64                              5.14.17-301.fc35            updates 
kernel-cross-headers.x86_64                     5.14.9-300.fc35             fedora  
kernel-debug.x86_64                             5.14.10-300.fc35            fedora  
kernel-debug.x86_64                             5.14.17-301.fc35            updates 
kernel-debug-core.x86_64                        5.14.10-300.fc35            fedora  
kernel-debug-core.x86_64                        5.14.17-301.fc35            updates 
kernel-debug-devel.x86_64                       5.14.10-300.fc35            fedora  
kernel-debug-devel.x86_64                       5.14.17-301.fc35            updates 
kernel-debug-devel-matched.x86_64               5.14.10-300.fc35            fedora  
kernel-debug-devel-matched.x86_64               5.14.17-301.fc35            updates 
kernel-debug-modules.x86_64                     5.14.10-300.fc35            fedora  
kernel-debug-modules.x86_64                     5.14.17-301.fc35            updates 
kernel-debug-modules-extra.x86_64               5.14.10-300.fc35            fedora  
kernel-debug-modules-extra.x86_64               5.14.17-301.fc35            updates 
kernel-debug-modules-internal.x86_64            5.14.10-300.fc35            fedora  
kernel-debug-modules-internal.x86_64            5.14.17-301.fc35            updates 
kernel-devel.x86_64                             5.14.10-300.fc35            fedora  
kernel-devel.x86_64                             5.14.17-301.fc35            updates 
kernel-devel-matched.x86_64                     5.14.10-300.fc35            fedora  
kernel-devel-matched.x86_64                     5.14.17-301.fc35            updates 
kernel-doc.noarch                               5.14.10-300.fc35            fedora  
kernel-doc.noarch                               5.14.17-301.fc35            updates 
kernel-headers.i686                             5.14.9-300.fc35             fedora  
kernel-headers.x86_64                           5.14.9-300.fc35             fedora  
kernel-modules.x86_64                           5.14.10-300.fc35            fedora  
kernel-modules.x86_64                           5.14.17-301.fc35            updates 
kernel-modules-extra.x86_64                     5.14.10-300.fc35            fedora  
kernel-modules-extra.x86_64                     5.14.17-301.fc35            updates 
kernel-modules-internal.x86_64                  5.14.10-300.fc35            fedora  
kernel-modules-internal.x86_64                  5.14.17-301.fc35            updates 
kernel-rpm-macros.noarch                        197-1.fc35                  fedora  
kernel-rpm-macros.noarch                        199-1.fc35                  updates 
kernel-srpm-macros.noarch                       1.0-6.fc35                  fedora  
kernel-tools.x86_64                             5.14.9-300.fc35             fedora  
kernel-tools-libs.i686                          5.14.9-300.fc35             fedora  
kernel-tools-libs.x86_64                        5.14.9-300.fc35             fedora  
kernel-tools-libs-devel.i686                    5.14.9-300.fc35             fedora  
kernel-tools-libs-devel.x86_64                  5.14.9-300.fc35             fedora  
kernelshark.x86_64                              1:1.3-3.fc35                fedora  

If you do the following it should remove the conflicts.

Note that the 495 driver has shown some issues for certain systems but for me it works. You can select which driver to install by doing the following. If you want the 495 driver then insert it where my command has the 470.44 portion.
sudo dnf install akmod-nvidia*470.44* nvidia*470.44* xorg-x11-drv-nvidia*470.44*
My understanding is that the 495 driver contains some changes to make it more compatible with wayland but if you do not need wayland then the 470 driver is quite adequate.

To keep the 470 driver and not have it replaced with the 495 driver you will need to add a line to /etc/dnf/dnf.conf excludepkg=*nvidia*

1 Like

Many thanks! Ok:

[bharland@bigbear ~]$ sudo dnf install akmod-nvidia*470.44* nvidia*470.44* xorg-x11-drv-nvidia*470.44*
[sudo] password for bharland: 
Last metadata expiration check: 3:04:53 ago on Fri 19 Nov 2021 05:57:38 AM.
No match for argument: akmod-nvidia*470.44*
No match for argument: nvidia*470.44*
No match for argument: xorg-x11-drv-nvidia*470.44*
Error: Unable to find a match: akmod-nvidia*470.44* nvidia*470.44* xorg-x11-drv-nvidia*470.44*

Ok, that tells me you do not have the rpmfusion-free and rpmfusion-nonfree repos enabled.
I do however assume you have the rpmfusion-nonfree-nvidia-driver repo enabled.

Try the same with this change.
sudo dnf install akmod-nvidia*470xx* nvidia*470xx* xorg-x11-drv-nvidia*470xx*

That appears to have worked. I’m curious about the difference between rpmfusion-nonfree and rpmfusion-nonfree-nvidia-driver – is it best practise to disable the nvidia-driver one? Does appearing in dnf repolist not assure us that they are enabled?

Minor concern: nvidia-smi isn’t installed and dnf info --installed ‘nvidia’ returns no matching packages. May I ignore this?

nvidia-smi comes from the additional packages in rpmfusion-nonfree that are not also in rpmfusion-nonfree-nvidia-driver.

If you do sudo dnf list nvidia*470* you will see a listing of installed packages and available packages for the 470 driver. One of those that are available but not installed is the specific one needed for nvidia-smi.
nvidia-persistenced, nvidia-modprobe, and nvidia-xconfig I think are the ones that are missing.

1 Like

You don’t need the rpmfusion-nonfree-nvidia-driver repository if you have the full rpmfusion-nonfree (and updates) repositories.

Also don’t exclude nvidia packages, this usually not needed and is likely to cause the conflicts you are experiencing.

nvidia-smi is provided by xorg-x11-drv-nvidia-cuda

This is the official way to install CUDA and RPM Fusion:
https://rpmfusion.org/Howto/CUDA

If you feel lost, uses the “fedy” program.

Thanks! I did:

sudo dnf config-manager --set-disabled rpmfusion-nonfree-nvidia-driver

I removed the line from /etc/dnf/dnf.conf

sudo dnf module disable nvidia-driver

I couldn’t dnf install akmod-nvidia, but was able to do

sudo dnf install akmod-nvidia*470xx* nvidia*470xx* xorg-x11-drv-nvidia*470xx*

None of the commands suggested in the official howto/CUDA worked, but nvidia-smi now works for some mysterious reason.

The CUDA howto assumes running the mainline driver, but it’s well possible that you use the 470xx serie. Then just follow this Howto/NVIDIA - RPM Fusion

Switching from the 470xx serie to the main serie can be more difficult as it’s well possible that some package are left behind blocking the other serie installation. But the general idea is to remove the driver and then install the other serie.

Hope this helps.