Linux 6.5 Bringing Improvements To PS/2 Mouse & Keyboard Handling

Written by Michael Larabel in Hardware on 7 July 2023 at 06:13 AM EDT. 31 Comments
HARDWARE
Hopefully by now all of you have moved off PS/2 mice and keyboards, but should you still have some old systems chugging along with PS/2 hardware, there are some improvements to find with the Linux 6.5 kernel currently under development.

The input subsystem updatess sent out last week by maintainer Dmitry Torokhov include some improvements to old school PS/2 hardware...He summed it up as, "improvements to PS/2 handling for case when EC has already latched a scancode in the data register, but the kernel expects to receive an ACK to a command it sent to a device (such as keyboard LED toggle)."

PS/2 ports on an old Abit motherboard


Torokhov further elaborated in the original patch series about the focus of this work on the aging PS/2 kernel driver code:
"The main reason for this patch series is to deal with the case when EC/keyboard controller has already latched a scancode in the output buffer at the same time the host (kernel) is sending a PS/2 command to the controller/device. The device should stop scanning (keyboard) or sending coordinate data (mouse), and instead send acknowledge (0xfa) and then potentially command response, but if the output buffer already contains scancode byte it can not be substituted with an ACK byte.

The typical scenario for this is user activating a CapsLock function, with host sending command to toggle CapsLock LED. If at the same time the keyboard transmitting break code for the key the kernel may mistake it for garbage command response and get confused."

Besides the PS/2 improvements, there is also various other changes including uinput now allowing user-space to inject timestamps for input events and support for capacitive keys with the Atmel touch controller driver. The full list of input subsystem changes via this pull that was already honored and merged last week.

On a related note, the HID subsystem for Linux 6.5 brings the NVIDIA SHIELD controller driver, Xbox controller rumble support, and other notable improvements for modern hardware.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week