staging.inyokaproject.org

keyboard polling rate

Status: Ungelöst | Ubuntu-Version: Ubuntu 16.04 (Xenial Xerus)
Antworten |

dewid2

Anmeldungsdatum:
15. Juli 2018

Beiträge: Zähle...

Greetings, as the title suggests i was wondering about the keyboard polling rate, where to find an change them.

With a script I wrote I can track the time difference between key presses and while the statement you find on the internet that it is 125 Hz is true for mice, my keyboard printed distances of 4-5 seconds between press and release events. So I would guess its 250 Hz, but is there an official statement? Even better: A file that contains these values to be easily modified? I would prefer to poll both my keyboard and mouse at 1 kHz.

seahawk1986

Anmeldungsdatum:
27. Oktober 2006

Beiträge: 11278

The maximum usable polling rate is usually limited by the hardware/firmware of the device. Linux supports setting the polling rate for mice - have a look at mouse_polling_rate. For Keyboards it might to be a bigger challenge to bring the latency down - for adjustments within the normal bounds have a look at Keyboard_configuration_in_Xorg and for a discussion of the hardware/firmware side https://michael.stapelberg.de/posts/2018-04-17-kinx-latency-measurement/ and the project https://michael.stapelberg.de/posts/2018-04-17-kinx/ might be usefull.

dewid2

(Themenstarter)

Anmeldungsdatum:
15. Juli 2018

Beiträge: Zähle...

Thanks for your answer. The first link is quite useful. I found out the polling intervall of 5 ms of my device this way (which will be rounded to 4ms). The way described works the same for keyboards not just mice. My more complicated mechanical keyboard with LEDs and hotkey functions appears with 3-4 values for polling rates however, have to distinguish them by the additional information which is not easily understood. your second link describes only the typematic rate which is the rate at which a key is seemingly pressed (host software sided), after holding it for the typematic delay time. Not what ive been looking for but may help someone else who find this thread. The third link is very interesting again, especially his "study" what difference is noticable. If 15 ms is, then the input should not add another 50% on top of that (8s at 125 Hz) imo. 4ms however might be a tradeoff considering the monitor refresh delay.

Antworten |