Git Product home page Git Product logo

linux-pollrate-patch's Introduction

This repository contains a highly experimental patch for the Linux kernel which provides a new usbcore.interrupt_interval_override module parameter that can be used to forcefully override the interrupt polling interval of an USB device.

Usage

This parameter will override the polling interval on all interrupt-type endpoints on a device identified by their vendor and product ID. An example usage of this parameter would be:

usbcore.interrupt_interval_override=045e:00db:16,1bcf:0005:2

This gives all USB devices with id 045e:00db an interrupt interval for 16ms, and all USB devices with id 1bcf:0005 an interrupt interval of 2ms. You can discover the id of your devices using the lsusb tool.

This parameter can be set at boot time by adding a parameter to your linux command line in your bootloader, or at runtime by writing to the file /sys/module/usbcore/parameters/interrupt_interval_override. For example:

echo "045e:00db:16,1bcf:0005:2" | sudo tee /sys/module/usbcore/parameters/interrupt_interval_override > /dev/null

If this parameter is modified at runtime, you may need to unplug&replug the affected USB device.

Not all USB devices support all polling intervals. Using a polling interval other than the one requested by the device may have unintended consequences. Use at your own risk. This program is provided WITHOUT ANY WARRANTY of any kind.

Applying the patch

At the time of writing, this patch should be applicable to the latest mainline kernel, and probably every kernel since 5.9-rc1. The patch will NOT directly apply to the 5.8.* kernels or older. To create a patched version of the Linux source code, do something like:

git clone https://github.com/torvalds/linux
git clone https://github.com/KarsMulder/Linux-Pollrate-Patch
cd linux
git apply ../Linux-Pollrate-Patch/pollrate.patch

The way to compile and install the kernel is distribution specific.

Legalese

This program is provided under the terms and condiditions of the GNU General Public License version 2. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

linux-pollrate-patch's People

Contributors

anonymouscommitter avatar karsmulder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

gloriouseggroll

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.