Nvidia driver not loading after switching GPU. "Failed to allocate NvKmsKapiDevice"

I’ve just switched my GPU from a Nvidia 1060 to a 5070 Ti.

After the switch, the nvidia drivers are not loading. I see this error in journalctl -b | grep nvidia

Mar 15 18:16:39 jp-pc kernel: [drm:nv_drm_load [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00002600] Failed to allocate NvKmsKapiDevice

Outputs that I’ve found showing errors:

nvidia-smi

No devices were found

journalctl -b | grep nvidia

Journal file /var/log/journal/56083a1c068d44c498d26731aab3cdc1/user-1000@000629a343a268f1-9ef4a0c3d470bf3a.journal~ is truncated, ignoring file.
Mar 15 18:16:35 jp-pc kernel: Command line: BOOT_IMAGE=(hd2,gpt2)/vmlinuz-6.13.6-200.fc41.x86_64 root=UUID=950a02ba-1735-4c79-9558-94821e0bf3ea ro rootflags=subvol=root rhgb quiet preempt=full nvidia-drm.fbdev=1 rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1
Mar 15 18:16:35 jp-pc kernel: Kernel command line: BOOT_IMAGE=(hd2,gpt2)/vmlinuz-6.13.6-200.fc41.x86_64 root=UUID=950a02ba-1735-4c79-9558-94821e0bf3ea ro rootflags=subvol=root rhgb quiet preempt=full nvidia-drm.fbdev=1 rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1
Mar 15 18:16:36 jp-pc dracut-cmdline[427]: Using kernel command line parameters:  rd.driver.pre=btrfs   BOOT_IMAGE=(hd2,gpt2)/vmlinuz-6.13.6-200.fc41.x86_64 root=UUID=950a02ba-1735-4c79-9558-94821e0bf3ea ro rootflags=subvol=root rhgb quiet preempt=full nvidia-drm.fbdev=1 rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1
Mar 15 18:16:38 jp-pc kernel: nvidia: module license 'NVIDIA' taints kernel.
Mar 15 18:16:38 jp-pc kernel: nvidia: module license taints kernel.
Mar 15 18:16:39 jp-pc audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=nvidia-powerd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Mar 15 18:16:39 jp-pc /usr/bin/nvidia-powerd[1039]: nvidia-powerd version:1.0(build 1)
Mar 15 18:16:39 jp-pc systemd[1]: Started nvidia-powerd.service - nvidia-powerd service.
Mar 15 18:16:39 jp-pc kernel: nvidia-nvlink: Nvlink Core is being initialized, major device number 234
Mar 15 18:16:39 jp-pc kernel: nvidia 0000:26:00.0: vgaarb: VGA decodes changed: olddecodes=io+mem,decodes=none:owns=none
Mar 15 18:16:39 jp-pc kernel: nvidia_uvm: module uses symbols nvUvmInterfaceDisableAccessCntr from proprietary module nvidia, inheriting taint.
Mar 15 18:16:39 jp-pc kernel: nvidia-uvm: Loaded the UVM driver, major device number 510.
Mar 15 18:16:39 jp-pc kernel: nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  570.124.04  Tue Feb 25 03:39:21 UTC 2025
Mar 15 18:16:39 jp-pc kernel: [drm] [nvidia-drm] [GPU ID 0x00002600] Loading driver
Mar 15 18:16:39 jp-pc kernel: [drm:nv_drm_load [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00002600] Failed to allocate NvKmsKapiDevice
Mar 15 18:16:39 jp-pc kernel: [drm:nv_drm_register_drm_device [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00002600] Failed to register device
Mar 15 18:16:40 jp-pc /usr/bin/nvidia-powerd[1039]: Failed to attach all GPUs.
Mar 15 18:16:40 jp-pc /usr/bin/nvidia-powerd[1039]: Failed to initialize RM Client
Mar 15 18:16:40 jp-pc systemd[1]: nvidia-powerd.service: Deactivated successfully.
Mar 15 18:16:40 jp-pc audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=nvidia-powerd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Mar 15 18:16:40 jp-pc systemd[1]: nvidia-powerd.service: Consumed 762ms CPU time, 131.2M memory peak.
Mar 15 18:16:40 jp-pc systemd[1]: nvidia-fallback.service - Fallback to nouveau as nvidia did not load was skipped because of an unmet condition check (ConditionPathExists=!/sys/module/nvidia).
Mar 15 18:16:52 jp-pc systemd[2192]: Started app-gnome-nvidia\x2dsettings\x2duser-2658.scope - Application launched by gnome-session-binary.
Mar 15 18:16:52 jp-pc nvidia-settings-user.desktop[2658]: ERROR: A supplied argument is invalid

sudo fpaste --sysinfo --printonly (link because it exceeds the character limit)

nvidia-bug-report.log (also link because it exceeds the character limit too)

The part that got my attention there is:

NVRM: The NVIDIA GPU 0000:26:00.0 (PCI ID: 10de:2c05)
NVRM: installed in this system requires use of the NVIDIA open kernel modules.

I have no idea what the open kernel modules are. I’ve tried to Google how to install them, but I can’t find step by step instructions or info that I understand.

Other info:

uname -r

6.13.6-200.fc41.x86_64

modinfo -F version nvidia

570.124.04

inxi -G

Graphics:
  Device-1: NVIDIA GB203 [GeForce RTX 5070 Ti] driver: nvidia v: 570.124.04
  Display: wayland server: X.Org v: 24.1.6 with: Xwayland v: 24.1.6
    compositor: gnome-shell v: 47.4 driver: X: loaded: N/A unloaded: nvidia
    dri: swrast gpu: nvidia resolution: 1024x768~60Hz
  API: OpenGL v: 4.5 vendor: mesa v: 25.0.1 renderer: llvmpipe (LLVM 19.1.7
    256 bits)
  API: EGL Message: EGL data requires eglinfo. Check --recommends.
  Info: Tools: api: glxinfo gpu: nvidia-settings,nvidia-smi x11: xdriinfo,
    xdpyinfo, xprop, xrandr

cat /proc/cmdline

BOOT_IMAGE=(hd2,gpt2)/vmlinuz-6.13.6-200.fc41.x86_64 root=UUID=950a02ba-1735-4c79-9558-94821e0bf3ea ro rootflags=subvol=root rhgb quiet preempt=full nvidia-drm.fbdev=1 rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1

sudo dnf list --installed \*nvidia\*

akmod-nvidia.x86_64                       3:570.124.04-1.fc41              rpmfusion-nonfree-updates
kmod-nvidia-6.13.4-200.fc41.x86_64.x86_64 3:570.86.16-3.fc41               @commandline
kmod-nvidia-6.13.5-200.fc41.x86_64.x86_64 3:570.124.04-1.fc41              @commandline
kmod-nvidia-6.13.6-200.fc41.x86_64.x86_64 3:570.124.04-1.fc41              @commandline
libva-nvidia-driver.i686                  0.0.13^20241108git259b7b7-2.fc41 updates
libva-nvidia-driver.x86_64                0.0.13^20241108git259b7b7-2.fc41 updates
nvidia-gpu-firmware.noarch                20250311-1.fc41                  updates
nvidia-modprobe.x86_64                    3:570.124.04-1.fc41              rpmfusion-nonfree-updates
nvidia-persistenced.x86_64                3:570.124.04-1.fc41              rpmfusion-nonfree-updates
nvidia-settings.x86_64                    3:570.124.04-1.fc41              rpmfusion-nonfree-updates
xorg-x11-drv-nvidia.x86_64                3:570.124.04-1.fc41              rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-cuda.x86_64           3:570.124.04-1.fc41              rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-cuda-libs.i686        3:570.124.04-1.fc41              rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-cuda-libs.x86_64      3:570.124.04-1.fc41              rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-kmodsrc.x86_64        3:570.124.04-1.fc41              rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-libs.i686             3:570.124.04-1.fc41              rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-libs.x86_64           3:570.124.04-1.fc41              rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-power.x86_64          3:570.124.04-1.fc41              rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-xorg-libs.x86_64      3:570.124.04-1.fc41              rpmfusion-nonfree-updates

System info:
GPU: Nvidia 5070 Ti
CPU: Ryzen 7 5700x
OS: Fedora 41 Workstation
GNOME Version: 47
Windowing System: Wayland (Xorg won’t even login)
Secureboot is disabled in BIOS.

Things that I’ve tried:

  • Uninstalling and reinstalling akmod-nvidia, following the rpmfusion instructions. The process finishes without errors, I wait until the modules are built as the instructions say, and after rebooting, nothing changes.
  • Rebuilding “sudo akmods --rebuild --force”. The process also finishes without errors, and nothing changes.
  • I’ve googled how to switch to “NVIDIA open kernel modules”, but I can’t find a step by step explanation that I can understand.

I’ve always solved things by googling, but I’m completely lost here.

Thanks for any help.

Your planet killer card needs the open driver to function.

sudo sh -c 'echo "%_with_kmod_nvidia_open 1" > /etc/rpm/macros.nvidia-kmod'
sudo akmods --kernels $(uname -r) --rebuild
4 Likes

Thank you so much!

That’s what I guessed from those logs, but I had no idea how to do it and I couldn’t find anything on Google.

Everything seems to work now. Thanks again!

I understand that the 5070 requires the use of akmod-nvidia-open and may not be properly supported with the proprietary akmod-nvidia.

For how to install that driver see the rpmfusion page

1 Like

I don’t recommend using the akmod-nvidia-open package, the code isn’t the same as the kernel-open code in xorg-x11-drv-nvidia-kmodsrc package.
Also akmod-nvidia-open has dependency issues that I have no easy fix for, it’s a shame rpmfusion infra can’t handle rpm boolean requires :frowning:

2 Likes

I also struggled with this to get my 5070 TI working initially with the rpmfusion way of installing the driver, but thanks to this macro to force the open module while using the regular akmod-nvidia package, it now works perfectly fine with v570.133.07. Since all Blackwell generation and beyond cards now strictly require the use of the open module, and the akmod-nvidia-open is discouraged from being used, is there a way to package akmod-nvidia it in such a way that for systems with these newer cards the package would automatically install the macro before building the module? That would streamline the installation for new (and returning) users and reduce the potential for errors in general, as well as being more in line with the current state of the wiki entries.

Thanks in any case for your work on the packaged driver :slight_smile: !

Far from discouraging the use of the akmod-nvidia-open package for the 50 series of cards simply follow the instructions at (Howto/NVIDIA - RPM Fusion) and it all just works perfectly for nearly everyone.

I was referring to the previous comment from @leigh123linux regarding the use of the akmod-nvidia-open package as being discouraged, not as it being the general consensus (of that, I’m unaware). That comment however made me consider the macro instead of the -open package.

Regardless, I was already following the guide you linked previously and still couldn’t get the card working with the -open package. Only the macro (which is also mentioned in the guide) combined with the regular package lead to success with my 5070 TI. I first chose the route of the -open package as it seemed to be the “cleaner” variant of the two approaches (until I read @leigh123linux’s comment).

It might be purely anecdotal or an isolated case, I won’t rule that out, but only positive feedback from 50 series card users using the -open package successfully could confirm that I reckon.

Hence my proposal to either adjust the wiki to make it even clearer for 50 series users (i’d help with the wiki edits, how can I sign up or submit changes for review?), or adjust the package installation to automatically install the required macro to always build and use the open module if such a card (Blackwell or newer) is detected during installation.