
Well, here’s a nice Christmas surprise … Sony has released a new “hid-playstation” Linux kernel driver for the launch of the PlayStation 5 DualSense controller and will be used to support other PlayStation hardware on Linux.
This new Linux kernel driver supports the PlayStation 5 “DualSense” game controller in both USB and Bluetooth modes. All key features along with LEDs, motion sensors, touchpad, battery, light bar and rumble are all supported by this official Sony Linux driver.
The Linux kernel already has the existing “hid-sony” driver while this PlayStation 5 game controller comes with the hid-playstation driver. Announcing the new driver, they intend to move some of Sony Interactive Entertainment’s hardware support from existing hid-sony drivers to hid play-play drivers. The Sony hidden driver will continue to be maintained and used by larger Sony devices. This new driver follows Sony’s move about a year ago to “officially” keep the Linux input driver hidden.
The Linux driver exposes DualSense functionality as a hidden “composite device” similar to DualShock 4, which covers multiple frames. First, it exposes 3 evdev nodes, respectively for “gamepad”, “touchpad” and “motion sensors”. The FF frame is used to provide basic features for nibbling. The LED class is used to implement the player’s indicator LEDs under the DualSense touchpad, while the new “multicolor led-class” is used for the light bars next to the touchpad.
The new unique features introduced by DualSense, such as Adaptive Triggers and VapM-based Haptics, are not yet supported. These features require a large amount of data and complex data structures. It is not clear how to expose them. The current Evdev and FF frameworks are too restrictive. We hope to have a dialogue on how to expose them in time in a generic way.
This new driver comes with just over 1,400 lines of code in its original form, which is addressed to the PS5 controller. When transitioning support for older hardware to this new driver there is also a promise of unit test coverage and more.
The new HID-PlayStation driver is currently under review and is not yet waiting for the main line, but those who want to try it can find the 13 patches for testing.
Separately, SDL 2.0.14 was also released this week, with its initial mapping support for the PlayStation 5 controller buttons for that library, which is widely used by cross-platform games.