This DKMS module allows you to overclock some USB devices by overriding their endpoints’ bInterval values in the device descriptors – if the device physically allows you to poll it at higher frequency and will give you more data.

Back on Windows this (with the same method) was rather trivial using the “hidusbf” program. And ever since moving to Linux I was pretty annoyed I didn’t have a similarly simple enough way of doing the same thing. So basically I guess I had no choice but to make one.

And the module allows doing that for theoretically any USB device without patching and re-compiling the kernel. Installation instructions are in the README (there’s .deb, .rpm and AUR packages):

https://github.com/p0358/usb_oc-dkms

So let me know what you think, and if you managed to overclock any gamepads or other devices, or want to try.

  • typhoon@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    56 minutes ago

    Hi, quick question, for a real world case scenario. If one has a Keychron M6 Wireless Mouse Pixart 3950 8K Polling rate compatible out of the box with Linux via Chromium browser tweaks, would them need this DKMS module to allow it to reach the 8K pool rate OR this is to potentially surpass the manufacture ceiling?

    • p0358@lemmy.blahaj.zoneOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      17 minutes ago

      8K poll rate is the maximum for USB 2.0 devices (or rather faster than USB 1.1 speed ones), so you cannot achieve anything higher than that, at least not with this method (I don’t know if the host hardware can be even forced to poll higher, that could be an interesting project to try at some point maybe).

      Did you actually benchmark that it can poll this high btw? We found an interesting thing with DualSense controllers that were frequently mentioned that they poll at 8K, but it turns out it might be only motion sensors, and the actual controller part that people would care about is only still 1K basically…

      would them need this DKMS module to allow it to reach the 8K pool rate

      And if I understood you correctly, your mouse has web-based settings portal that allows you to set the polling rate there? If so then that module won’t give you anything further, as it’s meant for devices that don’t expose such a setting for the user to choose, and yet they can be forced to be polled higher nonetheless (that seems more common with controllers than pro mice, but there are mouses like that out there too)

  • themoken@startrek.website
    link
    fedilink
    English
    arrow-up
    24
    ·
    edit-2
    12 hours ago

    It’s always great to see someone scratch their own itch, so kudos. However, I’m curious what the actual pain point is? Does your mouse not sample fast enough? Noticeable input lag on a gamepad? Seems like this would be a bug with the implementation if it needs to be overclocked to fix…

    • HouseWolf@pawb.social
      link
      fedilink
      English
      arrow-up
      1
      ·
      58 minutes ago

      I heard way back when that overclocking mice wasn’t too unheard of around some competitive Quake players. But this was when mice were still mainly using 100 to 250hz polling rate.

      Think most big brand mice and certainly any half decent gaming mouse will be 1000hz nowadays. But people will always want bigger and faster which you see now with some 4000/8000hz peripherals popping up.

    • p0358@lemmy.blahaj.zoneOP
      link
      fedilink
      English
      arrow-up
      26
      ·
      12 hours ago

      Well, it’s not that there’s a particular “problem” in a sense like a bug. But it’s that if the device can be pushed further, and thus by higher polling we achieve lower effective input latency and slightly smoother input, then why wouldn’t we do it? The same way gamers get higher refresh rate screens (and sometimes yet try to push them further), or other devices.

      As for the implementation, my module is partially based on a patchset for actual kernel module, but it’s unclear to me if it was tried to be upstreamed or why it failed if so. But it clearly didn’t make it in, and there’s no sign of that changing any time soon. Maybe the kernel devs would consider it “unorthodox” to alter the descriptor parameters against what the manufacturer intended.

      But some devices do allow themselves to be polled higher and will just sample the inputs more often, if their firmware and sensors are capable of it. In fact, many “gaming” mice have a proprietary software that uses a proprietary protocol (this often has a Linux equivalent like Sonaar for Logitech) to set on-device settings where it’ll reconnect reporting different bInterval (requested polling rate) to the host based on what was set. And yet the manufacturers will by default use some “safe default” setting like 125 or 250 at most, just to avoid any potential issues on some devices and thus RMA costs, with opt-in options of 500 and 1000. But some manufacturers don’t bother making such an option or an app at all, so that’s where this module comes in. And especially for controllers, it’s much less common to see such an option even if the app is there, even though high amount of non-Microsoft controllers do allow such overclocking (Microsoft ones at 125 Hz locked are pathetic, you can feel the latency difference between that and my 250 Hz controller overclocked to 500 Hz side-by-side).

      But TL;DR is that it’s just a gamer optimization, and one that isn’t quite easily possible with upstream kernel currently. Some kernel modules do have some options for some degree of overclocking, but e.g. one of them has a bug that it didn’t work with USB 3 devices, so yeah…

  • db2@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    3
    ·
    9 hours ago

    overclocking USB devices

    What a crazy sentence. Kind of like calling your CPU cooler an underheater. 🤣

    What devices have you tested it on? I’d be curious if it corrupts data read from or written to a drive for instance, just to push the scope way beyond what was intended.

    • p0358@lemmy.blahaj.zoneOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      22 minutes ago

      Personally only controllers (my own mouse and keyboard already poll at 1000 Hz, suffering from success…). I can’t imagine it’d go too well with something like a drive xD It’s also worth noting it only overclocks Interrupt endpoint, and not other types like Isochronous, since they’re not used for input stuff and their bInterval values mean different things. But I wish I could find some other goofy device to try where there’d be a chance it could do anything other than breaking everything…