Missing amdgpu firmware? Running glxgears causes hitching

For my ASUS ProArt X13 laptop I’m trying disabling the Nvidia dGPU all together so I can see if can get everything working with just the integrated AMD GPU. To disable nvidia I used this snippet from the wiki:

  boot.extraModprobeConfig = ''
  blacklist nouveau
  options nouveau modeset=0
'';

  services.udev.extraRules = ''
  # Remove NVIDIA USB xHCI Host Controller devices, if present
  ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{power/control}="auto", ATTR{remove}="1"
  # Remove NVIDIA USB Type-C UCSI devices, if present
  ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{power/control}="auto", ATTR{remove}="1"
  # Remove NVIDIA Audio devices, if present
  ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{power/control}="auto", ATTR{remove}="1"
  # Remove NVIDIA VGA/3D controller devices
  ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", ATTR{power/control}="auto", ATTR{remove}="1"
'';

  boot.blacklistedKernelModules = [ "nouveau" "nvidia" "nvidia_drm" "nvidia_modeset" ];

Which seems to work checking with lsmod | grep nv. Now I have no problem getting into an X server running i3. If I open a terminal everything is reponsive. If I then run glxgears, things stay responsive, until I exit glxgears, at which point I get weird hitching – it appears the screen is not refreshing unless I move the mouse. Some actions like opening a new terminal have long pauses. If I ssh in from another machine everything seems responsive supporting that it’s specifically a graphics glitch.

I noticed this in dmesg:

[    3.259798] amdgpu 0000:c5:00.0: amdgpu: [drm] Optional firmware "amdgpu/isp_4_1_0.bin" was not found

I figured this was maybe due to the linux-firmware nixos package not being new enough. So then I tried this:

hardware.firmware = [ (import <nixos-unstable> {}).linux-firmware ];

But this causes a hang on boot complaining about the firmware (see photo).

I also tried using linux-firmware from git, but that has the same issue with hanging on boot

let
  linux-firmware-git = pkgs.stdenv.mkDerivation {
    name = "linux-firmware-git";

    # Use fetchzip to get the specific tagged version
    src = pkgs.fetchzip {
      url = "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/snapshot/linux-firmware-20250410.tar.gz";
      hash = "sha256-aQdEl9+7zbNqWSII9hjRuPePvSfWVql5u5TIrGsa+Ao=";
    };

    installPhase = ''
      mkdir -p $out/lib/firmware
      cp -r * $out/lib/firmware
      # Remove unnecessary files
      find $out/lib/firmware -name "WHENCE" -or -name "LICENSE*" -or -name "LICENCE*" | xargs rm -f
    '';
  };
in
{
  hardware.firmware = [ linux-firmware-git ];
}

If I were debugging it, I would try to add a package that copies just the file originally reported as missing from the full firmware set. But no idea what is going on and what ends up incompatible with what.

1 Like

I did some more digging and learned that amdtee is for the trusted execution environment and isp is just for camera postprocessing, so likely neither are related to my issue.

Also the problem doesn’t appear to be triggered running glxgears under fluxbox, only with i3 strangely

TEE might be related to the hang, in principle.

AMD GPUs do require firmware but it might be already good in the stable channel, true.

Maybe your i3 setup includes something that needs OpenGL on the WM side, while your fluxbox setup does not? Do you have Compton running in i3?

FWIW as far as I can tell the fix here is just “don’t use i3”. Other window managers are not affected, and as long as nvidia is disabled I can run wayland+sway.