No GUI in nixos live session or when installed

I’ve been trying to setup nixos on my laptop, Lenovo ideapad 5, ryzen 7, but I have only been able to reach the command line. The issue showed itself in the live cd session - no gui and command line only. Despite that, I chose to install nixos in hopes that nixos-generate-config would solve it by adding something to hardware-configuration.nix, but unfortunately, the issue remains. This happens on both the KDE and Gnome version of nixos 20.09. It’s a bit frustrating to debug without a gui (and services that come with), as wifi must be set up each time I reboot to try something new, and the keyboard layout I’m used to is not installed properly yet.

I suspectet that it could be a gpu driver issue, but none of the suggestions here AMD GPU - NixOS Wiki helped me out.
The live session worked great when I was installing nixos on my desktop, which also has an AMD card.

I realize that this isn’t much to go on - other than installing the drivers and trying both the KDE and Gnome version, I haven’t been able to come up with anything to try out. Any suggestions for things to try?

What is the output of the following command:

nix run nixpkgs.pciutils -c lspci | grep VGA

1 Like

“Warning: You don’t have internet access: disabling some network-dependent features
03:00:0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Renoir (rev c2)”
Is that helpful?

I have a Renoir-based laptop as well. You’ll need to make a few changes to get a GUI.

You need Linux 5.10 or greater. I’m not sure if it’s available in the stable/release version; You may need to use unstable:

 boot.kernelPackages = pkgs.linuxPackages_5_10;

And you’ll need to use the amdgpu driver for xorg:

services.xserver.videoDrivers = [ "amdgpu" ];
2 Likes

That worked great, thank you!

Thank you so much, this did it for me as well. Tried quite a few more things. Was expecting that a new-enough kernel would be included in the newer nixos downloads :slight_smile: