sway
process stops as soon as podman
container exits, eg podman run --rm -it bash -c 'exit 0'
see resolution.md
For the last 1-2 years after switching XFCE on Arch Linux to Sway (Wayland) on NixOS I had on and off issues with podman
container exits resulting in sway
window manager exiting.
It might have been caused by moving sway
process inside a systemd service, but at the beginning I was not using enough containers to pinpoint the time.
podman run --rm -it bash -c 'exit 1'
has the same effect
it can run indefinitely, but as soon as container exits Sway closes down
podman run --rm -it bash -c 'exit 0'
executed from within SSH session does not impact anything (there is no issue)
Nov 08 13:12:10 oams sway[5909]: 00:08:59.248 [DEBUG] [sway/ipc-server.c:386] Sending shutdown::exit event
see cgroups-sway.md
they end up in the proper slice when running under SSH, see cgroups-ssh.md
Nov 08 15:27:06 oams sway[22442]: 00:13:03.684 [DEBUG] [sway/ipc-server.c:198] New client: fd 95
Nov 08 15:27:06 oams sway[22442]: 00:13:03.685 [INFO] [sway/ipc-server.c:558] IPC Client 95 disconnected
Nov 08 15:27:07 oams sway[22442]: 00:13:05.525 [DEBUG] [sway/ipc-server.c:328] Sending window::title event
Remco> I ended up at https://github.com/NixOS/nixpkgs/issues/249332
Remco> And through that on https://github.com/NixOS/nixpkgs/pull/248315
Remco> Which has:
Remco> "This probably usually goes unnoticed because systemd follows up by sending SIGTERM to all processes in the control group and this is respected. But if this signal is ignored, the container isn't stopped until systemd's timeout of 120 seconds expires."
Remco> So if it sends a sigterm not just for the containers but also for conmon/slirp, that means sway would shut down
podman run --sdnotify=ignore
fixed the issue completely, it must be interacting with how i run my Sway service: