Lightdm + dwm not working

I used to have this configuration which used to work. It stopped working.

  services.xserver = {
    enable = true;
    layout = "us";
    xkbVariant = "intl";
    autorun = true;
    displayManager = {
      defaultSession = "none+dwm";
      lightdm.enable = true;
    windowManager = {
      dwm.enable = true;

Now I get thrown in a tty. The lightdm login screen doesn’t even flash up. According to pgrep -af lightdm is running, though. Nothing interesting in /var/log/X.0.log or journalctl -u display-manager - no errors or session not found mesages. I can startx dwm if I put it in my .xinitrc. Any ideas? Any debugging hints?

Here are examples of what other people are doing Sign in to GitHub · GitHub

Thanks, but nothing new here. The thing is, my configuration did work at one time and is nothing different from what seems to work for people. I’m looking for help debugging, why it does not anymore.

Btw. the extension:nix NOT mkOption NOT mkIf in the github search is neat.

Do you get thrown into a tty after or before login?

Before. It goes right into a tty from boot as if lightdm wasn’t even there. At least as far as I can tell. I know lightdm is running though, but only from searching for the lightdm process.

Try to enable polkit with security.polkit.enable = true;, it’s not enabled by default anymore, and it’s required for graphical interfaces (X or Wayland) to work.

@djacu had troubles with recent version of nixpkgs to start sway, I think you have a similar problem. He wrote an issue which contains links to other issues, trying to pinpoint the problem.

1 Like

Okay small update: enabling polkit didn’t change the situation. But the problem is gone when I use nixos-hardware (my computer is a framework laptop), so it’s something in there.

Still would love to find a log message somewhere that explains the behavior and tells me exactly stops lightdm from sowing even tough it’s running.

1 Like

I was personally having this issue of being thrown in a TTY when trying to load lightdm. I found this entry on the Arch wiki that suggests a lightdm option that waits for the graphics driver to load before spawning a lightdm window.

Enabling this in your configuration.nix can be done as such.

displayManager.lightdm = {
	enable = true;
	extraConfig = ''
1 Like