Skip to main content
One of the contributions I’m proudest of is small enough to fit in six lines — but it’s in the Linux kernel, which still feels a little unreal to type.

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 (vendor 0x125f, devices 0x7505 and 0x7506).
  • drivers/hid/hid-quirks.c — registers HID_QUIRK_ALWAYS_POLL for both the mouse and the dongle.
Six lines added, zero removed. Without the quirk, the device doesn’t generate input events properly; with it, the mouse just works.

What I learned

The hard part wasn’t the code — it was the process. Reading the HID subsystem, confirming the IDs with lsusb, 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.
It taught me that “contributing to the kernel” isn’t reserved for a special class of people. Sometimes it’s just noticing that your own hardware is broken and being stubborn enough to fix it for everyone.