Setting up wayland (gnome) in NIXOS with AMD RX 7900 xt

Hello!

I’m a bit of a nixos noob, so please bear with me. I’ve recently installed nixos on an ASUS X570-PLUS with a Radeon RX 7900 XT gpu. The bug I’m experiencing is that everything the GPU renders has cascading visual bug where everything on the screen leaves behind an artifact of itself. Strangely enough screenshots don’t capture it, so i’ve taken a picture:

I’ve followed the instructions in then amdgpu wiki and added these lines to my configuration.nix:

boot.initrd.kernelModules = [ "amdgpu" ];
...
service.xserver.videoDrivers = [ "amdgpu" ];

Along side that I’m using the latest kernel packages:

boot.kernelPackages = pkgs.linuxPackagaes_latest;

Without this change the gpu is not detected.

Does anyone know why this bug might be happening? I can provide more detail if needed. Thanks in advance!

1 Like

Same issue here!
Did you figure it out?

I have had an RX 7900 XT since April and have never had this problem. I have been using nixos-unstable though, not 22.11. There’s a reasonable chance that could matter for the mesa driver.

1 Like

I ended waiting for drivers to be released to nixos unstable since this problem was far too complex for me. There’s more discussion in this thread:

https://github.com/NixOS/nixpkgs/issues/207552#issuecomment-1439629446

TL;DR - RDNA3 cards require Linux 6.2 and Mesa 22.3. And if you’re using Xorg you should use the following:

service.xserver.videoDrivers = [ "modesetting" ];

So you will need to use nixos-unstable if you want to use the card.

1 Like

FWIW, I’m using Linux 6.1 just fine, and modesetting is now the default: https://github.com/NixOS/nixpkgs/blob/671e29a924fa788191597e8bdbee5385d1ff42c5/nixos/modules/services/x11/xserver.nix#L279

1 Like