Ryzen 5 5600G (amd iGPU) no /dev/dri/renderD128

So I think I enabled everything correctly but after an update there are no more /dev/dri/renderD128 device. I noticed this when jellyfin started giving me errors after a deploy (although I didn’t notice this right away).

Anyone has an idea what I could’ve done wrong? Or how I could debug this further?

$ sudo ls /dev/dri/*
/dev/dri/card0

/dev/dri/by-path:
pci-0000:06:00.0-platform-simple-framebuffer.0-card

My config:

{
  hardware.graphics.enable = true;
  hardware.graphics.enable32Bit = true;
  hardware.amdgpu.initrd.enable = true;
}

Some more debugging info:

$ nix shell nixpkgs#util-linux -c lscpu | grep "Model name"
 Model name:             AMD Ryzen 5 5600G with Radeon Graphics
$ sudo nix run nixpkgs#drm_info -- -j | nix run nixpkgs#jq 'with_entries(.value |= .driver.desc)'                                                                                                                       
{                                                                                                                                                                                                                                      
  "/dev/dri/card0": "DRM driver for simple-framebuffer platform devices"                                                                                                                                                               
}

Some possibly interesting input from journalctl -b:

Apr 09 21:26:44 baryum kernel: ACPI: video: Video Device [VGA] (multi-head: yes  rom: no  post: no)
Apr 09 21:26:44 baryum kernel: input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:09/LNXVIDEO:00/input/input0
Apr 09 21:26:44 baryum kernel: [drm] amdgpu kernel modesetting enabled.
Apr 09 21:26:44 baryum kernel: amdgpu: Virtual CRAT table created for CPU
Apr 09 21:26:44 baryum kernel: amdgpu: Topology: Add CPU node
Apr 09 21:26:44 baryum kernel: [drm] initializing kernel modesetting (RENOIR 0x1002:0x1638 0x1458:0xD000 0xC9).
Apr 09 21:26:44 baryum kernel: [drm] register mmio base: 0xFCB00000
Apr 09 21:26:44 baryum kernel: [drm] register mmio size: 524288
Apr 09 21:26:44 baryum kernel: [drm] add ip block number 0 <soc15_common>
Apr 09 21:26:44 baryum kernel: [drm] add ip block number 1 <gmc_v9_0>
Apr 09 21:26:44 baryum kernel: [drm] add ip block number 2 <vega10_ih>
Apr 09 21:26:44 baryum kernel: [drm] add ip block number 3 <psp>
Apr 09 21:26:44 baryum kernel: [drm] add ip block number 4 <smu>
Apr 09 21:26:44 baryum kernel: [drm] add ip block number 5 <dm>
Apr 09 21:26:44 baryum kernel: [drm] add ip block number 6 <gfx_v9_0>
Apr 09 21:26:44 baryum kernel: [drm] add ip block number 7 <sdma_v4_0>
Apr 09 21:26:44 baryum kernel: [drm] add ip block number 8 <vcn_v2_0>
Apr 09 21:26:44 baryum kernel: [drm] add ip block number 9 <jpeg_v2_0>
Apr 09 21:26:44 baryum kernel: [drm] BIOS signature incorrect 0 0
Apr 09 21:26:44 baryum kernel: amdgpu 0000:06:00.0: amdgpu: Fetched VBIOS from ROM BAR
Apr 09 21:26:44 baryum kernel: amdgpu: ATOM BIOS: 13-CEZANNE-019
Apr 09 21:26:44 baryum kernel: amdgpu 0000:06:00.0: Direct firmware load for amdgpu/green_sardine_asd.bin failed with error -2
Apr 09 21:26:44 baryum kernel: [drm:amdgpu_device_init.cold [amdgpu]] *ERROR* early_init of IP block <psp> failed -19
Apr 09 21:26:44 baryum kernel: amdgpu 0000:06:00.0: Direct firmware load for amdgpu/green_sardine_dmcub.bin failed with error -2
Apr 09 21:26:44 baryum kernel: [drm:amdgpu_device_init.cold [amdgpu]] *ERROR* early_init of IP block <dm> failed -19
Apr 09 21:26:44 baryum kernel: amdgpu 0000:06:00.0: Direct firmware load for amdgpu/green_sardine_pfp.bin failed with error -2
Apr 09 21:26:44 baryum kernel: [drm:amdgpu_device_init.cold [amdgpu]] *ERROR* early_init of IP block <gfx_v9_0> failed -19
Apr 09 21:26:44 baryum kernel: amdgpu 0000:06:00.0: Direct firmware load for amdgpu/green_sardine_sdma.bin failed with error -2
Apr 09 21:26:44 baryum kernel: [drm:amdgpu_device_init.cold [amdgpu]] *ERROR* early_init of IP block <sdma_v4_0> failed -19
Apr 09 21:26:44 baryum kernel: amdgpu 0000:06:00.0: Direct firmware load for amdgpu/green_sardine_vcn.bin failed with error -2
Apr 09 21:26:44 baryum kernel: [drm:amdgpu_device_init.cold [amdgpu]] *ERROR* early_init of IP block <vcn_v2_0> failed -19
Apr 09 21:26:44 baryum kernel: amdgpu 0000:06:00.0: amdgpu: Fatal error during GPU init
Apr 09 21:26:44 baryum kernel: amdgpu 0000:06:00.0: amdgpu: amdgpu: finishing device

Thank you :pray:

1 Like

Oh how familiar. I guess some defaults were changed.

The problem is indeed that you lack the GPU-side firmware for your iGPU. The necessary firmware is contained in the linux-firmware package. Presumably you need to add it to hardware.firmware option (I use Nixpkgs but not mainline NixOS so I made it available differently)

1 Like

Thank you!!

After going on a big tour of internet to know what driver I needed I stumbled upon AMD microcode - Gentoo wiki which suggests the correct firmware is amd/amd_sev_fam19h_model0xh.sbin.

And this file is present in linux-firmware package. So I added the following line:

hardware.firmware = [ pkgs.linux-firmware ];

And after a deploy and a reboot, I have back the expected render device:

$ ls -1 /dev/dri/*
/dev/dri/card1
/dev/dri/renderD12

:tada:

I must have changed some option that was previously adding the package to hardware.firmware.

fwiw you usually don’t have to do this yourself because usually the hardware-configuration.nix generated by nixos-generate-config imports the scan/not-detected.nix module, which sets hardware.enableRedistributableFirmware = true;, which adds linux-firmware for you.

TL;DR: I’d use hardware.enableRedistributableFirmware = true; rather than setting hardware.firmware yourself.

2 Likes

Just for the context, microcode files that the linked wiki page talks about might also be useful but they are CPU-side post-release fixes, you need the Green Sardine iGPU firmware for the render device to appear, which is also included in the large linux-firmware package.

1 Like