Lower latency with a PS/2 adapter?

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.
blargg
Posts: 66
Joined: 20 Sep 2014, 03:59

Re: Lower latency with a PS/2 adapter?

Post by blargg » 20 Oct 2014, 17:39

Oh sorry, I forgot a critical detail: for *low-speed* USB devices the OS does this. For high-speed (USB 1.1) and full-speed (USB 2.0) devices, even a HID device can get lower than 8ms polling just by asking in the descriptor.

silikone
Posts: 57
Joined: 02 Aug 2014, 12:27

Re: Lower latency with a PS/2 adapter?

Post by silikone » 22 Oct 2014, 16:48

Ah, that makes sense. Is this a part of the specification, or is it just a Microsoft quirk? Either way, I wondered why gaming input devices were full-speed despite not even getting close to the bandwidth limit of low-speed, but now I know the justification.

blargg
Posts: 66
Joined: 20 Sep 2014, 03:59

Re: Lower latency with a PS/2 adapter?

Post by blargg » 22 Oct 2014, 17:16

I haven't found anything in the spec to explain this. Even Linux limits HID polling to 8ms unless you tweak the driver (despite being named mousepoll, it affects keyboard and joy controllers as well) (1ms here):

Code: Select all

sudo modprobe -r usbhid && sudo modprobe usbhid mousepoll=1

dclon
Posts: 30
Joined: 12 Oct 2014, 08:50

Re: Lower latency with a PS/2 adapter?

Post by dclon » 21 Nov 2014, 09:36

How do you force Windows to poll at <8ms?

And BTW, I suspect in USB2 the shortest possible frames are 0.125ms.

Regarding PS/2 keyboards and latency, it matters less than it does in mice due to the nature of keyboard control.

silikone
Posts: 57
Joined: 02 Aug 2014, 12:27

Re: Lower latency with a PS/2 adapter?

Post by silikone » 24 Nov 2014, 15:22

I've never seen a high speed input device before. I wonder if it would even work on some computers.

User avatar
Kertwaii
Posts: 44
Joined: 27 Feb 2015, 05:33
Location: Russla, Omsk
Contact:

Re: Lower latency with a PS/2 adapter?

Post by Kertwaii » 27 Feb 2015, 06:11

I own 2 keyboards: one of them is zalman-k500 (red switches) and the other one is a scissor-type slim kb
And yes, there is a lower input lag through ps/2 adapter for both of them. Also I think my zalman can have more keypresses at the same time through ps/2 (not N-key roll though)

Sparky
Posts: 682
Joined: 15 Jan 2014, 02:29

Re: Lower latency with a PS/2 adapter?

Post by Sparky » 28 Feb 2015, 05:17

Kertwaii wrote:I own 2 keyboards: one of them is zalman-k500 (red switches) and the other one is a scissor-type slim kb
And yes, there is a lower input lag through ps/2 adapter for both of them. Also I think my zalman can have more keypresses at the same time through ps/2 (not N-key roll though)
What method did you use to measure input lag? I'm curious about absolute latency too.

User avatar
Kertwaii
Posts: 44
Joined: 27 Feb 2015, 05:33
Location: Russla, Omsk
Contact:

Re: Lower latency with a PS/2 adapter?

Post by Kertwaii » 28 Feb 2015, 10:31

Sparky wrote:What method did you use to measure input lag? I'm curious about absolute latency too.
You made me feel childish and unprofessional :( Well it's true anyway because I didn't use any special tools/hardware. Just my observations
I tested in a certain rhythm game where you need to press circles to the music. There is a bar there that shows how off you're out of the rhythm (+-ms) and I noticed I have less scatter along with the feeling that the keys are registered faster/with less lag
I can try a real method (if someone can tell me one), but I don't have a high-speed camera or stuff like that so..

Sparky
Posts: 682
Joined: 15 Jan 2014, 02:29

Re: Lower latency with a PS/2 adapter?

Post by Sparky » 28 Feb 2015, 13:31

Kertwaii wrote:
Sparky wrote:What method did you use to measure input lag? I'm curious about absolute latency too.
You made me feel childish and unprofessional :( Well it's true anyway because I didn't use any special tools/hardware. Just my observations
I tested in a certain rhythm game where you need to press circles to the music. There is a bar there that shows how off you're out of the rhythm (+-ms) and I noticed I have less scatter along with the feeling that the keys are registered faster/with less lag
I can try a real method (if someone can tell me one), but I don't have a high-speed camera or stuff like that so..
No high speed camera needed, but you would have to disassemble the keyboard to attach a test lead to the switch. I used an arduino micro for the measurements here: http://forums.blurbusters.com/viewtopic ... 6&start=10

Any microcontroller with native usb is good to 2ms precision with the method I used, a microcontroller with a usb host controller would be good for sub 1ms precision. The main difference I saw is switching to PS/2 removed the variance caused by a large USB polling interval on the cheap keyboard. You can only register 1 press every 1~2ms or 1 release every 2~4ms over ps/2(depending on ps/2 clock), so if you need to press between 2 and 6 keys simultaneously you might be better off with USB(depends if the keyboard is configured for 1khz USB polling).

I thought about making replacement keyboard controllers with low latency firmware, but I don't think the market is big enough unless I actually build it into a keyboard.

Post Reply