Failed to allocate NvKmsKapiDevice, Failed to register device(GeForce RTX 3070, Ubuntu 18.04.6)

Hello,

I encountered an issue after uninstalling the previous NVIDIA driver and reinstalling the latest version. After rebooting, when I run the command nvidia-smi, it returns the message “No devices were found”.

To investigate further, I ran the following command:

dmesg | grep nvidia

This is the output I received:

[   18.724826] nvidia: loading out-of-tree module taints kernel.
[   18.724867] nvidia: module license 'NVIDIA' taints kernel.
[   18.758196] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[   18.779824] nvidia-nvlink: Nvlink Core is being initialized, major device number 239
[   18.783509] nvidia 0000:03:00.0: enabling device (0000 -> 0003)
[   18.801662] nvidia 0000:03:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=none
[   18.980061] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  525.105.17  Tue Mar 28 22:18:37 UTC 2023
[   19.034054] [drm] [nvidia-drm] [GPU ID 0x00000300] Loading driver
[   19.916418] [drm:nv_drm_load [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000300] Failed to allocate NvKmsKapiDevice
[   19.916693] [drm:nv_drm_probe_devices [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000300] Failed to register device
[   20.014148] nvidia-uvm: Loaded the UVM driver, major device number 237.

Can anyone help me resolve this issue? I have tried reinstalling the driver multiple times, but the problem persists. Thank you for any assistance!

Here is the full bug report:
nvidia-bug-report.log.gz (492.7 KB)
nvidia-bug-report.log (6.0 MB)

1 Like

Hi @joyzhao20030412, welcome to the NVIDIA developer forums.

Please purge all existing drivers first from your installation before installing a new one. The logs show that you tried to install v550 while v470 was still installed. And v470 was not automatically uninstalled, which happens if you did not unload the kernel module.

Hope that helps.

I have the same issue for an AMD machine with 5080 GPU, Ubuntu24.04.

I tried purge existing drivers with:

sudo apt-get remove --purge 'nvidia-*'
sudo apt-get autoremove
sudo apt-get clean

I tried several methods to install the driver, including from official documents, and from the ppa, but still got “No devices were found” with the same NvKmsKapiDevice from kernel log.

Any clue is welcome. Thanks!
nvidia-bug-report.log.gz (173.5 KB)

Same issue for me.
Device: pci 0x1023 “GK110BGL [Tesla K40m]”
openSuse Tumbleweed.

~$ dmesg | grep nvidia
[   14.001292] [   T1041] nvidia: loading out-of-tree module taints kernel.
[   14.001311] [   T1041] nvidia: module license 'NVIDIA' taints kernel.
[   14.001319] [   T1041] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[   14.001321] [   T1041] nvidia: module license taints kernel.
[   14.511582] [   T1041] nvidia-nvlink: Nvlink Core is being initialized, major device number 240
[   14.512722] [    T244] nvidia 0000:21:00.0: enabling device (0040 -> 0042)
[   16.247322] [   T1382] nvidia_uvm: module uses symbols nvUvmInterfaceDisableAccessCntr from proprietary module nvidia, inheriting taint.
[   16.445715] [   T1382] nvidia-uvm: Loaded the UVM driver, major device number 238.
[   17.456905] [   T1735] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  470.256.02  Thu May  2 14:50:40 UTC 2024
[   17.539346] [   T1735] [drm] [nvidia-drm] [GPU ID 0x00002100] Loading driver
[   18.320958] [   T1735] caller _nv033255rm+0x39/0xb0 [nvidia] mapping multiple BARs
[   18.362526] [   T1735] [drm:nv_drm_load [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00002100] Failed to allocate NvKmsKapiDevice
[   18.362784] [   T1735] [drm:nv_drm_probe_devices [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00002100] Failed to register device
[  596.433631] [   T6462] caller _nv033255rm+0x39/0xb0 [nvidia] mapping multiple BARs

nvidia-bug-report.log.gz (631.3 KB)

Same issue for me intermittently (570.133.07)

Mar 25 05:52:07 labtop kernel: [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
....
Mar 25 05:52:07 labtop kernel: NVRM: GPU 0000:01:00.0: RmInitAdapter failed! (0x62:0xffff:2520)
Mar 25 05:52:07 labtop kernel: NVRM: GPU 0000:01:00.0: rm_init_adapter failed, device minor number 0
Mar 25 05:52:07 labtop kernel: [drm:nv_drm_load [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to allocate NvKmsKapiDevice
Mar 25 05:52:07 labtop kernel: [drm:nv_drm_register_drm_device [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to register device

nvidia-bug-report.log.gz (376.4 KB)

I am getting the same “Failed to allocate NvKmsKapiDevice” error on a recently built machine with Fedora 41. I have tried reinstalling the nvidia drivers, confirmed secure model is turned off, and setting the following kernel parameters with no luck getting the GPU to load properly: pci=nocrs pci=realloc pci=assign-busses.

$ mokutil --sb-state
SecureBoot disabled
Platform is in Setup Mode

Here part of my dmesg output:

[Thu Apr 10 06:47:29 2025] resource: resource sanity check: requesting [mem 0x00000000f1700000-0x00000000f26fffff], which spans more than PCI Bus 0000:01 [mem 0xf1000000-0xf1ffffff]
[Thu Apr 10 06:47:29 2025] caller _nv046975rm+0x3a/0xb0 [nvidia] mapping multiple BARs
[Thu Apr 10 06:47:29 2025] NVRM: GPU 0000:01:00.0: RmInitAdapter failed! (0x24:0x72:1512)
[Thu Apr 10 06:47:29 2025] NVRM: GPU 0000:01:00.0: rm_init_adapter failed, device minor number 0
[Thu Apr 10 06:47:29 2025] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
[Thu Apr 10 06:47:29 2025] resource: resource sanity check: requesting [mem 0x00000000f1700000-0x00000000f26fffff], which spans more than PCI Bus 0000:01 [mem 0xf1000000-0xf1ffffff]
[Thu Apr 10 06:47:29 2025] caller _nv046975rm+0x3a/0xb0 [nvidia] mapping multiple BARs
[Thu Apr 10 06:47:29 2025] NVRM: GPU 0000:01:00.0: RmInitAdapter failed! (0x24:0x72:1512)
[Thu Apr 10 06:47:29 2025] NVRM: GPU 0000:01:00.0: rm_init_adapter failed, device minor number 0
[Thu Apr 10 06:47:29 2025] resource: resource sanity check: requesting [mem 0x00000000f1700000-0x00000000f26fffff], which spans more than PCI Bus 0000:01 [mem 0xf1000000-0xf1ffffff]
[Thu Apr 10 06:47:29 2025] caller _nv046975rm+0x3a/0xb0 [nvidia] mapping multiple BARs
[Thu Apr 10 06:47:29 2025] NVRM: GPU 0000:01:00.0: RmInitAdapter failed! (0x24:0x72:1512)
[Thu Apr 10 06:47:29 2025] NVRM: GPU 0000:01:00.0: rm_init_adapter failed, device minor number 0
[Thu Apr 10 06:47:29 2025] [drm:nv_drm_load [nvidia_drm]] ERROR [nvidia-drm] [GPU ID 0x00000100] Failed to allocate NvKmsKapiDevice
[Thu Apr 10 06:47:29 2025] [drm:nv_drm_register_drm_device [nvidia_drm]] ERROR [nvidia-drm] [GPU ID 0x00000100] Failed to register device

nvidia-bug-report.log.gz (92.1 KB)

I bough a new card and have the same issue:
Device: pci 0x1b38 “GP102GL [Tesla P40]”
openSuse Tumbleweed

doug@oak ~$ dmesg | grep nvidia
[   22.507863] [   T1659] nvidia: loading out-of-tree module taints kernel.
[   22.507880] [   T1659] nvidia: module license 'NVIDIA' taints kernel.
[   22.507888] [   T1659] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[   22.507889] [   T1659] nvidia: module license taints kernel.
[   23.258444] [   T1659] nvidia-nvlink: Nvlink Core is being initialized, major device number 239
[   23.260443] [    T245] nvidia 0000:27:00.0: enabling device (0040 -> 0042)
[   25.238978] [   T1662] nvidia_uvm: module uses symbols nvUvmInterfaceDisableAccessCntr from proprietary module nvidia, inheriting taint.
[   25.585301] [   T1659] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  570.144  Thu Apr 10 20:03:03 UTC 2025
[   25.658259] [   T1659] [drm] [nvidia-drm] [GPU ID 0x00002700] Loading driver
[   26.269731] [   T1659] caller _nv046982rm+0x3a/0xb0 [nvidia] mapping multiple BARs
[   26.299239] [   T1659] [drm:nv_drm_load [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00002700] Failed to allocate NvKmsKapiDevice
[   26.299489] [   T1659] [drm:nv_drm_register_drm_device [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00002700] Failed to register device
[   26.299653] [    T588] RIP: 0010:_nv000521kms+0x11/0x50 [nvidia_modeset]
[   26.299757] [    T588]  nv_drm_master_set+0x33/0x50 [nvidia_drm c75810cc4b9b2fb111cc005af81c4cb91b41c53f]
[   26.299939] [    T588] Modules linked in: nvidia_drm(POE) nvidia_modeset(POE) nvidia_uvm(POE) af_packet drm_ttm_helper ttm video wmi nvidia(POE) qrtr rfkill nf_tables iptable_filter ext4 mbcache jbd2 intel_rapl_msr intel_rapl_common xfs sb_edac x86_pkg_temp_thermal intel_powerclamp ipmi_ssif coretemp tg3 kvm_intel ioatdma iTCO_wdt intel_pmc_bxt acpi_ipmi iTCO_vendor_support libphy ipmi_si pcspkr ipmi_devintf kvm hpilo ipmi_msghandler dca lpc_ich thermal tiny_power_button nfsd dm_mod auth_rpcgss configfs nfs_acl loop efi_pstore lockd grace fuse sunrpc nfnetlink ip_tables x_tables sr_mod cdrom ata_generic hid_generic usbhid ata_piix ahci libahci libata polyval_clmulni hpsa polyval_generic ghash_clmulni_intel sha512_ssse3 scsi_transport_sas sha256_ssse3 sd_mod uhci_hcd sha1_ssse3 ehci_pci scsi_dh_emc aesni_intel ehci_hcd scsi_dh_rdac scsi_dh_alua crypto_simd sg cryptd serio_raw usbcore scsi_mod mgag200 hpwdt i2c_algo_bit scsi_common button btrfs blake2b_generic xor raid6_pq msr i2c_dev dmi_sysfs
[   26.312521] [    T588] RIP: 0010:_nv000521kms+0x11/0x50 [nvidia_modeset]
[   26.606855] [   T1562] caller _nv046982rm+0x3a/0xb0 [nvidia] mapping multiple BARs
[   26.978815] [   T1655] caller _nv046982rm+0x3a/0xb0 [nvidia] mapping multiple BARs
[   27.368716] [   T1562] caller _nv046982rm+0x3a/0xb0 [nvidia] mapping multiple BARs
[   27.670610] [   T1655] caller _nv046982rm+0x3a/0xb0 [nvidia] mapping multiple BARs
[ 4430.853747] [   T1841] caller _nv046982rm+0x3a/0xb0 [nvidia] mapping multiple BARs

nvidia-bug-report.log.gz (236.7 KB)

This card used a different driver to the last card but the problem is the same. So I guess the problem is not in the driver but loading the driver or a conflict with another installed driver?

I am running ubuntu 24.04 with an RTX 5090 and
I installed:

cuda-repo-ubuntu2404-12-9-local_12.9.1-575.57.08-1_amd64.deb

and I also get the error

rossc@derra:~/deb$ sudo dmesg | egrep nvidia
[    3.623286] nvidia: loading out-of-tree module taints kernel.
[    3.623298] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[    3.678838] nvidia-nvlink: Nvlink Core is being initialized, major device number 510
[    3.681467] nvidia 0000:02:00.0: enabling device (0000 -> 0003)
[    3.681633] nvidia 0000:02:00.0: vgaarb: VGA decodes changed: olddecodes=io+mem,decodes=none:owns=none
[    3.720221] nvidia-modeset: Loading NVIDIA UNIX Open Kernel Mode Setting Driver for x86_64  575.57.08  Release Build  (dvs-builder@U22-I3-H04-01-5)  Sat May 24 06:53:21 UTC 2025
[    3.724339] [drm] [nvidia-drm] [GPU ID 0x00000200] Loading driver
[    4.631111] nvidia 0000:02:00.0: Enabling HDA controller
[    6.830305] [drm:nv_drm_load [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000200] Failed to allocate NvKmsKapiDevice
[    6.830483] [drm:nv_drm_register_drm_device [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000200] Failed to register device
[    7.719205] nvidia 0000:02:00.0: Enabling HDA controller
[   48.951326] nvidia 0000:02:00.0: Enabling HDA controller
[  359.549259] nvidia 0000:02:00.0: Enabling HDA controller
[  368.093445] nvidia 0000:02:00.0: Enabling HDA controller
[  371.245734] nvidia 0000:02:00.0: Enabling HDA controller
[  484.540378] nvidia 0000:02:00.0: Enabling HDA controller
[  487.700611] nvidia 0000:02:00.0: Enabling HDA controller
[  490.924939] nvidia 0000:02:00.0: Enabling HDA controller
[  490.997721] nvidia 0000:02:00.0: Enabling HDA controller
[  494.157258] nvidia 0000:02:00.0: Enabling HDA controller
[  497.302367] nvidia 0000:02:00.0: Enabling HDA controller
[  500.565436] nvidia 0000:02:00.0: Enabling HDA controller
[  940.894822] nvidia 0000:02:00.0: Enabling HDA controller
[  950.308407] nvidia 0000:02:00.0: Enabling HDA controller
[ 1106.670843] nvidia 0000:02:00.0: Enabling HDA controller
[ 1108.341245] nvidia 0000:02:00.0: Enabling HDA controller
rossc@derra:~/deb$ 
1 Like