aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/etc/systemd/logind.conf.d/10-ignore-power-key.conf
diff options
context:
space:
mode:
Diffstat (limited to 'etc/systemd/logind.conf.d/10-ignore-power-key.conf')
-rw-r--r--etc/systemd/logind.conf.d/10-ignore-power-key.conf18
1 files changed, 12 insertions, 6 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 6f01dc0..1ca4cc3 100644
--- a/etc/systemd/logind.conf.d/10-ignore-power-key.conf
+++ b/etc/systemd/logind.conf.d/10-ignore-power-key.conf
@@ -1,8 +1,14 @@
[Login]
-# Ignore single-tap KEY_POWER from any source. Misbehaving USB devices
-# (cheap keyboards, KVM switches, headset dongles) sometimes emit
-# KEY_POWER on enumeration or for unrelated buttons, which would
-# otherwise shut the host down. A long-press (>=5s) still triggers
-# poweroff, preserving the real hardware-power-button safety net.
+# 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.
HandlePowerKey=ignore
-HandlePowerKeyLongPress=poweroff
+HandlePowerKeyLongPress=ignore