The problem
I had an ADATA XPG wireless gaming mouse that, on Linux, would simply stop reporting input events. The hardware worked, the dongle enumerated, but the cursor would freeze and clicks would get dropped. A lot of gaming mice do this: they go quiet when idle and never wake the HID layer back up.The fix
The kernel already has a mechanism for exactly this class of misbehaving devices —HID_QUIRK_ALWAYS_POLL, which forces the driver to keep polling the device so it never falls silent. The device just needed to be told to use it.
My patch does two things:
drivers/hid/hid-ids.h— defines the USB vendor and device IDs for the ADATA XPG mouse and its dongle (vendor0x125f, devices0x7505and0x7506).drivers/hid/hid-quirks.c— registersHID_QUIRK_ALWAYS_POLLfor both the mouse and the dongle.
What I learned
The hard part wasn’t the code — it was the process. Reading the HID subsystem, confirming the IDs withlsusb, writing a commit message the maintainers would accept, and sending it the right way. The patch was reviewed and merged by Jiri Kosina, the HID subsystem maintainer.
View the commit
HID: quirks: Add ADATA XPG alpha wireless mouse support — in Linus Torvalds’ tree.