aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/etc/systemd/logind.conf.d
diff options
context:
space:
mode:
authorLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-07-02 11:35:35 +0100
committerLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-07-02 11:35:35 +0100
commitf0c626059451e1f8621600e610240739d5633560 (patch)
tree4dc71f10a68b2c273ed2107f8af4a20c08894a2d /etc/systemd/logind.conf.d
parent694cd2fc4680ccea939c9569f0a76cf1deaa5d2d (diff)
downloaddotfiles-f0c626059451e1f8621600e610240739d5633560.tar.gz
dotfiles-f0c626059451e1f8621600e610240739d5633560.tar.bz2
dotfiles-f0c626059451e1f8621600e610240739d5633560.zip
Prune stale dotfiles commentary
Diffstat (limited to 'etc/systemd/logind.conf.d')
-rw-r--r--etc/systemd/logind.conf.d/10-ignore-power-key.conf12
-rw-r--r--etc/systemd/logind.conf.d/20-lid-ac.conf14
2 files changed, 3 insertions, 23 deletions
diff --git a/etc/systemd/logind.conf.d/10-ignore-power-key.conf b/etc/systemd/logind.conf.d/10-ignore-power-key.conf
index 1ca4cc3..5b1dc15 100644
--- a/etc/systemd/logind.conf.d/10-ignore-power-key.conf
+++ b/etc/systemd/logind.conf.d/10-ignore-power-key.conf
@@ -1,14 +1,4 @@
[Login]
-# Ignore KEY_POWER from any source. Misbehaving USB devices (cheap
-# keyboards, KVM switches, headset dongles) sometimes emit KEY_POWER on
-# enumeration, hot-plug, or for unrelated buttons -- and some emit a
-# press without a matching release, which logind classifies as a
-# long-press and acts on after 5s. Ignoring both short and long press
-# is the only reliable policy without per-device evdev filtering.
-#
-# Real shutdowns: `systemctl poweroff` or GUI menus. The laptop's
-# physical power button also emits KEY_POWER and is now a no-op for
-# clean shutdowns; a very long hold (~10s) still triggers a firmware
-# force-off as a last resort.
+# Ignore KEY_POWER events, including long-press handling.
HandlePowerKey=ignore
HandlePowerKeyLongPress=ignore
diff --git a/etc/systemd/logind.conf.d/20-lid-ac.conf b/etc/systemd/logind.conf.d/20-lid-ac.conf
index 08e5014..6865232 100644
--- a/etc/systemd/logind.conf.d/20-lid-ac.conf
+++ b/etc/systemd/logind.conf.d/20-lid-ac.conf
@@ -1,14 +1,4 @@
[Login]
-# Suspend policy: closing the lid suspends ONLY when on battery. When
-# AC is connected the lid switch is ignored entirely. The rationale is
-# simple and matches user mental model -- if you don't want the
-# machine to sleep, plug it in.
-#
-# This obsoletes the previous SSH/zellij-aware inhibit machinery: any
-# long-running task (build, download, SSH session, server) just needs
-# AC and will never be suspended out from under itself.
-#
-# `HandleLidSwitch` (default = suspend) still applies on battery.
-# `HandleLidSwitchDocked` (default = ignore) still applies when an
-# external monitor / dock is attached.
+# On AC, closing the lid does not suspend. Battery/docked behavior uses
+# logind defaults.
HandleLidSwitchExternalPower=ignore