News for hackers. Stuff that matters.
Re:Desktop compositing latency is real by floatboth on Tuesday November 21, 2017 @09:54AM (#15748181)
Modern motherboards often still have a PS/2 port! And most USB keyboards still support PS/2, a passive adapter works great.
Re:Desktop compositing latency is real by vetinari on Tuesday November 21, 2017 @10:13AM (#15748330)
The problem is often in keyboard controller, not in the interface. Apple managed to get fastest keyboard with only 15ms lag; other may be order of magnitude slower.
Re:Desktop compositing latency is real by fhood on Tuesday November 21, 2017 @10:27AM (#15748470)
Could someone explain to me why on earth 15ms of lag for a key press is considered good? It is a switch for gods sake. It should be near instant.
Re:Desktop compositing latency is real by vetinari on Tuesday November 21, 2017 @10:33AM (#15748523)
The linked article explains it (TLDR: key travel time, scanning keyboard matrix, debouncing).
Re:Desktop compositing latency is real by looiid on Tuesday November 21, 2017 @11:34AM (#15749073)
It’s a common myth that denouncing needs to meaningfully affect latency. It does not. It will affect maximum repeat rate, but you can pretty much report an event the moment you see an edge.
Re:Desktop compositing latency is real by madez on Tuesday November 21, 2017 @10:50AM (#15748660)
A keyboard doesn't need to implement a scanning matrix. It could hook up all keys individually to a an own IO-Port.
Re:Desktop compositing latency is real by falcolas on Tuesday November 21, 2017 @11:23AM (#15748955)
Requires a bigger chip (100+ IO pins) and more complex wiring diagrams than most inexpensive keyboard makers are willing to invest.
Re:Desktop compositing latency is real by StillBored on Tuesday November 21, 2017 @12:22PM (#15749548)
Replace with _any_ keyboard manufacture.. Similarly, while your keyboard may advertise USB2 or even USB3, the actual key-press USB interface is always running at USB 1 low speed (1.5Mbit).

I spent a fair amount of time trying to find a keyboard to work on a device that I have that only works with high speed devices, 30 or 40 keyboards later I gave up... If someone actually knows of such a thing I would be interested. Same basic problem with mice.. I guess the thought-process is that hey USB2 supports split transactions, and the keyboard/mouse won't actually generate even 1.5M bit of data, so we are going to continue to sell the same basic mouse/keyboard interfaces we were selling 20 years ago wrapped in styling variations.

PS: Some of the physical button keyboards I found with configurable colors/etc, usb hubs, do support USB3... For the color controls, or hub. The keyboard endpoint is still at low speed...

Re:Desktop compositing latency is real by falcolas on Tuesday November 21, 2017 @02:27PM (#15750754)
Likely because they want to implement the minimum necessary HID spec (or, in a nicer tone, the HID spec with the most compatibility), which would be the one supported by the BIOS.
Re:Desktop compositing latency is real by mark-r on Tuesday November 21, 2017 @12:34PM (#15749681)
I don't understand why someone hasn't come out with a dedicated keyboard chip yet. If it's cheap enough you don't need to run all the keys to a single chip, you could have multiple chips that all talk over a serial bus to one that it designated the master.
Re:Desktop compositing latency is real by thesmok on Wednesday November 22, 2017 @05:01AM (#15755643)
Another layer of serial interfaces would make it even slower.
Re:Desktop compositing latency is real by brokenmachine on Thursday November 23, 2017 @12:35AM (#15763032)
A serial interface can run a lot faster than anyone can type, eg i2c high speed is max 3.2Mbit/s.

SPI can be way faster than that I believe.

Re:Desktop compositing latency is real by thesmok on Thursday November 23, 2017 @05:02AM (#15764070)
true, but adding another link (microcontroller) in the chain is going to add delay anyway. I think the original suggestion was pointless: instead of adding more microcontrollers you can just replace the main uC with the one that has enough pins. The reason this is not done is uCs with >100 pins are usually more powerful and expensive, so you can't just pay for more pins -- you also have to pay for more processing power and features you don't need.
Re:Desktop compositing latency is real by mark-r on Wednesday November 22, 2017 @08:39AM (#15756656)
Depends on the speed/latency of the interface. Although you could probably say the same about the scanning matrix too.
Re:Desktop compositing latency is real by wolfgke on Tuesday November 21, 2017 @10:40AM (#15748584)
> Could someone explain to me why on earth 15ms of lag for a key press is considered good? It is a switch for gods sake. It should be near instant.

I don't claim that 15ms of lag is to be considered good, but the problem that one has to solve is debouncing the switches.

Re:Desktop compositing latency is real by jws on Tuesday November 21, 2017 @11:03AM (#15748764)
Denouncing shouldn’t add lag. On the first closure detection you can send the key down code. You then need some debounce logic to decide when to send the key up code, but after the key is solidly down you are again in a state to send the key up code as soon as the up begins.

The only time there should be lag is when a very short keypress happens, the key up might be delayed while the controller rules out bounce.