Bug 428327 - Power management stuck on charging state while no external power
Summary: Power management stuck on charging state while no external power
Status: RESOLVED UPSTREAM
Alias: None
Product: Powerdevil
Classification: Plasma
Component: general (show other bugs)
Version: 5.19.5
Platform: Manjaro Linux
: NOR grave
Target Milestone: ---
Assignee: Plasma Bugs List
URL: https://gitlab.freedesktop.org/upower...
Keywords:
: 428457 428655 428711 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-10-27 09:23 UTC by Unknown
Modified: 2025-02-24 22:27 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
stuck tray widget (65.78 KB, image/png)
2020-10-27 09:23 UTC, Unknown
Details
output of upower when unplugged (2.62 KB, text/plain)
2020-10-27 12:12 UTC, Unknown
Details
output of upower when plugged in (2.75 KB, text/plain)
2020-10-27 12:12 UTC, Unknown
Details
output of dbus monitor (9.01 KB, text/plain)
2020-10-27 12:13 UTC, Unknown
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Unknown 2020-10-27 09:23:00 UTC
Created attachment 132784 [details]
stuck tray widget

SUMMARY
After unplugging a laptop from its charger battery monitor widget in tray stays stuck on the charging state. Everywhere else I have been able to look, the system is reporting discharging. This includes the menu which pops up by clicking the widget. Picture of this is attached.

The real problem is that this somehow disables all notifications about low battery power and more importantly prevents the laptop from hibernating when the battery is almost depleted and hence can cause serious data loss and it also puts a lot of strain on the battery itself. The only way I have been able to temporarily reset the state shown in the icon is a reboot.

STEPS TO REPRODUCE
1. plug a charger to a laptop
2. wait for a while
3. unplug the charger

OBSERVED RESULT
Battery widget shows "charging" even though the charger is not plugged and more importantly the system behaves as if the charger was plugged in.

EXPECTED RESULT
Battery widget shows "running on battery". System notifies about low power and takes action according to it.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Debian Bullseye and Manjaro
(available in About System)
KDE Plasma Version: 5.17.5 and 5.19.5
KDE Frameworks Version: 5.70.0 and 5.74.0
Qt Version: 5.14.2 and 5.15.1

ADDITIONAL INFORMATION
The problem does not always appear instantaneously. When I start the system unplugged, everything is fine. If the charger is plugged in and in a matter of seconds again unplugged the system mostly behaves as expected. But when left to charge for a while the power management state gets stuck, always. Notifications are set and working in the case of unplugging the charger immediately. The change of the state is known to the widget for while it is hidden while charging when the charger is unplugged the widget appears.

I have found two other people mentioning the same problem: https://forum.manjaro.org/t/battery-icon-is-constantly-in-charging-mode/27605/8 and https://www.reddit.com/r/kde/comments/ey39zg/the_battery_indicator_icon_is_frequently_stuck_on/fgf01ud/ with no solution.

I have also experienced this issue on multiple systems. My laptop is running Debian Bullseye (currently testing) with KDE Plasma 5.17.5. While this version is not very old it is not very recent either and for this reason I have downloaded current Manjaro with KDE and confirmed the issue is also present in this system which is running on KDE Plasma 5.19.5. In this case the system was running as live session from a bootable usb. Another laptop running Debian stable with KDE Plasma 5.14.5 does not have this issue.

While I have not tried the very last version od KDE Plasma I did my best to check the changelog summary and haven't found anything like this. I also believe that at least the version 5.19.5 is recent enough.
Comment 1 Nicolas Fella 2020-10-27 10:44:14 UTC
What model is your laptop? probably related to https://gitlab.freedesktop.org/upower/upower/-/issues/126
Comment 2 Unknown 2020-10-27 12:12:20 UTC
Created attachment 132790 [details]
output of upower when unplugged
Comment 3 Unknown 2020-10-27 12:12:45 UTC
Created attachment 132791 [details]
output of upower when plugged in
Comment 4 Unknown 2020-10-27 12:13:11 UTC
Created attachment 132792 [details]
output of dbus monitor
Comment 5 Unknown 2020-10-27 12:14:12 UTC
(In reply to Nicolas Fella from comment #1)
> What model is your laptop? probably related to
> https://gitlab.freedesktop.org/upower/upower/-/issues/126

The laptop is Lenovo ThinkPad L380.

When I run upower -m the output is (for both plugging and unplugging):
[12:47:16.844]  device changed:     /org/freedesktop/UPower/devices/battery_BAT0 
[12:47:16.844]  device changed:     /org/freedesktop/UPower/devices/battery_BAT0 
[12:47:16.845]  device changed:     /org/freedesktop/UPower/devices/battery_BAT0 
[12:47:17.367]  device changed:     /org/freedesktop/UPower/devices/battery_BAT0 
[12:47:17.367]  device changed:     /org/freedesktop/UPower/devices/battery_BAT0 
[12:47:17.367]  device changed:     /org/freedesktop/UPower/devices/battery_BAT0 
[12:47:17.367]  device changed:     /org/freedesktop/UPower/devices/line_power_ADP1 
[12:47:17.367]  device changed:     /org/freedesktop/UPower/devices/line_power_ADP1 

I have added an attachment of what happens when the command sudo dbus-monitor --system interface=org.freedesktop.DBus.Properties is executed.

And also the output of upower -d when plugged and when unplugged.

acpi_listen gives for unplugging:
battery PNP0C0A:00 00000080 00000001 
ac_adapter ACPI0003:00 00000080 00000000

and for plugging in:
battery PNP0C0A:00 00000080 00000001 
battery PNP0C0A:00 00000080 00000001 
ac_adapter ACPI0003:00 00000080 00000001 
battery PNP0C0A:00 00000080 00000001 
ac_adapter ACPI0003:00 00000080 00000001
Comment 6 Nate Graham 2020-10-29 19:06:36 UTC
Yup, this is a bug in upower itself: https://gitlab.freedesktop.org/upower/upower/-/issues/126
Comment 7 Nicolas Fella 2020-10-30 12:04:24 UTC
*** Bug 428457 has been marked as a duplicate of this bug. ***
Comment 8 Nicolas Fella 2020-11-03 18:46:24 UTC
*** Bug 428655 has been marked as a duplicate of this bug. ***
Comment 9 Nicolas Fella 2020-11-05 12:11:52 UTC
*** Bug 428711 has been marked as a duplicate of this bug. ***
Comment 10 D. Debnath 2025-02-24 22:16:58 UTC
(In reply to Nate Graham from comment #6)
> Yup, this is a bug in upower itself:
> https://gitlab.freedesktop.org/upower/upower/-/issues/126

The upstream issue is closed, but I still have this issue.
Comment 11 D. Debnath 2025-02-24 22:27:28 UTC
Changing status back to RESOLVED UPSTREAM after reading Nate's comment here: https://bugs.kde.org/show_bug.cgi?id=423556#c38

But this is still an issue, and it seems like nothing is being done about it!