I have mistakes in "sudo akmods --force" and "sudo dnf install nvidia-driver kernel-devel akmod-nvidia"

when I enter the terminal sudo akmods --force I get a failed string:
directories are missing:
/usr/src/kernels/6.0.8-xm1.0.fc38.x86_64/
/lib/modules/6.0.8-xm1.0.fc38.x86_64/build/Is the correct kernel-devel package installed?

when i ender the terminal sudo dnf install nvidia-driver kernel-devel akmod-nvidia I get a failed string :
Error:
Problem: Problem with xorg-x11-drv-nvidia-power-3: 545.29.06-2.fc39.x86_64 installed

  • Package xorg-x11-drv-nvidia-power-3:545.29.06-2.fc39.x86_64 from @System requires xorg-x11-drv-nvidia(x86-64) = 3:545.29.06, but neither vendor can be installed
  • Package xorg-x11-drv-nvidia-power-3:545.29.06-2.fc39.x86_64 from rpmfusion-nonfree-nvidia-driver requires xorg-x11-drv-nvidia(x86-64) = 3:545.29.06, but neither supplier can be installed
  • Package xorg-x11-drv-nvidia-power-3:545.29.06-2.fc39.x86_64 from rpmfusion-nonfree-updates requires xorg-x11-drv-nvidia(x86-64) = 3:545.29.06, but neither vendor can be installed
  • package nvidia-driver-3:550.54.14-1.fc39.x86_64 from cuda-fedora39-x86_64 conflicts with xorg-x11-drv-nvidia, provided by xorg-x11-drv-nvidia-3:545.29.06-2.
  • package nvidia-driver-3:550.54.14-1.fc39.x86_64 from cuda-fedora39-x86_64 obsoletes xorg-x11-drv-nvidia, provided by xorg-x11-drv-nvidia-3:545.29.06-2.fc39.x86_64 of @System
  • Package xorg-x11-drv-nvidia-power-3:535.129.03-2.fc39.x86_64 from rpmfusion-nonfree requires xorg-x11-drv-nvidia(x86-64) = 3:535.129.03, but none of the providers can be installed
  • Android
  • xorg-x11-drv-nvidia-3:535.129.03-2.fc39.x86_64 from rpmfusion-nonfree is filtered by modular filtering
  • Package xorg-x11-drv-nvidia-3:545.29.06-2.fc39.x86_64 from rpmfusion-nonfree-nvidia-driver is filtered with modular filtering
  • xorg-x11-drv-nvidia-3:545.29.06-2.fc39.x86_64 from rpmfusion-nonfree-updates is filtered with modular filtering
    (try adding «-allowerasing» to the command line to replace conflicting packages or «-skip-broken» to skip deleted packages)

This generally happens when drives have previously been installed from a different source, Notably from one of the cuda-fedora repos which installs the driver in modular format. Fedora 39 no longer supports modular structures in their repos…

I am not sure where you got the syntax for that command but it is incorrect and using the proper syntax may work well. sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda
Try using the correct command before doing anything else.

If you still see the same error then we need to address the modular issue head on.

akmod-nvidia-3:545.29.06-3.fc39.x86_64 is already installed.
All matches are filtered for argument: xorg-x11-drv-nvidia-cuda
Error: No match found: xorg-x11-drv-nvidia-cuda

please show us the output of dnf repolist , dnf list installed \*nvidia\* and uname -a

Also add dnf list installed \*cuda\*.

dnf repolist :

copr:copr.fedorainfracloud.org:phracek:PyCharm        Copr repo for PyCharm owned by phracek
copr:copr.fedorainfracloud.org:rmnscnce:kernel-xanmod Copr repo for kernel-xanmod owned by rmnscnce
cuda-fedora39-x86_64                                  cuda-fedora39-x86_64
fedora                                                Fedora 39 - x86_64
fedora-cisco-openh264                                 Fedora 39 openh264 (From Cisco) - x86_64
fedora-nvidia                                         negativo17 - Nvidia
google-chrome                                         google-chrome
rpmfusion-free                                        RPM Fusion for Fedora 39 - Free
rpmfusion-free-updates                                RPM Fusion for Fedora 39 - Free - Updates
rpmfusion-nonfree                                     RPM Fusion for Fedora 39 - Nonfree
rpmfusion-nonfree-nvidia-driver                       RPM Fusion for Fedora 39 - Nonfree - NVIDIA Driver
rpmfusion-nonfree-steam                               RPM Fusion for Fedora 39 - Nonfree - Steam
rpmfusion-nonfree-updates                             RPM Fusion for Fedora 39 - Nonfree - Updates
updates                                               Fedora 39 - x86_64 - Updates

dnf list installed \*nvidia\* :

akmod-nvidia.x86_64                      3:545.29.06-3.fc39 @rpmfusion-nonfree-nvidia-driver
kmod-nvidia-6.7.5-200.fc39.x86_64.x86_64 3:545.29.06-3.fc39 @@commandline       
nvidia-gpu-firmware.noarch               20240220-1.fc39    @updates            
nvidia-modprobe.x86_64                   3:545.29.06-1.fc39 @rpmfusion-nonfree-nvidia-driver
nvidia-settings.x86_64                   3:545.29.06-1.fc39 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia.x86_64               3:545.29.06-2.fc39 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-kmodsrc.x86_64       3:545.29.06-2.fc39 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-libs.i686            3:545.29.06-2.fc39 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-libs.x86_64          3:545.29.06-2.fc39 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-power.x86_64         3:545.29.06-2.fc39 @rpmfusion-nonfree-nvidia-driver

dnf list installed \*cuda\* :

Error: No package matches found

The conflict appears to be caused by this repo.
Disable that repo with dnf config-manager --disable cuda-fedora39-x86_64 then redo the installation of the xorg-x11-drv-nvidia-cuda package.

Thank you very much, I managed to perform sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda, but can you help with kernel problem? When I start, module shows me nvidia kernel missing falling back to nouveau, and when I do sudo akmods --force I get

directories are missing: /usr/src/kernels/6.0.8-xm1.0.fc38.x86_64/ /lib/modules/6.0.8-xm1.0.fc38.x86_64/build/Is the correct kernel-devel package installed?

That is not an error. That is information that says a necessary directory to build the module for that kernel does not exist. It also asks if the kernel-devel package for that kernel is installed. This usually is because dependencies to build the modules are not available.

I do not understand why you would be using a 6.0.8 kernel with a system that is designed for a 6.5.6 and newer kernels (Fedora 39). The 6.0.8 kernel was last used many releases of fedora in the past.

You now have installed the packages, but we need additional info about the reason for the fallback to nouveau.

Please provide the output of cat /etc/kernel/cmdline and mokutil --sb-state as well as dnf list installed kernel\*

cat /etc/kernel/cmdline :

root=UUID=c03504af-fa1e-4223-9a55-faeffd3aad91 ro rootflags=subvol=@ rd
.driver.blacklist=nouveau modprobe.blacklist=nouveau resume=UUID=8d4263
1a-41d3-4b0d-b05a-23e1223bf10f rhgb quiet rd.driver.blacklist=nouveau m
odprobe.blacklist=nouveau

mokutil --sb-state :

SecureBoot disabled
Platform is in Setup Mode

dnf list installed kernel\* :

kernel.x86_64                     6.5.6-300.fc39   @anaconda                    
kernel.x86_64                     6.7.5-200.fc39   @updates                     
kernel-core.x86_64                6.5.6-300.fc39   @anaconda                    
kernel-core.x86_64                6.7.5-200.fc39   @updates                     
kernel-devel.x86_64               6.7.5-200.fc39   @updates                     
kernel-devel-matched.x86_64       6.7.5-200.fc39   @updates                     
kernel-headers.x86_64             6.7.3-200.fc39   @updates                     
kernel-modules.x86_64             6.5.6-300.fc39   @anaconda                    
kernel-modules.x86_64             6.7.5-200.fc39   @updates                     
kernel-modules-core.x86_64        6.5.6-300.fc39   @anaconda                    
kernel-modules-core.x86_64        6.7.5-200.fc39   @updates                     
kernel-srpm-macros.noarch         1.0-20.fc39      @fedora                      
kernel-xanmod-edge.x86_64         6.0.8-xm1.0.fc38 @copr:copr.fedorainfracloud.org:rmnscnce:kernel-xanmod
kernel-xanmod-edge-core.x86_64    6.0.8-xm1.0.fc38 @copr:copr.fedorainfracloud.org:rmnscnce:kernel-xanmod
kernel-xanmod-edge-modules.x86_64 6.0.8-xm1.0.fc38 @copr:copr.fedorainfracloud.org:rmnscnce:kernel-xanmod

sorry for waiting, my message was under inspection

Why do you have the kernel-xanmod-edge 6.0.8 kernel installed. Removing those kernel packages would eliminate the message you posted.

sudo dnf remove kernel-xanmod-edge\* would remove all those packages if you do not absolutely need that kernel. That kernel is also labeled as applicable to fc38.

At first, all the problems disappeared, but recently nvidia kernel missing falling back to nouveau reappeared and with sudo dnf upgrade --refresh --best --allowerasing -y && flatpak update -y(I have an alias for this) I started getting an error:

Error:
Problem: package xorg-x11-drv-nvidia-cuda-3:550.54.14-1.fc39.x86_64 from @System requires nvidia-persistent(x86-64) = 3:550.54.14, but none of the providers can be installed
- failed to install the best update option for the nvidia package-persistent-3:550.54.14-1.fc39.x86_64
- package nvidia-persistenced-3:550.54.14-3.fc39.x86_64 from fedora-nvidia requires nvidia-driver-cuda = 3:550.54.14, but none of the providers can be installed
- package nvidia-driver-cuda-3:550.54.14-1.fc39.x86_64 from fedora-nvidia conflicts with xorg-x11-drv-nvidia-cuda provided by xorg-x11-drv-nvidia-cuda-3:550.54.14-1.fc39.x86_64 from @System
- package nvidia-driver-cuda-3:550.54.14-2.fc39.x86_64 from fedora-nvidia conflicts with xorg-x11-drv-nvidia-cuda provided by xorg-x11-drv-nvidia-cuda-3:550.54.14-1.fc39.x86_64 from @System
- problem with the xorg-x11 package installed-drv-nvidia-cuda-3:550.54.14-1.fc39.x86_64
- failed to install the best update option for the xorg package-x11-drv-nvidia-cuda-3:550.54.14-1.fc39.x86_64
(try adding "--skip-broken" to skip deleted packages)

I deleted kernel-xanmod-edge*

I would also like to thank you very much for your help. And I apologize for my absence.

It appears that repo is the cause of the conflict.

Please show the output of dnf repolist and dnf list installed \*nvidia\*

dnf repolist:

copr:copr.fedorainfracloud.org:phracek:PyCharm        Copr repo for PyCharm owned by phracek
copr:copr.fedorainfracloud.org:rmnscnce:kernel-xanmod Copr repo for kernel-xanmod owned by rmnscnce
fedora                                                Fedora 39 - x86_64
fedora-cisco-openh264                                 Fedora 39 openh264 (From Cisco) - x86_64
fedora-nvidia                                         negativo17 - Nvidia
google-chrome                                         google-chrome
rpmfusion-free                                        RPM Fusion for Fedora 39 - Free
rpmfusion-free-updates                                RPM Fusion for Fedora 39 - Free - Updates
rpmfusion-nonfree                                     RPM Fusion for Fedora 39 - Nonfree
rpmfusion-nonfree-nvidia-driver                       RPM Fusion for Fedora 39 - Nonfree - NVIDIA Driver
rpmfusion-nonfree-steam                               RPM Fusion for Fedora 39 - Nonfree - Steam
rpmfusion-nonfree-updates                             RPM Fusion for Fedora 39 - Nonfree - Updates
updates                                               Fedora 39 - x86_64 - Updates

dnf list installed \*nvidia\*:

akmod-nvidia.x86_64                      3:550.54.14-2.fc39 @fedora-nvidia      
kmod-nvidia-6.7.6-200.fc39.x86_64.x86_64 3:550.54.14-1.fc39 @@commandline       
kmod-nvidia-6.7.7-200.fc39.x86_64.x86_64 3:550.54.14-1.fc39 @@commandline       
nvidia-gpu-firmware.noarch               20240220-1.fc39    @updates            
nvidia-libXNVCtrl.x86_64                 3:550.54.14-3.fc39 @fedora-nvidia      
nvidia-modprobe.x86_64                   3:550.54.14-2.fc39 @fedora-nvidia      
nvidia-persistenced.x86_64               3:550.54.14-1.fc39 @rpmfusion-nonfree-nvidia-driver
nvidia-settings.x86_64                   3:550.54.14-3.fc39 @fedora-nvidia      
xorg-x11-drv-nvidia.x86_64               3:550.54.14-1.fc39 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-cuda.x86_64          3:550.54.14-1.fc39 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-cuda-libs.i686       3:550.54.14-1.fc39 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-cuda-libs.x86_64     3:550.54.14-1.fc39 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-kmodsrc.x86_64       3:550.54.14-1.fc39 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-libs.i686            3:550.54.14-1.fc39 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-libs.x86_64          3:550.54.14-1.fc39 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-power.x86_64         3:550.54.14-1.fc39 @rpmfusion-nonfree-nvidia-driver

In that listing it shows mixing of packages from repos.
The fedora-nvidia repo packages and the packages from rpmfusion-nonfree-nvidia-driver are in many cases not compatible and cause the conflicts as you showed above. My suggestion is to do the following which should solve this issue.

  1. sudo dnf config-manager --disable fedora-nvidia to disable that repo
  2. sudo dnf remove \*nvidia\* --exclude nvidia-gpu-firmware to remove all the mismatched packages
  3. sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda to reinstall all the appropriate packages from the rpmfusion repo
  4. wait at least 5 minutes after step 3 completes before rebooting

After completing these 4 steps the only installed nvidia packages should be from the rpmfusion repo and there should be no conflicts during the installation since the competing repo has been disabled.

Hope this helps!

1 Like

Thank you very much. Your help was very valuable. I really appreciate it.

2 Likes