DRM kernel driver 'nvidia-drm' in use. NVK requires nouveau

I have the same issue as them. My driver version is 550.90.07 and on ls /dev/dri I get the following.

by-path  card1  renderD128

Adding environment.sessionVariables.VK_DRIVER_FILES = "/run/opengl-driver/share/vulkan/icd.d/nvidia_icd.x86_64.json"; solved this issue but introduced a new one in form of Vulkan failing to initialize.

1 Like

There is what I get when doing ls /dev/dri :

by-path  card1  card2  renderD128  renderD129

and this is my driver version for Nvidia : 555.58.02
I have the latest driver now because I recently updated my channel, I didn’t test if obsidian work now…

Update

I just tested obsidian now from nixpkgs unstable and it’s behavior is always this weird… so for the moment I use the flatpak version of it, this one work great!

EDIT :

Steam have weird issue too, if I start it from the terminal all work fine, but I got this nvidia warning :

$ steam
steam.sh[304339]: Running Steam on nixos 24.11 64-bit
steam.sh[304339]: STEAM_RUNTIME is enabled automatically
setup.sh[304417]: Steam runtime environment up-to-date!
steam.sh[304339]: Steam client's requirements are satisfied
[2024-07-06 00:12:25] Startup - updater built Jun 20 2024 17:13:49
[2024-07-06 00:12:25] Startup - Steam Client launched with: '/home/alez/.local/share/Steam/ubuntu12_32/steam' '-srt-logger-opened'
07/06 00:12:25 minidumps folder is set to /tmp/dumps
07/06 00:12:25 Init: Installing breakpad exception handler for appid(steam)/version(1718904662)/tid(304478)
[2024-07-06 00:12:25] Loading cached metrics from disk (/home/alez/.local/share/Steam/package/steam_client_metrics.bin)
[2024-07-06 00:12:25] Using the following download hosts for Public, Realm steamglobal
[2024-07-06 00:12:25] 1. https://client-update.akamai.steamstatic.com, /, Realm 'steamglobal', weight was 1000, source = 'update_hosts_cached.vdf'
[2024-07-06 00:12:25] 2. https://cdn.cloudflare.steamstatic.com, /client/, Realm 'steamglobal', weight was 1, source = 'update_hosts_cached.vdf'
[2024-07-06 00:12:25] 3. https://cdn.steamstatic.com, /client/, Realm 'steamglobal', weight was 1, source = 'baked in'
[2024-07-06 00:12:25] Verifying installation...
[2024-07-06 00:12:25] Verification complete
UpdateUI: skip show logo
Steam logging initialized: directory: /home/alez/.local/share/Steam/logs

XRRGetOutputInfo Workaround: initialized with override: 0 real: 0xe9b267b0
XRRGetCrtcInfo Workaround: initialized with override: 0 real: 0xe9b24f90
CAppInfoCacheReadFromDiskThread took 30 milliseconds to initialize
Steam Runtime Launch Service: starting steam-runtime-launcher-service
Steam Runtime Launch Service: steam-runtime-launcher-service is running pid 304731
bus_name=com.steampowered.PressureVessel.LaunchAlongsideSteam
DRM kernel driver 'nvidia-drm' in use. NVK requires nouveau.
DRM kernel driver 'nvidia-drm' in use. NVK requires nouveau.
DRM kernel driver 'nvidia-drm' in use. NVK requires nouveau.
DRM kernel driver 'nvidia-drm' in use. NVK requires nouveau.
BRefreshApplicationsInLibrary 1: 0ms
BuildCompleteAppOverviewChange: 257 apps
RegisterForAppOverview 1: 5ms
RegisterForAppOverview 2: 6ms

but when I start it from the app launcher (Hyprland with wofi) it start normally but the window is transparent, very weird

Assuming you’re not deliberately using a multi-gpu setup, that definitely looks like an instance of the bug I ran into. If so, you will have some applications failing, depending on whether they happen to use your actual GPU or not.

What’s the rest of your config? Did you reboot after making nvidia drive the fbdev? What does dmesg | grep drm give you?

There is the output of dmesg | grep drm :

[    0.000000] Command line: initrd=\EFI\nixos\glj2dvijkjlkjbmgyp2kvwwxz7xhkw5b-initrd-linux-6.6.36-initrd.efi init=/nix/store/ff00jj49f8bfjp3d7j71wzqnl5n4mssd-nixos-system-nixos-24.11.20240703.9f4128e/init nvidia-drm.fbdev=1 quiet splash boot.shell_on_fail loglevel=3 rd.systemd.show_status=false rd.udev.log_level=3 udev.log_priority=3 psi=1 systemd.unified_cgroup_hierarchy=0 splash loglevel=0 nvidia-drm.modeset=1
[    0.043979] Kernel command line: initrd=\EFI\nixos\glj2dvijkjlkjbmgyp2kvwwxz7xhkw5b-initrd-linux-6.6.36-initrd.efi init=/nix/store/ff00jj49f8bfjp3d7j71wzqnl5n4mssd-nixos-system-nixos-24.11.20240703.9f4128e/init nvidia-drm.fbdev=1 quiet splash boot.shell_on_fail loglevel=3 rd.systemd.show_status=false rd.udev.log_level=3 udev.log_priority=3 psi=1 systemd.unified_cgroup_hierarchy=0 splash loglevel=0 nvidia-drm.modeset=1
[    0.779385] ACPI: bus type drm_connector registered
[    0.781770] [drm] Initialized simpledrm 1.0.0 20200625 for simple-framebuffer.0 on minor 0
[    0.782098] simple-framebuffer simple-framebuffer.0: [drm] fb0: simpledrmdrmfb frame buffer device
[    2.433733] systemd[1]: Starting Load Kernel Module drm...
[    2.479462] systemd[1]: modprobe@drm.service: Deactivated successfully.
[    2.515627] systemd[1]: Finished Load Kernel Module drm.
[    3.455384] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
[    4.965761] [drm] amdgpu kernel modesetting enabled.
[    4.968369] [drm] initializing kernel modesetting (RENOIR 0x1002:0x1638 0x103C:0x8912 0xC4).
[    5.075597] [drm] register mmio base: 0xFC500000
[    5.075600] [drm] register mmio size: 524288
[    5.078062] [drm] add ip block number 0 <soc15_common>
[    5.078064] [drm] add ip block number 1 <gmc_v9_0>
[    5.078065] [drm] add ip block number 2 <vega10_ih>
[    5.078066] [drm] add ip block number 3 <psp>
[    5.078067] [drm] add ip block number 4 <smu>
[    5.078068] [drm] add ip block number 5 <dm>
[    5.078069] [drm] add ip block number 6 <gfx_v9_0>
[    5.078070] [drm] add ip block number 7 <sdma_v4_0>
[    5.078072] [drm] add ip block number 8 <vcn_v2_0>
[    5.078073] [drm] add ip block number 9 <jpeg_v2_0>
[    5.083752] [drm] VCN decode is enabled in VM mode
[    5.083754] [drm] VCN encode is enabled in VM mode
[    5.085260] [drm] JPEG decode is enabled in VM mode
[    5.098601] [drm] vm size is 262144 GB, 4 levels, block size is 9-bit, fragment size is 9-bit
[    5.098619] [drm] Detected VRAM RAM=512M, BAR=512M
[    5.098621] [drm] RAM width 128bits DDR4
[    5.098739] [drm] amdgpu: 512M of VRAM memory ready
[    5.098741] [drm] amdgpu: 15720M of GTT memory ready.
[    5.098768] [drm] GART: num cpu pages 262144, num gpu pages 262144
[    5.098897] [drm] PCIE GART of 1024M enabled.
[    5.098899] [drm] PTB located at 0x000000F41FC00000
[    5.099063] [drm] Loading DMUB firmware via PSP: version=0x01010028
[    5.099465] [drm] Found VCN firmware Version ENC: 1.21 DEC: 7 VEP: 0 Revision: 3
[    5.802784] [drm] reserve 0x400000 from 0xf41f800000 for PSP TMR
[    5.804429] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 1
[    5.895554] nvidia 0000:01:00.0: [drm] fb0: nvidia-drmdrmfb frame buffer device
[    5.904085] [drm] Display Core v3.2.247 initialized on DCN 2.1
[    5.904087] [drm] DP-HDMI FRL PCON supported
[    5.904626] [drm] DMUB hardware initialized: version=0x01010028
[    6.277605] [drm] kiq ring mec 2 pipe 1 q 0
[    6.282623] [drm] VCN decode and encode initialized successfully(under DPG Mode).
[    6.282638] [drm] JPEG decode initialized successfully.
[    6.409278] [drm] Initialized amdgpu 3.54.0 20150101 for 0000:07:00.0 on minor 2
[    6.417835] fbcon: amdgpudrmfb (fb1) is primary device
[    6.417840] amdgpu 0000:07:00.0: [drm] fb1: amdgpudrmfb frame buffer device
[    6.421552] [drm] DSC precompute is not needed.
[   19.703089] [drm] [nvidia-drm] [GPU ID 0x00000100] Framebuffer memory not appropriate for scanout
[ 1118.690063] [drm:__nv_drm_gem_nvkms_memory_prime_get_sg_table [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Cannot create sg_table for NvKmsKapiMemory 0x000000008a2c6604
[ 1118.908163] [drm:__nv_drm_gem_nvkms_memory_prime_get_sg_table [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Cannot create sg_table for NvKmsKapiMemory 0x00000000cb4145aa
[ 1119.120732] [drm:__nv_drm_gem_nvkms_memory_prime_get_sg_table [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Cannot create sg_table for NvKmsKapiMemory 0x0000000047c01c33
[ 1124.410060] [drm:__nv_drm_gem_nvkms_memory_prime_get_sg_table [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Cannot create sg_table for NvKmsKapiMemory 0x00000000cb4145aa
[ 1124.709094] [drm:__nv_drm_gem_nvkms_memory_prime_get_sg_table [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Cannot create sg_table for NvKmsKapiMemory 0x00000000cb4145aa
[ 1124.975813] [drm:__nv_drm_gem_nvkms_memory_prime_get_sg_table [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Cannot create sg_table for NvKmsKapiMemory 0x00000000cb4145aa
[ 1132.518246] [drm:__nv_drm_gem_nvkms_memory_prime_get_sg_table [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Cannot create sg_table for NvKmsKapiMemory 0x00000000cb4145aa
[ 1132.741846] [drm:__nv_drm_gem_nvkms_memory_prime_get_sg_table [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Cannot create sg_table for NvKmsKapiMemory 0x00000000b41e00ae
[ 1132.963088] [drm:__nv_drm_gem_nvkms_memory_prime_get_sg_table [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Cannot create sg_table for NvKmsKapiMemory 0x00000000cb4145aa
[ 1799.716244] [drm:__nv_drm_gem_nvkms_memory_prime_get_sg_table [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Cannot create sg_table for NvKmsKapiMemory 0x00000000b37fbacc
[ 1799.792048] [drm:__nv_drm_gem_nvkms_memory_prime_get_sg_table [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Cannot create sg_table for NvKmsKapiMemory 0x00000000d700a4ca
[ 1799.857367] [drm:__nv_drm_gem_nvkms_memory_prime_get_sg_table [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Cannot create sg_table for NvKmsKapiMemory 0x0000000077e304d8
[ 3161.675820] [drm:__nv_drm_gem_nvkms_memory_prime_get_sg_table [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Cannot create sg_table for NvKmsKapiMemory 0x000000003e4d4f3e
[ 3161.762138] [drm:__nv_drm_gem_nvkms_memory_prime_get_sg_table [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Cannot create sg_table for NvKmsKapiMemory 0x00000000a995e617
[ 3161.834263] [drm:__nv_drm_gem_nvkms_memory_prime_get_sg_table [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Cannot create sg_table for NvKmsKapiMemory 0x00000000059f8d64

and for info I have a laptop with a Nvidia GPU and an integrated amd gpu

Fair enough, that’s a different scenario then. I’d be curious if this is crossed wires with whatever you use to switch between GPUs.

Your system does also load simpledrm, but it’s not the issue:

Either way, I guess this particular error can come about a number of ways, and what I found just happened to be one way that lined up roughly with the report dates. Further debugging would require playing around with your configuration until you manage to root cause it.

I get the same warning from steam but unlike in your case it out right fails, even if I attempt to start it from the console.

XRRGetOutputInfo Workaround: initialized with override: 0 real: 0xf04207b0
XRRGetCrtcInfo Workaround: initialized with override: 0 real: 0xf041ef90
CAppInfoCacheReadFromDiskThread took 120 milliseconds to initialize
Steam Runtime Launch Service: starting steam-runtime-launcher-service
Steam Runtime Launch Service: steam-runtime-launcher-service is running pid 15880
bus_name=com.steampowered.PressureVessel.LaunchAlongsideSteam
DRM kernel driver 'nvidia-drm' in use. NVK requires nouveau.
DRM kernel driver 'nvidia-drm' in use. NVK requires nouveau.
DRM kernel driver 'nvidia-drm' in use. NVK requires nouveau.
DRM kernel driver 'nvidia-drm' in use. NVK requires nouveau.
src/steamUI/steamuisharedjscontroller.cpp (619) : Failed creating offscreen shared JS context
src/steamUI/steamuisharedjscontroller.cpp (619) : Failed creating offscreen shared JS context
07/06 00:56:53 Init: Installing breakpad exception handler for appid(steam)/version(1718904662)/tid(15778)
assert_20240706005653_29.dmp[16040]: Uploading dump (out-of-process)
/tmp/dumps/assert_20240706005653_29.dmp
assert_20240706005653_29.dmp[16040]: Finished uploading minidump (out-of-process): success = no
assert_20240706005653_29.dmp[16040]: error: Peer certificate cannot be authenticated with given CA certificates
assert_20240706005653_29.dmp[16040]: file ''/tmp/dumps/assert_20240706005653_29.dmp'', upload no: ''Peer certificate cannot be authenticated with given CA certificates''
BRefreshApplicationsInLibrary 1: 131ms
src/steamUI/steamuisharedjscontroller.cpp (619) : Failed creating offscreen shared JS context
src/steamUI/steamuisharedjscontroller.cpp (619) : Failed creating offscreen shared JS context
reaping pid: 15990 -- unknown
src/steamexe/main.cpp (297) : Assertion Failed: ReapProcess: waitid failed: 'No child processes'. Possibly leaking a zombie.

src/steamexe/main.cpp (297) : Assertion Failed: ReapProcess: waitid failed: 'No child processes'. Possibly leaking a zombie.

07/06 00:57:17 Init: Installing breakpad exception handler for appid(steam)/version(1718904662)/tid(15778)
assert_20240706005717_37.dmp[16160]: Uploading dump (out-of-process)
/tmp/dumps/assert_20240706005717_37.dmp
assert_20240706005717_37.dmp[16160]: Finished uploading minidump (out-of-process): success = no
assert_20240706005717_37.dmp[16160]: error: Peer certificate cannot be authenticated with given CA certificates
assert_20240706005717_37.dmp[16160]: file ''/tmp/dumps/assert_20240706005717_37.dmp'', upload no: ''Peer certificate cannot be authenticated with given CA certificates''

My dmesg | grep drm output:

❯ dmesg | grep drm
[    0.000000] Command line: initrd=\EFI\nixos\vncjgxxip4w8a5jw2m4gzxqa9v7ic50r-initrd-linux-6.6.36-initrd.efi init=/nix/store/k5m2fzlz0cw089qzzqwawqnkvci16qji-nixos-system-nixos-24.11.20240703.9f4128e/init nvidia.NVreg_PreserveVideoMemoryAllocations=1 nvidia_drm.fbdev=1 loglevel=4 nvidia-drm.modeset=1 nvidia.NVreg_PreserveVideoMemoryAllocations=1
[    0.053029] Kernel command line: initrd=\EFI\nixos\vncjgxxip4w8a5jw2m4gzxqa9v7ic50r-initrd-linux-6.6.36-initrd.efi init=/nix/store/k5m2fzlz0cw089qzzqwawqnkvci16qji-nixos-system-nixos-24.11.20240703.9f4128e/init nvidia.NVreg_PreserveVideoMemoryAllocations=1 nvidia_drm.fbdev=1 loglevel=4 nvidia-drm.modeset=1 nvidia.NVreg_PreserveVideoMemoryAllocations=1
[    0.305303] ACPI: bus type drm_connector registered
[    0.307448] [drm] Initialized simpledrm 1.0.0 20200625 for simple-framebuffer.0 on minor 0
[    0.311445] simple-framebuffer simple-framebuffer.0: [drm] fb0: simpledrmdrmfb frame buffer device
[    2.924909] systemd[1]: Starting Load Kernel Module drm...
[    3.018318] systemd[1]: modprobe@drm.service: Deactivated successfully.
[    3.026674] systemd[1]: Finished Load Kernel Module drm.
[    4.295058] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
[    5.143293] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 1
[    5.167890] fbcon: nvidia-drmdrmfb (fb0) is primary device
[    5.169960] nvidia 0000:01:00.0: [drm] fb0: nvidia-drmdrmfb frame buffer device
                              

I don’t know if I made a mistake when configuring my GPUs, I configured it with the help of the Nixos wiki.
There is the output I get when doing sudo lshw -c display :

  *-display
       description: nvidia-drmdrmfb
       product: nvidia-drmdrmfb
       physical id: 0
       bus info: pci@0000:01:00.0
       logical name: /dev/fb0
       logical name: /dev/fb1
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list rom fb
       configuration: depth=32 driver=nvidia latency=0 mode=1280x800 resolution=3440,1440 visual=truecolor xres=1280 yres=800
       resources: iomemory:fc0-fbf iomemory:fe0-fdf irq:108 memory:fb000000-fbffffff memory:fc00000000-fdffffffff memory:fe00000000-fe01ffffff ioport:f000(size=128) memory:fc000000-fc07ffff
  *-display
       product: amdgpudrmfb
       physical id: 0
       bus info: pci@0000:07:00.0
       logical name: /dev/fb1
       version: c4
       width: 64 bits
       clock: 33MHz
       capabilities: pm pciexpress msi msix bus_master cap_list fb
       configuration: depth=32 driver=amdgpu latency=0 resolution=2560,1440
       resources: irq:48 memory:d0000000-dfffffff memory:e0000000-e01fffff ioport:d000(size=256) memory:fc500000-fc57ffff

so there is how I configured my GPUs in my hardware-configuration.nix file :

hardware = {
    graphics.enable = true;
    cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
  };

  services.xserver.videoDrivers = ["nvidia"];

  hardware.nvidia = {
    modesetting.enable = true;
    powerManagement.enable = false;
    powerManagement.finegrained = false;
    open = false;
    nvidiaSettings = true;
    package = config.boot.kernelPackages.nvidiaPackages.stable;
    prime = {
      nvidiaBusId = "pci@0000:01:00.0";
      amdgpuBusId = "pci@0000:07:00.0";
    };
  };

It seems so. I’m hitting this on a computer which definitely only has one GPU, the Nvidia one (the CPU is a Threadripper without integrated graphics support).

FWIW, I did have that spurious 31" monitor issue too. Adding nvidia-drm.fbdev=1 to kernel parameters seems to have fixed that, but the NVK warning is still there. vulkaninfo (and Chrome) still output these lines to stderr, but proceed to work nicely after that:

WARNING: [Loader Message] Code 0 : terminator_CreateInstance: Received return code -3 from call to vkCreateInstance in ICD /nix/store/g4gar0lac83yl5qnj51mhhcrnscl8lzk-mesa-24.0.7-drivers/lib/libvulkan_dzn.so. Skipping this driver.
WARNING: [Loader Message] Code 0 : terminator_CreateInstance: Received return code -3 from call to vkCreateInstance in ICD /nix/store/g4gar0lac83yl5qnj51mhhcrnscl8lzk-mesa-24.0.7-drivers/lib/libvulkan_virtio.so. Skipping this driver.
DRM kernel driver 'nvidia-drm' in use. NVK requires nouveau.
ERROR: [../src/nouveau/vulkan/nvk_physical_device.c:935] Code 0 : VK_ERROR_INCOMPATIBLE_DRIVER

Setting the environment variable VK_DRIVER_FILES=/run/opengl-driver/share/vulkan/icd.d/nvidia_icd.x86_64.json seems to make these warnings go away.

1 Like