Stumpwm losing access to its windows on nixos-rebuild switch

For a long time now, I’ve been using stumpwm with NixOS with a lot of happiness, except that every time I nixos-rebuild switch, even for a very minor change to my configuration.nix (e.g. removing something from environment.systemPackages), stumpwm restarts and, unlike a normal restart of stumpwm, it loses all its windows. The processes that those windows were showing are still running though.

This happens even if I have no personal stumpwm configuration (no .stumpwmrc or equivalent).

I’m at a loss for how to debug this. Has anyone else experienced it?

Only curious- what login manager are you using? I ask because I face a similar problem where my x server stops accepting new connections after switch (so no new windows). I beleive my problem is rooted in my usage of startx.

1 Like

Your suggestion was very helpful.

I can only reproduce my problem when I use GDM with autologin.

When I use GDM without autologin, or when I use lightdm, with or without autologin, I don’t have the problem.

Thank you!

I can only reproduce my problem when I use GDM with autologin.

When I use GDM without autologin, or when I use lightdm, with or without autologin, I don’t have the problem.

I am a bit curious if GDM with autologin actually spawns a second X session with Ctrl-Alt-F7/F8 able to switch between the two…

1 Like

Yes! It does!

How interesting!

Using lightdm is surely a better workaround, but how great to have some more insight into the cause of the problem.

I’m trying to figure out what’s happening, inorder to debug my own problem too. I think this commit has some hints-

https://github.com/NixOS/nixpkgs/commit/9be012f0d4d9b6bca35416ec89d5a40be4556896?diff=unified

That said, when i go to

https://github.com/NixOS/nixpkgs/commit/a1ae6273626b467906ae964eca4b16b04e9f8953

looks like Gdm has the same parameters too,display, tty = null so not sure why your problem occurs (mine should be resolved by setting these two params in startx.nix.)

(I’m just noting my research here really since i’ve washed my curtains and it’s too bright for me to read much on the monitor)

Can you print the output of nixos-option services.xserver.displayManager.xserverArgs with the offending configuration?

1 Like