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.conf11
1 files changed, 11 insertions, 0 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
new file mode 100644
index 0000000..b5d5e34
--- /dev/null
+++ b/etc/systemd/logind.conf.d/10-ignore-power-key.conf
@@ -0,0 +1,11 @@
+[Login]
+# Ignore single-tap KEY_POWER from any source. The Shokz OpenMeet dongle
+# (3511:2EF2) emits KEY_POWER on USB enumeration and on headset power
+# transitions, which would otherwise immediately shut the host down. An
+# hwdb scancode remap was attempted but the kernel does not honor
+# EVIOCSKEYCODE for this device's HID consumer-page mapping.
+#
+# Long-press (>=5s) still triggers poweroff, preserving the real
+# hardware-power-button safety net.
+HandlePowerKey=ignore
+HandlePowerKeyLongPress=poweroff