Bug 426743

Summary: Battery Monitor says "Your battery is configured to only charge up to 100%" despite charge limit is enabled
Product: [Plasma] plasmashell Reporter: Patrick Silva <bugseforuns>
Component: Power and Battery widgetAssignee: Kai Uwe Broulik <kde>
Status: RESOLVED FIXED    
Severity: normal CC: isma.af, nate, plasma-bugs-null
Priority: VHI Keywords: regression
Version First Reported In: master   
Target Milestone: 1.0   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In: 5.20.0
Sentry Crash Report:
Attachments: screenshot

Description Patrick Silva 2020-09-19 17:53:43 UTC
Created attachment 131785 [details]
screenshot

SUMMARY
My laptop (lenovo G400S Touch) supports charge limit feature and it is enabled,
but the battery monitor says "Your battery is configured to only charge up to 100%" instead of "Your battery is configured to only charge up to 60%".
I enabled charge limit feature via CLI because, as we can see in the attached screenshot, it is not available in Power Management kcm of my system.

EXPECTED RESULT
battery monitor should detect/report the status of charge limit feature correctly.

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.19.90
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.0
Comment 1 Ismael Asensio 2020-09-22 16:36:04 UTC
I can confirm this happens on my system too (LG Gram 15Z).
While I don't think my laptop has the capability (KCM doesn't show the option), the message "Your battery is configured to only charge up to 100%" is still shown.

Using gammaray, it seems that the bindings for `visible` property get somehow overwritten to `true`. It shows a binding depth of 0 for this property.
Comment 2 Ismael Asensio 2020-09-22 16:38:05 UTC
(small addition to last comment)
The message shows either with AC plugged in, or when running on battery
Comment 3 Patrick Silva 2020-09-22 16:45:24 UTC
On my desktop computer running Arch + Plasma 5.20 beta the battery applet says "Your battery is configured to only charge up to 0%".
Comment 4 Kai Uwe Broulik 2020-09-22 19:26:12 UTC
Please try https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/284
Comment 5 Kai Uwe Broulik 2020-09-22 20:04:44 UTC
Git commit 27e3cfcac082c666523191a49a10912fe41e4465 by Kai Uwe Broulik.
Committed on 22/09/2020 at 19:24.
Pushed by broulik into branch 'master'.

[Battery Monitor] Fix threshold indicator

I apparently forgot to add some other changes...
Also show it only when threshold is > 0 %
FIXED-IN: 5.20.0

M  +1    -0    applets/batterymonitor/package/contents/ui/PopupDialog.qml
M  +3    -1    applets/batterymonitor/package/contents/ui/PowerManagementItem.qml

https://invent.kde.org/plasma/plasma-workspace/commit/27e3cfcac082c666523191a49a10912fe41e4465
Comment 6 Kai Uwe Broulik 2020-09-22 20:05:31 UTC
Git commit 26a3eb1baabb6617f713fc5a6f6c09aea045b104 by Kai Uwe Broulik.
Committed on 22/09/2020 at 20:05.
Pushed by broulik into branch 'Plasma/5.20'.

[Battery Monitor] Fix threshold indicator

I apparently forgot to add some other changes...
Also show it only when threshold is > 0 %
FIXED-IN: 5.20.0


(cherry picked from commit 27e3cfcac082c666523191a49a10912fe41e4465)

M  +1    -0    applets/batterymonitor/package/contents/ui/PopupDialog.qml
M  +3    -1    applets/batterymonitor/package/contents/ui/PowerManagementItem.qml

https://invent.kde.org/plasma/plasma-workspace/commit/26a3eb1baabb6617f713fc5a6f6c09aea045b104