Freeze during boot with RX 7800 XT

I’ve been happily running NixOS using an Nvidia 1080 in the past but wanted to switch to AMD before fully committing. Last week I received a Powercolor Red Devil AMD Radeon RX 7800 XT and last night I tried to hop back into NixOS again.

I was met with a black screen trying to boot from the minimal OS image. Using nomodeset I could continue and and install. After installation I changed my configuration to include boot.initrd.kernelModules = [ “amdgpu” ]; and after rebooting I was met with another black screen.

During the live USB my system would become unresponsive and I had to power cycle my machine but after installation I could at least CTRL ALT DEL to reboot.

Everything works fine on Windows 10. I also tried the latest Arch iso and it booted without the need for nomodeset. After installation however (with amdgpu) it would hang again on boot, trying to load it’s module into the kernel.

I’m not sure where to go from here, since I cannot produce any meaningful output or logs to examine. I could perhaps try to add an additional boot entry with nomodeset but admittedly I’m treading in deeper waters concerning my knowledge.

Thank you for taking the time to read this. I would appreciate any suggestions.

Last week there was a bug with the AMD drivers that has been fixed, so make sure you’re using all up to date nixpkgs.

Just tried the latest gnome variant of the installation media. This time around it’s showing me the splash screen, but still freezes (like it would in the minimal variant halfway through)

After experiencing issues with freezing, I would advise trying out a bunch of different kernels (but only relatively recent ones given how new your hardware is). It’s really easy to swap out your kernel on NixOS and it might just solve your problem. I would probably start with the absolute latest kernel you can get, and work backwards from there until you’re happy with the stability/functionality.

Ah, yes, the 7800XT likely requires a newer kernel than the default. nomodeset will sidestep the issue, as you found in the installer, but you’ll want to change the kernel version with something like boot.kernelPackages = pkgs.linuxPackages_latest;