INC-2026-05-23-001: Prevention

What Went Well

  • journalctl -b -1 immediately revealed the exact sequence: Power key pressed short. Powering off…​ — no ambiguity

  • The fix is a single drop-in file — no package changes, no config migration

  • busctl verification confirmed the change was active without requiring a test press

What Could Be Improved

  • Audit logind defaults on fresh installs: HandlePowerKey=poweroff is a dangerous default for laptops where the power button is adjacent to other keys or used as a wake mechanism. This should be overridden in dots-quantum stow packages.

  • Never systemctl restart systemd-logind: Use systemctl kill -s HUP systemd-logind or reboot. Restarting logind kills all sessions. This lesson cost a session during the fix itself.

  • dots-quantum should include logind drop-ins: The power button config should be part of the stowed dotfiles so it deploys automatically on new machines.

Key Takeaways
  • HandlePowerKey=poweroff is the systemd default — override it on every machine via /etc/systemd/logind.conf.d/

  • Never restart logind on a running session — use systemctl kill -s HUP systemd-logind to reload config safely

  • logind processes hardware keys before the compositor — Hyprland keybinds cannot intercept XF86PowerOff if logind handles it first

  • Black screen + power button = data loss risk — if DPMS wake fails and power button means shutdown, the user loses all unsaved work