Bug 505480

Summary: Better UI for devices that only support on/off battery charge limit, not custom percent limit
Product: [Applications] systemsettings Reporter: Eduardo Correia <eduardosareias>
Component: kcm_powerdevilAssignee: Plasma Bugs List <plasma-bugs-null>
Status: CONFIRMED ---    
Severity: wishlist CC: kde, kde, natalie_clarius, nate
Priority: NOR Keywords: usability
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Eduardo Correia 2025-06-11 15:29:07 UTC
SUMMARY
Many devices that have battery charge limit support, only actually support turning ON or OFF this feature, and not custom percentages. I currently have two devices in my possession that are like this: my Legion Go 1st gen, and a Asus Zephyrus G14 2024.

Both of them support battery charging limit, but only and exactly at 80%. If we choose 79% it just fully charges (disables the feature - maybe because we set an unsupported value for the limit?). If we do 81%, it still just fully charges. It only stops charging if and only when we set it at EXACTLY 80%.

On cases like these, we should probably instead of showing the percentage input box, only show a checkbox that says something like " [  ]  Limit the battery charging level to 80% to protect the battery." that would on/off the feature (sets 80% in the background?) instead of just what it does currently, which is letting the user input any number he wants. The user has no idea that the feature will only work if the input number is 80, because it still saves successfully. The checkbox idea would be better in this case.

If we currently have no way to detect what levels the current device supports, maybe at least have a message there somewhere to inform users of something like "On some devices, the battery charge limit will only work if set to exactly 80%."

STEPS TO REPRODUCE
1. Have a device that only supports battery charge at exactly 80% or full (on/off limiter in BIOS)
2. Try to use anything other than exactly 80%.
3. The battery charges anyway to 100%, feature only works exactly with 80% limit.

OBSERVED RESULT
Limiter won't work unless exactly at 80%. User is free to input any number, without any information that this can happen, incomplete UI leading to bad UX.

EXPECTED RESULT
Either KDE/this kcm detects the device only supports an "on/off style" limiter and shows a checkbox to turn the limiter on and off, or if not possible, at least show an info box informing the user that this can happen.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.14.0
Qt Version: 6.9.0
(taken from my Zephyrus G14, but the issue is also present on Bazzite on Legion Go, that has slightly different versions).
Comment 1 David Redondo 2025-06-12 08:48:56 UTC
Looking at  https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-class-power

I dont see any file that could tell that to us, maybe you could have a look yourself on these devices in  /sys/class/power_supply/BAT0 
if there's something with that info
Comment 2 Eduardo Correia 2025-06-12 11:34:17 UTC
(In reply to David Redondo from comment #1)
> Looking at 
> https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-class-power
> 
> I dont see any file that could tell that to us, maybe you could have a look
> yourself on these devices in  /sys/class/power_supply/BAT0 
> if there's something with that info

I tried checking around but couldn't find anything on my devices either. I am not a developer so I don't know where to specifically search for these things. However I have some things that could help:

1. Some systems seem to have a setting in their driver itself to enable or disable "battery conservation mode", as an example here:
https://www.reddit.com/r/Ubuntu/comments/p2so5n/how_to_limit_battery_charging_to_60_in_ubuntu/

2. The community around Bazzite and the HHD app, an app that is used to control firmware settings of gaming handhelds like the Legion Go, included on Bazzite by default, has a setting on it called "Charge Limit (80%)" for the Lenovo Legion Go. It's a checkbox that enables or disables this feature. This app is universal and changes it's UI accordingly to what device it's installed on, however I understand that they might have "hardcoded" this feature for the Legion Go specifically so they don't need to detect anything other than the device model. This is the github of that app, maybe we could use it to gather some info on how they achieved this and check if we can follow their code to have a way to detect this behavior on devices that have this same fixed charge limit percentage:
https://github.com/hhd-dev/hhd

Because I have access to two devices with this limitation (Legion Go - Bazzite KDE, and Zephyrus G14 2024 - Nobara KDE), I can provide any info you need. I don't know how to proceed but if you need anything, tell me and I will try to get it on these devices.
Comment 3 David Redondo 2025-06-13 07:29:49 UTC
Yes it seems to device specific configuration data.