Nixboss systemd[2614]: Activating special unit Exit the Session

I’m getting an unexpected “systemd… Activating special unit Exit session” followed by a boot. The experience is the screen simply goes blank and the computer reboots to bios screen and then Nix boot menu.

This is my first NixOS installation on a new workstation, AMD (7940HS) and most everything is working well, still a few wrinkles to iron out. However, my system does a shutdown/reboot suddenly and without warning a couple times a day. Sometimes within minutes of each other and sometimes not for many hours. My first concern was hardware issues with the new computer and ran exhaustive mem tests back to back without issue.

After examining the journalctl output more closely, I see that the system is indeed doing a systemd “exit” but one I didn’t initiate. Everytime the system reboots itself, I see the same “Activating special unit Exit the Session…” followed by series of closing up shop (with some errors) “Reached target Exit the Session” and “Stopped User Runtime Directory /run/user/175” all followed by “–Boot”. But no indication of what is “Activating special unit Exit…”. Below is the journalctl output beginning right before the “Activating Special exit”.

What’s going on? I don’t see anything that would indicate an exit was initiated. I am running Qtile on xorg and some xapps do not work (wrinkles I mentioned earlier), so the log does show a fair amount of X errors such as a number of “Xlib: ignoring invalid extension event” and such.

t> inxi
CPU: 8-Core AMD Ryzen 9 7940HS w/ Radeon 780M Graphics (-MT MCP-) speed/min/max: 4000/1600/4000 MHz Kernel: 6.1.55 x86_64
Up: 1h 13m Mem: 6236.3/63020.6 MiB (9.9%) Storage: 5.42 TiB (0.4% used) Procs: 385 Shell: fish inxi: 3.3.04

> sudo nix-channel --list
nixos https://nixos.org/channels/nixos-23.05
nixos-hardware https://github.com/NixOS/nixos-hardware/archive/master.tar.gz

> journalctl
...skipping...
Sep 28 19:21:20 nixboss xsession[3527]: Xlib: ignoring invalid extension event 161
Sep 28 19:21:20 nixboss xsession[3527]: Xlib: ignoring invalid extension event 161
Sep 28 19:21:24 nixboss systemd[1]: Stopping User Manager for UID 175...
Sep 28 19:21:24 nixboss systemd[2614]: Activating special unit Exit the Session...
Sep 28 19:21:24 nixboss systemd[2614]: Stopped target Main User Target.
Sep 28 19:21:24 nixboss .xdg-desktop-po[2649]: Failed to create file chooser proxy: Error calling StartServiceByName for org.freedesktop.impl.portal.desktop.gtk: The connection is closed
Sep 28 19:21:24 nixboss .xdg-desktop-po[2649]: No skeleton to export
Sep 28 19:21:24 nixboss .xdg-desktop-po[2649]: Error while sending AddMatch() message: The connection is closed
Sep 28 19:21:24 nixboss .xdg-desktop-po[2649]: Error while sending AddMatch() message: The connection is closed
Sep 28 19:21:24 nixboss .xdg-desktop-po[2649]: Error while sending AddMatch() message: The connection is closed
Sep 28 19:21:24 nixboss .xdg-desktop-po[2649]: Failed to create app chooser proxy: Error calling StartServiceByName for org.freedesktop.impl.portal.desktop.gtk: The connection is closed
Sep 28 19:21:24 nixboss .xdg-desktop-po[2649]: No skeleton to export
Sep 28 19:21:24 nixboss systemd[2614]: Stopping D-Bus User Message Bus...
Sep 28 19:21:24 nixboss .xdg-desktop-po[2649]: Error while sending AddMatch() message: The connection is closed
Sep 28 19:21:24 nixboss .xdg-desktop-po[2649]: Error while sending AddMatch() message: The connection is closed
Sep 28 19:21:24 nixboss .xdg-desktop-po[2649]: Error while sending AddMatch() message: The connection is closed
Sep 28 19:21:24 nixboss systemd[2614]: Stopping flatpak document portal service...
Sep 28 19:21:24 nixboss systemd[2614]: Stopping sandboxed app permission store...
Sep 28 19:21:24 nixboss systemd[2614]: Stopped D-Bus User Message Bus.
Sep 28 19:21:24 nixboss systemd[2614]: xdg-permission-store.service: Main process exited, code=exited, status=1/FAILURE
Sep 28 19:21:24 nixboss systemd[2614]: xdg-permission-store.service: Failed with result 'exit-code'.
Sep 28 19:21:24 nixboss systemd[2614]: Stopped sandboxed app permission store.
Sep 28 19:21:24 nixboss systemd[2614]: Stopped Portal service.
Sep 28 19:21:24 nixboss systemd[1]: run-user-175-doc.mount: Deactivated successfully.
Sep 28 19:21:24 nixboss systemd[2614]: xdg-document-portal.service: Main process exited, code=exited, status=20/n/a
Sep 28 19:21:24 nixboss systemd[2614]: xdg-document-portal.service: Failed with result 'exit-code'.
Sep 28 19:21:24 nixboss systemd[2614]: Stopped flatpak document portal service.
Sep 28 19:21:24 nixboss systemd[2614]: Removed slice User Core Session Slice.
Sep 28 19:21:24 nixboss systemd[2614]: Stopped target Basic System.
Sep 28 19:21:24 nixboss systemd[2614]: Stopped target Paths.
Sep 28 19:21:24 nixboss systemd[2614]: Stopped target Sockets.
Sep 28 19:21:24 nixboss systemd[2614]: Stopped target Timers.
Sep 28 19:21:24 nixboss systemd[2614]: Closed D-Bus User Message Bus Socket.
Sep 28 19:21:24 nixboss systemd[2614]: Closed GnuPG cryptographic agent (ssh-agent emulation).
Sep 28 19:21:24 nixboss systemd[2614]: Closed GnuPG cryptographic agent and passphrase cache.
Sep 28 19:21:24 nixboss systemd[2614]: Closed PipeWire PulseAudio.
Sep 28 19:21:24 nixboss systemd[2614]: Closed PipeWire Multimedia System Socket.
Sep 28 19:21:24 nixboss systemd[2614]: Removed slice User Application Slice.
Sep 28 19:21:24 nixboss systemd[2614]: Reached target Shutdown.
Sep 28 19:21:24 nixboss systemd[2614]: Finished Exit the Session.
Sep 28 19:21:24 nixboss systemd[2614]: Reached target Exit the Session.
Sep 28 19:21:24 nixboss (sd-pam)[2615]: pam_unix(systemd-user:session): session closed for user sddm
Sep 28 19:21:24 nixboss systemd[1]: user@175.service: Deactivated successfully.
Sep 28 19:21:24 nixboss systemd[1]: Stopped User Manager for UID 175.
Sep 28 19:21:24 nixboss systemd[1]: Stopping User Runtime Directory /run/user/175...
Sep 28 19:21:24 nixboss systemd[1]: run-user-175.mount: Deactivated successfully.
Sep 28 19:21:24 nixboss systemd[1]: user-runtime-dir@175.service: Deactivated successfully.
Sep 28 19:21:24 nixboss systemd[1]: Stopped User Runtime Directory /run/user/175.
-- Boot 23869962b00e4870a7e978735d6cbb53 --```

Did you figure out what this was? I’m experience it too…