Skip to main content

max / alloy

1.9 KB · 33 lines History Blame Raw
1 # Do not bring the greeter back while the machine is going down.
2 #
3 # Reported by Max 2026-09-03: rebooting flashes the login screen with garbled
4 # colours and what looks like text pasted into the username field, and only
5 # then reboots. Measured in fw12's shutdown journal rather than guessed:
6 #
7 # greetd[2434]: session opened for user greeter
8 # greetd: pam_systemd: Failed to issue CreateSession() varlink call
9 # systemd[1]: Stopping greetd.service - Greeter daemon...
10 # systemd[1]: Stopped alloy-vtrgb.service - Alloy console palette (Akari).
11 #
12 # All in the same second. The session ending for the reboot is an ordinary
13 # session exit as far as greetd is concerned, so `Restart=always` respawns it,
14 # and the vendor unit's `Conflicts=shutdown.target` only stops it once the
15 # shutdown transaction reaches it. In that window a fresh tuigreet draws on
16 # VT1 while systemd's own shutdown messages are writing to the same console
17 # and alloy-vtrgb is being torn down. The greeter's theme names ANSI slots
18 # that alloy-vtrgb defines (see etc/greetd/config.toml), so a greeter drawn
19 # after it stops is painted in the console's stock palette, which is the
20 # "artifacting". `--remember` supplies the username sitting in the field.
21 #
22 # Conflicts= cannot fix this: it fires when a start job is ENQUEUED, which is
23 # the trap 10-installer-medium.conf already records paying for. This refuses
24 # the start instead, which is the only half of the race Alloy owns.
25 #
26 # `is-system-running` reports `stopping` from the moment the shutdown
27 # transaction begins, so this is false exactly during shutdown and true on
28 # every ordinary logout, which must still return to the greeter. systemd
29 # retries under Restart= until the shutdown job stops the unit; those retries
30 # write nothing to the console, which is the whole point.
31 [Service]
32 ExecStartPre=/bin/sh -c '[ "$(systemctl is-system-running)" != stopping ]'
33