Display-manager won't start from live usb on Thinkpad X13 AMD

Hello. I’m currently in the process of setting up new machine. And while terrified of usual weeks-long setup process, where everything has to be gradually reconfigured on the new machine, I decided to invest some time and solve the issue once and for all by migrating to NixOS.

I dd’ed an image to USB stick. It boots just fine in text mode, but sudo systemctl start display-manager does nothing. I tried both 20.03 and the latest 20.09, result is the same.

I tried troubleshooting this leveraging my experience with other linux distributions:

systemctl status display-manager shows that the process is running and active. Restarting has no effect.

I tried running Xorg server manually: it complains that module ati can’t be loaded. First of all ati can’t be a correct module, should be amdgpu.

I created /etc/X11/xorg.conf.d/20-amdgpu.conf like I would do an other linux distributions, and now Xorg complains that amdgpu module can’t be found.

Searching amdgpu in nix gives nothing I’d expect to see (like xf86-amdgpu)

At this point I’ve no ideas how to even approach this issue on NixOS. Would appreciate any help.

https://github.com/NixOS/nixpkgs/blob/92a047a6c4d46a222e9c323ea85882d0a7a13af8/nixos/modules/hardware/video/amdgpu.nix seems to imply that adding "amdgpu" to services.xserver.videoDrivers in configuration.nix will add the driver you’re after. NixOS Search - Loading... indicates that "amdgpu" is not part of the default.

Thanks a lot for the response!

I’m sorry, if I didn’t made it clear, but this is my very first encounter with NixOS and Nix, hence I need a bit more explanations, than others do perhaps.

  1. Is your advice applicable to live usb?
  2. Where is this file located?
  3. Do I need to somehow trigger “rebuild” for this to work?

Thanks for the patience.

I’m not familiar with the NixOS live usb (I installed my NixOS systems from other linux systems after installing nix). Usually when you boot from an image like that, your changes are limited by the amount of RAM in your system. So, your mileage may vary.

Where is this file located?

/etc/nixos/configuration.nix is the file I’m referring to. It’s the main NixOS configuration file. You can view all of the possible variables by running man configuration.nix from a booted NixOS (including the live usb).

Do I need to somehow trigger “rebuild” for this to work?

Yes, you will need to edit configuration.nix and rebuild with nixos-rebuild switch.

Note that you may need to rmmod radeon after the switch (which the link I posted in my prior comment saves you from having to do on an installed system).

1 Like