Blur Busters Forums

Who you gonna call? The Blur Busters! For Everything Better Than 60Hz™ Skip to content

Interesting project about mouse/ gamepad latency

Everything about input lag. Tips, testing methods, mouse lag, display lag, game engine lag, whole input lag chain, VSYNC OFF vs VSYNC ON, and more! Input Lag Articles on Blur Busters.

Interesting project about mouse/ gamepad latency

Postby Simon95 » 12 May 2019, 16:14

https://hci.ur.de/projects/latency

There is a german project, where they measure the delay between clicking on the mouse and the reaction on the computer. There was a big range from 5ms to 35ms input delay for different logitech mice. I found it on a german tech page and i thought it belongs here. Check it out :)
Last edited by Simon95 on 12 May 2019, 18:01, edited 1 time in total.
Simon95
 
Posts: 7
Joined: 13 Feb 2019, 06:56

Re: Interesting project about mouse/ gamepad latency

Postby R-W » 12 May 2019, 17:06

Hey, author here. Thank you for your interest in this work :)

Here is a direct link to the PDF: https://epub.uni-regensburg.de/40182/1/ ... ersion.pdf

We will update the project page over the next days (just came back from the conference where we presented this research).
Feel free to point out any errors or unanswered questions.
Last edited by R-W on 13 May 2019, 03:58, edited 1 time in total.
R-W
 
Posts: 5
Joined: 12 May 2019, 16:36

Re: Interesting project about mouse/ gamepad latency

Postby Chief Blur Buster » 12 May 2019, 20:41

Fantastic research!

mouse-lag-test.jpg
mouse-lag-test.jpg (80.3 KiB) Viewed 539 times


Measuring that part of the latency chain is quite important.

I've sent you a PM, check it out...
Head of Blur Busters - BlurBusters.com | TestUFO.com | Follow @BlurBusters on Twitter

       To support Blur Busters:
       • Official List of Best Gaming Monitors
       • List of G-SYNC Monitors
       • List of FreeSync Monitors
       • List of Ultrawide Monitors
User avatar
Chief Blur Buster
Site Admin
 
Posts: 6055
Joined: 05 Dec 2013, 15:44

Re: Interesting project about mouse/ gamepad latency

Postby R-W » 13 May 2019, 03:01

Chief Blur Buster wrote:Fantastic research!
Measuring that part of the latency chain is quite important.
I've sent you a PM, check it out...


Thank you :)
But:

Inbox wrote:You are not authorised to read private messages.

Is this intentional behavior for new subscribers?
R-W
 
Posts: 5
Joined: 12 May 2019, 16:36

Re: Interesting project about mouse/ gamepad latency

Postby Chief Blur Buster » 13 May 2019, 08:53

Ooops!
I keep forgetting this, I had to bump it to minimum 5 posts because of some chinese spambots that registered and spammed everyone on the forums a while back.

Send me an email to mark(at)blurbusters.com as I'd like to cover this at Blur Busters!
Head of Blur Busters - BlurBusters.com | TestUFO.com | Follow @BlurBusters on Twitter

       To support Blur Busters:
       • Official List of Best Gaming Monitors
       • List of G-SYNC Monitors
       • List of FreeSync Monitors
       • List of Ultrawide Monitors
User avatar
Chief Blur Buster
Site Admin
 
Posts: 6055
Joined: 05 Dec 2013, 15:44

Re: Interesting project about mouse/ gamepad latency

Postby Sparky » 13 May 2019, 11:59

Always good to have more attention on input lag. Glad to see you have a test setup that measures absolute input lag, rather than just a relative measurement between two mice, which is currently the most popular method for this measurement.

1. the user first touches the input device,
2. the user overcomes activation force and triggers a mechanical
switch (~ 20 ms [11]),
3. the mechanical switch closes an electrical circuit,
4. the closed circuit is detected by the device’s controller
chip (~ 1-20 ms),
5. after processing the sensor data the chip puts data into
a USB buffer (~ 1-20 ms),
6. the host computer queries the USB device for new data
(~ 1-10 ms),
7. the device sends data over the wire (0.001 ms),
8. the host computer notifies the OS about new data from
the USB (0.001 ms),
9. the OS has processed the data and made it available to
userland libraries (0.01 ms),
10. user code has received an input event from a userland
library (0.01 ms).



In the model of switch I tested,Step 3 typically takes about 2ms for a "normal" click, but ranges from about 0.5ms to many tens of milliseconds. https://www.overclock.net/forum/375-mic ... st25711039


If the engineer prioritizes latency, and is using double throw switches, steps 4 and 5 combined should take less than 0.1ms. Using single throw switches you have to use delay based debouncing, but press latency can still be low, only releasing the button really needs a long delay. Unfortunately the delay you need to reliably prevent glitches like double clicking on a single click, or releasing during a drag, is long enough that it would interfere with people spamming clicks intentionally. Unless you use the NC contact for debouncing, in which case you don't need any delays.

In your testing did you come across any mice that actually used the normally closed switch contact for debouncing?

Getting a polling interval faster than 1ms is also possible, but impractical. Either you need a USB driver that polls the input device more frequently than the USB spec calls for, or you need to implement a high speed device, which is expensive and overkill.

As for possible improvements: Maybe a mechanical test fixture that uses an accelerometer for the non-usb trigger. This would let you test devices without opening them, include differences in mechanical actuation time, and give a more accurate test of input devices like keyboards, where each button isn't sampled continuously.
Sparky
 
Posts: 628
Joined: 15 Jan 2014, 02:29

Re: Interesting project about mouse/ gamepad latency

Postby R-W » 14 May 2019, 09:27

Sparky wrote:Always good to have more attention on input lag. Glad to see you have a test setup that measures absolute input lag, rather than just a relative measurement between two mice, which is currently the most popular method for this measurement.
[...]
In the model of switch I tested,Step 3 typically takes about 2ms for a "normal" click, but ranges from about 0.5ms to many tens of milliseconds. https://www.overclock.net/forum/375-mic ... st25711039

Interesting post, thanks!

Sparky wrote:If the engineer prioritizes latency, and is using double throw switches, steps 4 and 5 combined should take less than 0.1ms. Using single throw switches you have to use delay based debouncing, but press latency can still be low, only releasing the button really needs a long delay. Unfortunately the delay you need to reliably prevent glitches like double clicking on a single click, or releasing during a drag, is long enough that it would interfere with people spamming clicks intentionally. Unless you use the NC contact for debouncing, in which case you don't need any delays.

Oh, nice - I didn't know of this method. We haven't yet looked into debouncing or any other aspects of mechanical keypresses. Sounds like an interesting topic.

Sparky wrote:In your testing did you come across any mice that actually used the normally closed switch contact for debouncing?

I don't know. We completely ignored the switches and just looked for their pins on the PCB.

Sparky wrote:Getting a polling interval faster than 1ms is also possible, but impractical. Either you need a USB driver that polls the input device more frequently than the USB spec calls for, or you need to implement a high speed device, which is expensive and overkill.

You are absolutely right. USB high-speed devices can be polled every 125µs subframe, i.e. at 8000 Hz. In practice, we haven't come across an input device that acts as high-speed device (there are certainly ones somewhere). We settled for 1 ms in our tests because that conforms to the USB standard and can be easily set.
Also, the mousepoll/... USB HID parameters on Linux only allow for setting a minimum of 1 ms - and the Linux EHCI USB code also uses 1 ms as the minimum polling interval.
I guess, for some of the really fast devices, using the higher polling rate could make a difference - but we are talking about less than one millisecond.

Sparky wrote:As for possible improvements: Maybe a mechanical test fixture that uses an accelerometer for the non-usb trigger. This would let you test devices without opening them, include differences in mechanical actuation time, and give a more accurate test of input devices like keyboards, where each button isn't sampled continuously.


We tried something like this using a force sensor. With clicky buttons one could easily determine when the button snapped through because the force applied to the button would suddenly be reduced. But with mushy buttons (many keyboards, gamepads - everything with rubber dome switches), you won't get reliable results. Therefore we focused on the electrical part first - but might investigate mechanical button latency some time in the future.
R-W
 
Posts: 5
Joined: 12 May 2019, 16:36

Re: Interesting project about mouse/ gamepad latency

Postby Sparky » 15 May 2019, 00:00

R-W wrote:We tried something like this using a force sensor. With clicky buttons one could easily determine when the button snapped through because the force applied to the button would suddenly be reduced. But with mushy buttons (many keyboards, gamepads - everything with rubber dome switches), you won't get reliable results. Therefore we focused on the electrical part first - but might investigate mechanical button latency some time in the future.


I was thinking drop a ~200g mass onto the buttons from a fixed height above the button, and triggering when the object first touches the button, rather than when it overcomes the spring.

With minimal changes you could also test motion latency, not just click latency.
Sparky
 
Posts: 628
Joined: 15 Jan 2014, 02:29

Re: Interesting project about mouse/ gamepad latency

Postby stl8k » 15 May 2019, 08:07

This seems like relevant research:

https://userinterfaces.aalto.fi/neuromechanics/
stl8k
 
Posts: 1
Joined: 15 May 2019, 07:59

Re: Interesting project about mouse/ gamepad latency

Postby R-W » 15 May 2019, 15:12

stl8k wrote:This seems like relevant research:

https://userinterfaces.aalto.fi/neuromechanics/


Indeed. There are a few groups who do/did research on latency in input devices or systems.

See also:

https://www.tactuallabs.com/papers/desi ... UIST12.pdf

http://mjolnir.lille.inria.fr/turbotouc ... UIST15.php
R-W
 
Posts: 5
Joined: 12 May 2019, 16:36

Next

Return to Input Lag

Who is online

Users browsing this forum: No registered users and 1 guest