Bug 477453

Summary: Battery info is really undetailed for PS controllers
Product: [Applications] kinfocenter Reporter: deemon <priit>
Component: generalAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED LATER    
Severity: normal CC: keigh.rim, shubhamarora, sitter
Priority: NOR    
Version First Reported In: 5.27.9   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: current looks.
Playstation Battery Energy Page

Description deemon 2023-11-24 09:34:37 UTC
Created attachment 163417 [details]
current looks.

SUMMARY
under "Info Center -> Energy" I see 2x "Unknown battery" and in the bottom details I see:

Battery
Rechargeable: Yes
Charge State: Fully Charged
Current Charge: 100%
Model: Wireless Controller
Serial Number: 98:b6:e9:xx:xx:xx

1. I have no bluetooth devices "Wireless Controller" anymore, I did rename them both to something else and would like to see those names here, instead of "Wireless Controller" (which was default, when I paired the device first time).
yes, true, it's still just "Wireless Controller" in:
$ cat /sys/class/power_supply/ps-controller-battery-98:b6:e9:xx:xx:xx/device/uevent
DRIVER=playstation
HID_ID=0005:0000054C:000009CC
HID_NAME=Wireless Controller
HID_PHYS=f8:e4:e3:xx:xx:xx
HID_UNIQ=98:b6:e9:xx:xx:xx
MODALIAS=hid:b0005g0000v0000054Cp000009CC

buut, then it could either show on this page additionally to Model: Wireless Controller, also driver: playstation or as proposed earlier the my own assigned bluetooth device name.

2. Instead of "Unknown battery" could be "ps-controller-battery-98:b6:e9:xx:xx:xx" from:
$ cat /sys/class/power_supply/ps-controller-battery-98:b6:e9:xx:xx:xx/uevent
POWER_SUPPLY_NAME=ps-controller-battery-98:b6:e9:xx:xx:xx
POWER_SUPPLY_TYPE=Battery
POWER_SUPPLY_STATUS=Charging
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_CAPACITY=100
POWER_SUPPLY_SCOPE=Device


STEPS TO REPRODUCE
1. Open info center
2. go to energy tab.
3. 

OBSERVED RESULT
Unknown Battery

EXPECTED RESULT
PS Controller Battery

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Manjaro
(available in About System)
KDE Plasma Version: 5.27.9
KDE Frameworks Version: 5.112.0
Qt Version: 5.15.11

ADDITIONAL INFORMATION
Comment 1 Shubham Arora 2023-12-13 17:02:41 UTC
Created attachment 164141 [details]
Playstation Battery Energy Page

This is how it will show up in Plasma 6. Dualsense is exposed as a touchpad upstream. Controller name is also taken from upower. In case you change it from Bluetooth module, it will not be reflected here.  Does this fix the issue for you?
Comment 2 deemon 2023-12-15 08:59:43 UTC
(In reply to Shubham Arora from comment #1)
> Created attachment 164141 [details]
> Playstation Battery Energy Page
> 
> This is how it will show up in Plasma 6. Dualsense is exposed as a touchpad
> upstream. Controller name is also taken from upower. In case you change it
> from Bluetooth module, it will not be reflected here.  Does this fix the
> issue for you?

It's definitely better than the current version :-)
Comment 3 Keigh Rim 2024-02-13 18:35:32 UTC
Probably very closely related to this; I have BT headsets and while in the "battery and brightness" panel I can see the headset name with the battery percentage, it shows up as "unknown battery" in the InfoCenter>Energy UI. 
I wonder if the the fix (pending on Plasma 6) will be broadly applied to other bluetooth peripherals.
Comment 4 Shubham Arora 2024-02-18 06:50:35 UTC
(In reply to Keigh Rim from comment #3)
> Probably very closely related to this; I have BT headsets and while in the
> "battery and brightness" panel I can see the headset name with the battery
> percentage, it shows up as "unknown battery" in the InfoCenter>Energy UI. 
> I wonder if the the fix (pending on Plasma 6) will be broadly applied to
> other bluetooth peripherals.

Yes a alot more device types are supported now. Once you update to plasma 6 you can raise a new bug in case anything is missed