Sony Publishes An Official Linux Driver For PlayStation 5 DualSense Controllers
Well here is a pleasant Christmas surprise... Sony has published a new "hid-playstation" Linux kernel driver for bringing up the PlayStation 5 DualSense controller and will also be used for supporting other PlayStation hardware on Linux.
This new Linux kernel driver supports the PlayStation 5 "DualSense" game controller both in USB and Bluetooth modes. All key functionality along with LEDs, motion sensors, touchpad, battery, lightbar, 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. In announcing the new driver, they are planning to move some of the Sony Interactive Entertainment hardware support from the existing hid-sony to hid-playstation drivers. The hid-sony driver will continue to be maintained and used by broader Sony devices. This new driver follows the move from about a year ago of Sony "officially" maintaining the hid-sony Linux input driver.
This new driver comes in at just over 1,400 lines of code in its initial form catering 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 isn't yet queued up for mainlining but those wanting to try it out can find the 13 patches up 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 that is widely used by cross-platform games.
This new Linux kernel driver supports the PlayStation 5 "DualSense" game controller both in USB and Bluetooth modes. All key functionality along with LEDs, motion sensors, touchpad, battery, lightbar, 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. In announcing the new driver, they are planning to move some of the Sony Interactive Entertainment hardware support from the existing hid-sony to hid-playstation drivers. The hid-sony driver will continue to be maintained and used by broader Sony devices. This new driver follows the move from about a year ago of Sony "officially" maintaining the hid-sony Linux input driver.
The Linux driver exposes DualSense functionality as a 'compositive device' similar to DualShock 4 in hid-sony, spanning multiple frameworks. First, it exposes 3 evdev nodes for respectively the 'gamepad', 'touchpad' and 'motion sensors'. The FF framework is used to provide basic rumble features. The leds-class is used to implement the Player indicator LEDs below the DualSense's touchpad, while the new 'leds-class-multicolor' is used for the lightbars next to the touchpad.
Not yet supported are new unique features introduced by the DualSense such as Adaptive Triggers and the VCM based Haptics. These features require a large amount of data and complex data structures. It is not clear how to expose these. The current Evdev and FF frameworks are too limiting. We hope to have a dialog on how to expose these over time in a generic way.
This new driver comes in at just over 1,400 lines of code in its initial form catering 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 isn't yet queued up for mainlining but those wanting to try it out can find the 13 patches up 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 that is widely used by cross-platform games.
36 Comments