Any way to check a PS3 controller's battery on Ubuntu?

I'm using Ubuntu 20.04 LTS and I use a Sony Dualshock 3 Controller to play a few games on Steam. As I tend to use the controller wirelessly for long periods of time, it's not uncommon to have the controller suddenly dying on me when the battery gets really discharged.
I searched around the internet but couldn't find a way to check how much battery left I had on the controller. Is there any native way to check a PS3 controller's battery, or some script I could use?

1 Answer

You can simply use the Dual Shock 4 battery percentage extension for Gnome. Although the name mentions DS4, it also supports DS3 (which I am using) and should soon support DS5 with recent kernels.

Behind the scenes, this extension simply relies on the power supply subsystem, and more specifically the file located at:

/sys/class/power_supply/<controller_identifier>/capacity

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like