Best way to test display lag?

Everything about latency. Tips, testing methods, mouse lag, display lag, game engine lag, network lag, whole input lag chain, VSYNC OFF vs VSYNC ON, and more! Input Lag Articles on Blur Busters.
Sparky
Posts: 682
Joined: 15 Jan 2014, 02:29

Re: Best way to test display lag?

Post by Sparky » 15 Jan 2014, 23:53

Chief Blur Buster wrote:
Sparky wrote:I think it would be most effective to use a microcontroller to simulate a mouse, and illuminate a LED at the same time it gives the computer a movement input.
Could work, but admittedly far harder than hardwiring a LED physically to the mouse button.
There are already tools that measures mouse movement consistency (from poll to poll).

Also, measuring mouse movement by high speed camera won't be as reliable as measuring button by high speed camera, because an accidental micro movement of the mouse might not register in the drivers, while early almost-stationary movement of the mouse might cause the LED to light early while there is no movement in the high speed video. Mouse movements is currently very hard to benchmark input lag on, because there's so many opportunities for false alarms (LED not lit versus LED lit prematurely) and undetected moments in high speed video. The button becomes a far easier benchmark, because a click is guaranteed sent when the LED is lit up. It's super-simple ON/OFF logic, the mouse button completes the electrical circuit for the LED, and the mouse button registers a fast, violent, immediate on-screen action (gunshot that's easily captured into high speed video). Sometimes there's movement (crosshairs glow, crosshairs expand, upwards screen shift, etc) before the muzzle flash, but something big always suddenly happens when clicking the mouse button in an FPS, so it's very easy to capture in high speed camera. Very deterministic start (LED illuimination) and very deterministic end (screen reaction). The error margin for mouse clicks become small, with easy potential for only a +/-1ms error margin in high speed video input lag testing. You can't get that reliably deterministic with mouse movement input lag testing.

I certainly would love to hear ideas, if it could be as simple and deterministic as a buttons-to-pixels high speed camera test. The mouse button modification takes only 30 minutes, and the high speed video camera is cheap ($150), something totally doable by an average blogger/reviewer site. The likes of AnandTech and TomsHardware can easily take my idea (please give me credit) for the high speed video input lag testing.
I was thinking of something like an arduino leonardo, which already has a usb mouse/keyboard library. So you can use a button or timer to send a single move mouse 500px command, which should show up as a discrete event on high speed camera. I don't know the default USB polling rate, but I imagine you could set that to whatever you want.

User avatar
sharknice
Posts: 295
Joined: 23 Dec 2013, 17:16
Location: Minnesota
Contact:

Re: Best way to test display lag?

Post by sharknice » 16 Jan 2014, 00:09

Sparky wrote:
Chief Blur Buster wrote:
Sparky wrote:I think it would be most effective to use a microcontroller to simulate a mouse, and illuminate a LED at the same time it gives the computer a movement input.
Could work, but admittedly far harder than hardwiring a LED physically to the mouse button.
There are already tools that measures mouse movement consistency (from poll to poll).

Also, measuring mouse movement by high speed camera won't be as reliable as measuring button by high speed camera, because an accidental micro movement of the mouse might not register in the drivers, while early almost-stationary movement of the mouse might cause the LED to light early while there is no movement in the high speed video. Mouse movements is currently very hard to benchmark input lag on, because there's so many opportunities for false alarms (LED not lit versus LED lit prematurely) and undetected moments in high speed video. The button becomes a far easier benchmark, because a click is guaranteed sent when the LED is lit up. It's super-simple ON/OFF logic, the mouse button completes the electrical circuit for the LED, and the mouse button registers a fast, violent, immediate on-screen action (gunshot that's easily captured into high speed video). Sometimes there's movement (crosshairs glow, crosshairs expand, upwards screen shift, etc) before the muzzle flash, but something big always suddenly happens when clicking the mouse button in an FPS, so it's very easy to capture in high speed camera. Very deterministic start (LED illuimination) and very deterministic end (screen reaction). The error margin for mouse clicks become small, with easy potential for only a +/-1ms error margin in high speed video input lag testing. You can't get that reliably deterministic with mouse movement input lag testing.

I certainly would love to hear ideas, if it could be as simple and deterministic as a buttons-to-pixels high speed camera test. The mouse button modification takes only 30 minutes, and the high speed video camera is cheap ($150), something totally doable by an average blogger/reviewer site. The likes of AnandTech and TomsHardware can easily take my idea (please give me credit) for the high speed video input lag testing.
I was thinking of something like an arduino leonardo, which already has a usb mouse/keyboard library. So you can use a button or timer to send a single move mouse 500px command, which should show up as a discrete event on high speed camera. I don't know the default USB polling rate, but I imagine you could set that to whatever you want.
Yeah I was thinking that too, I have a netduino I could try.

User avatar
RealNC
Site Admin
Posts: 3757
Joined: 24 Dec 2013, 18:32
Contact:

Re: Best way to test display lag?

Post by RealNC » 18 Jan 2014, 18:32

It just occured to me: can't you just use the LED on the keyboard? Bind an action to CapsLock for example. When it's pressed, the LED will light up. With a PS/2 keyboard the signal is sent by hardware interrupt so there should be even less delay compared to a mouse.
SteamGitHubStack Overflow
The views and opinions expressed in my posts are my own and do not necessarily reflect the official policy or position of Blur Busters.

User avatar
nimbulan
Posts: 323
Joined: 29 Dec 2013, 23:32
Location: Oregon

Re: Best way to test display lag?

Post by nimbulan » 18 Jan 2014, 19:20

RealNC wrote:It just occured to me: can't you just use the LED on the keyboard? Bind an action to CapsLock for example. When it's pressed, the LED will light up. With a PS/2 keyboard the signal is sent by hardware interrupt so there should be even less delay compared to a mouse.
The keyboard LEDs are controlled by the computer rather than locally with an unknown delay between pressing the key and the LED lighting. The mouse method will be more accurate, though someone with a modded mouse could do some tests to find out how large the difference is.

User avatar
RealNC
Site Admin
Posts: 3757
Joined: 24 Dec 2013, 18:32
Contact:

Re: Best way to test display lag?

Post by RealNC » 19 Jan 2014, 05:25

nimbulan wrote:
RealNC wrote:It just occured to me: can't you just use the LED on the keyboard? Bind an action to CapsLock for example. When it's pressed, the LED will light up. With a PS/2 keyboard the signal is sent by hardware interrupt so there should be even less delay compared to a mouse.
The keyboard LEDs are controlled by the computer rather than locally
The LEDs light up even if my computer is powered off. I know the LEDs can be programmed by the computer, but are you sure that this means it's the only way to control them?
SteamGitHubStack Overflow
The views and opinions expressed in my posts are my own and do not necessarily reflect the official policy or position of Blur Busters.

User avatar
nimbulan
Posts: 323
Joined: 29 Dec 2013, 23:32
Location: Oregon

Re: Best way to test display lag?

Post by nimbulan » 19 Jan 2014, 15:31

RealNC wrote:The LEDs light up even if my computer is powered off. I know the LEDs can be programmed by the computer, but are you sure that this means it's the only way to control them?
The LEDs being on is just an indication that the motherboard is still powering the keyboard. Perhaps you have a power-on-by-keyboard feature enabled in your BIOS/EFI? I'm sure it's possible to locally control the LEDs but I'd be surprised if that was the case for the vast majority of keyboards since there's no real benefit to doing so and may increase production costs.

User avatar
Chief Blur Buster
Site Admin
Posts: 11653
Joined: 05 Dec 2013, 15:44
Location: Toronto / Hamilton, Ontario, Canada
Contact:

Re: Best way to test display lag?

Post by Chief Blur Buster » 19 Jan 2014, 15:47

RealNC wrote:The keyboard LEDs are controlled by the computer rather than locally
Keyboard LEDs are not suitable for lag testing.
I have seen more than 200ms lag in keyboard LED on slow computers.
Even USB has latency too.
Only a parallel port pin, of a direct PCI parallel port, would get near microsecond latency.
Hard wired is even better, that is what I did.
Head of Blur Busters - BlurBusters.com | TestUFO.com | Follow @BlurBusters on Twitter

Image
Forum Rules wrote:  1. Rule #1: Be Nice. This is published forum rule #1. Even To Newbies & People You Disagree With!
  2. Please report rule violations If you see a post that violates forum rules, then report the post.
  3. ALWAYS respect indie testers here. See how indies are bootstrapping Blur Busters research!

Post Reply