Bug 218495

Summary: NKRO does not work on Mistel MD770 (Holtek Semiconductor, Inc. USB-HID Keyboard)
Product: Drivers Reporter: Tatsuyuki Ishi (ishitatsuyuki)
Component: USBAssignee: Default virtual assignee for Drivers/USB (drivers_usb)
Status: NEW ---    
Severity: normal    
Priority: P3    
Hardware: All   
OS: Linux   
Kernel Version: Subsystem:
Regression: No Bisected commit-id:
Attachments: BPF program to fix the quirk
lsusb description of the device
hid-record of the NKRO sequence and report descriptor

Description Tatsuyuki Ishi 2024-02-14 17:33:47 UTC
Created attachment 305872 [details]
BPF program to fix the quirk

My Mistel MD770 (04d9:0339 Holtek Semiconductor, Inc. USB-HID Keyboard) seems to have a descriptor quirk that prevents NKRO from working. A device descriptor, a hid capture of NKRO sequence and proposed BPF program for fix is attached.

It's the exact same error as the Topre quirk [1], but the descriptor and offset is different.

NKRO works on Windows without extra vendor drivers. I'm not sure if Microsoft just has a better quirk database, or they have some clever heuristics to detect this. Before copy pasting the Topre code and calling it a patch, I would like to ask about what's the best way to fix this.

[1]: https://gitlab.freedesktop.org/libinput/libinput/-/issues/804
Comment 1 Tatsuyuki Ishi 2024-02-14 17:34:03 UTC
Created attachment 305873 [details]
lsusb description of the device
Comment 2 Tatsuyuki Ishi 2024-02-14 17:34:37 UTC
Created attachment 305874 [details]
hid-record of the NKRO sequence and report descriptor