Drop the Shokz dongle phantom power key with a libinput quirk - #9850
Open
xymbol wants to merge 1 commit into
Open
Drop the Shokz dongle phantom power key with a libinput quirk#9850xymbol wants to merge 1 commit into
xymbol wants to merge 1 commit into
Conversation
Shokz USB headset dongles (3511:2B1E/2EF2/2F06) declare their proprietary control channel as a single Consumer "Power" usage spanning 511- and 128-byte input reports. The kernel duplicates that usage across every byte position and maps each one to KEY_POWER, so ordinary headset telemetry synthesizes phantom power-key presses that open the system menu whenever the dongle is plugged in or the headset changes state. Ship the quirk source at default/libinput/50-omarchy.quirks for omarchy-settings to install package-owned at /usr/share/libinput/50-omarchy.quirks, leaving /etc/libinput/local-overrides.quirks free for local overrides.
xymbol
force-pushed
the
shokz-libinput-quirk
branch
from
September 2, 2026 17:43
0ad145d to
860eb3b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Ships a libinput quirk that drops the phantom
KEY_POWERevents Shokz USB headset dongles emit, so the system menu stops opening by itself.Requires the companion PR in omarchy-pkgs: omacom/omarchy-pkgs#279. Without it the file ships only under
/usr/share/omarchy/default/and has no effect.Why
Shokz dongles (
3511:2B1E/2EF2/2F06) declare their proprietary control channel inside the Consumer Control collection using a single Consumer page usage0x30, which means "Power". The kernel duplicates that lone usage across every byte position of the three 511-byte and one 128-byte input reports (1661 usages) andhid-inputmaps Consumer0x30toKEY_POWERunconditionally. Ordinary headset telemetry therefore arrives as power-key presses, a few seconds after plug-in and again on later link or battery state changes.Omarchy binds
XF86PowerOffto the system menu (default/hypr/bindings/utilities.lua), so each phantom press opens it. The dongles have no host power button, so droppingKEY_POWERfor them loses nothing; volume and media keys on the same node are untouched.A hwdb keycode remap cannot fix this: udev issues one
EVIOCSKEYCODEper entry andhidinput_setkeycode()reaches only the first of the 1661 duplicated usages. Filtering the event code in libinput is unaffected by the duplication.Placement
default/libinput/50-omarchy.quirks, installed package-owned at/usr/share/libinput/50-omarchy.quirks, per the quick reference indocs/file-layout.mdand matchingdefault/fontconfig/conf.avail/50-omarchy.conf.Deliberately not
/etc/libinput/local-overrides.quirks: that is the single admin override path libinput reads, and a package owning it would conflict with users who already applied the manual workaround.No migration. Package-owned files reach existing installs through pacman on the next
omarchy update, which is how every otherdefault/**system file ships. It takes effect at the next Hyprland start.Device coverage
0x2F06(Loop120) is verified by full HID descriptor decode and on-hardware testing.0x2EF2(Loop120) and0x2B1E(OpenComm2 UC) come from public reports of the same symptom;0x2B1Eis corroborated by the existingUSB_ID(0x3511, 0x2b1e)entry insound/usb/quirks.c. The quirk is an exact VID:PID match and inert on anything else.Upstream
Reported to libinput as libinput#1333 with a
libinput recordcapture attached and the same quirk offered as a patch. Once it ships in a libinput release and reaches Arch, this file becomes redundant and can be deleted with no migration.Tests
./test/cli— pass./test/shell— 226 of 227. The single failure isruntime-smoke-test.sh, which fails identically on pristinequattroon the same machine.test/shell.d/libinput-quirks-test.sh— pass. Validates the file throughlibinput quirks validate, pins the three PIDs, and assertsKEY_POWERis the only event code touched. Negative-tested against a deliberately broken section.libinput quirks listagainst the shipped file printsAttrEventCode=-KEY_POWER;. Confirmed behaviorally on 4.0.2 with the same rule installed as a local override: after a Hyprland restart the menu no longer opens on headset power-cycle, and the dongle's volume keys still work.