aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--etc/udev/hwdb.d/70-shokz-openmeet.hwdb7
-rw-r--r--etc/udev/rules.d/80-shokz-blacklist.rules1
-rwxr-xr-xrun_onchange_after_deploy-etc.sh.tmpl5
3 files changed, 12 insertions, 1 deletions
diff --git a/etc/udev/hwdb.d/70-shokz-openmeet.hwdb b/etc/udev/hwdb.d/70-shokz-openmeet.hwdb
new file mode 100644
index 0000000..f35b94e
--- /dev/null
+++ b/etc/udev/hwdb.d/70-shokz-openmeet.hwdb
@@ -0,0 +1,7 @@
+# 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
diff --git a/etc/udev/rules.d/80-shokz-blacklist.rules b/etc/udev/rules.d/80-shokz-blacklist.rules
deleted file mode 100644
index a5314a4..0000000
--- a/etc/udev/rules.d/80-shokz-blacklist.rules
+++ /dev/null
@@ -1 +0,0 @@
-SUBSYSTEM=="usb", ATTRS{idVendor}=="3511", ATTRS{idProduct}=="2ef2", DRIVER=="usbhid", ATTR{authorized}="0"
diff --git a/run_onchange_after_deploy-etc.sh.tmpl b/run_onchange_after_deploy-etc.sh.tmpl
index 3fdb42b..adf00eb 100755
--- a/run_onchange_after_deploy-etc.sh.tmpl
+++ b/run_onchange_after_deploy-etc.sh.tmpl
@@ -27,6 +27,11 @@ done
# sudo-rs: /etc/pam.d/sudo-i is a symlink to /etc/pam.d/sudo
sudo ln -sfT sudo /etc/pam.d/sudo-i
+# Recompile the udev hardware database so any etc/udev/hwdb.d/*.hwdb files
+# we just deployed take effect on next device event.
+sudo systemd-hwdb update
+sudo udevadm trigger --subsystem-match=input --action=change
+
# Make sudo-rs the system-wide sudo via /usr/local/bin precedence.
# Targets may not exist yet on first bootstrap (sudo-rs is installed by
# the subsequent pkg-apply step); the symlinks resolve once it lands.