blob: 1ca4cc312d09b21ba2b256ef68c2315c0221480b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
[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.
HandlePowerKey=ignore
HandlePowerKeyLongPress=ignore
|