From 120ee3a0712594fb0c4fdf99c04f0e9d8874335d Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Wed, 13 May 2026 13:43:33 +0100 Subject: fix(logind): ignore KEY_POWER short-press to stop Shokz dongle shutdowns MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Shokz OpenMeet dongle (3511:2EF2) emits KEY_POWER on USB enumeration and on headset power transitions, which logind handles with HandlePowerKey=poweroff and immediately shuts the host down. The previous attempt — an hwdb scancode remap of c0030 to reserved — sets the udev property correctly but the kernel does not honor EVIOCSKEYCODE for this device's HID consumer-page mapping (verified: KEY_POWER 116 still appears in the evdev keymap after udevadm trigger and libinput still reports it). Drop the hwdb file and the systemd-hwdb hooks from the etc deploy script. Replace with a logind drop-in that sets HandlePowerKey=ignore and HandlePowerKeyLongPress=poweroff. Single-tap power events from any source become no-ops; a 5s hold still shuts the machine down, so the real hardware-power-button safety net is preserved. Add a HUP to systemd-logind in the deploy script so the change takes effect without restarting the daemon. --- etc/udev/hwdb.d/70-shokz-openmeet.hwdb | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 etc/udev/hwdb.d/70-shokz-openmeet.hwdb (limited to 'etc/udev/hwdb.d/70-shokz-openmeet.hwdb') diff --git a/etc/udev/hwdb.d/70-shokz-openmeet.hwdb b/etc/udev/hwdb.d/70-shokz-openmeet.hwdb deleted file mode 100644 index f35b94e..0000000 --- a/etc/udev/hwdb.d/70-shokz-openmeet.hwdb +++ /dev/null @@ -1,7 +0,0 @@ -# Shokz OpenMeet (Loop120 dongle, 3511:2EF2) emits HID Consumer-page Power -# (scancode c0030 -> KEY_POWER) on enumeration AND when the headset is -# powered off, which causes systemd-logind to shut down the host. Suppress -# only that scancode; KEY_MUTE / volume / media keys on the same Consumer -# Control node remain functional. -evdev:input:b0003v3511p2EF2* - KEYBOARD_KEY_c0030=reserved -- cgit v1.3.1