Version: unspecified (using KDE 4.7.2) OS: Linux After a suspend/resume cycle (ACPI S3) the Battery Monitor widget effectively stops tracking the battery charging state. The battery level reported through /proc/acpi/battery/BAT{0,1}/state is correct, though. Reproducible: Always Steps to Reproduce: Perform a suspend/resume cycle. Actual Results: The Battery Monitor widget locks in at the last known charge level. Expected Results: The Battery Monitor widget updates as the charge level changes.
It is good to know that this has been resolved. Would you mind sharing a pointer to the fix so that I can back-port it into me current distribution release?
In this particular case the bug is marked as resolved because the KDE team thinks, that the actual root of the bug is not within KDE, but somewhere else (and, because of it, should be fixed by, e.g. kernel developers). However, if I'm restarting plasma after suspend-resume (via killall plasma-desktop && plasma-desktop), the applet starts to work in a correct manner. This shows, that all the underlying machinery works fine, and the bug is probably located within plasma itself.
Killing Plasma isn't even necessary - removing and adding the widget from the panel is sufficient for it to catch up. I hope it is ok if I re-open this bug under these circumstances. P.S.: If you think that this is a distribution-specific bug (Kubuntu in my case) introduced by a distribution patch, please let me know. @Ivan: Which distribution are you using?
(In reply to comment #3) I'm using Kubuntu 11.10 as well, so yes, it is possible, that the bug is Kubuntu-specific. I'll try to find someone with another distro who can check it.
My computer (Asus A8F running Kubuntu 11.10 with KDE 4.8 from ppa) is also affected. It was also present when I had KDE 4.7.
I am not 100% certain, but I think this happens when I unplug the power connector while my laptop is suspended.
Same problem. Saw it on debian, and seeing it now on OpenSUSE, so it's not ubuntu-specific.
Created attachment 71293 [details] screenshot of battery applet and solid-hardware output
Just to note it seems to be fine now (on 4.8.x).
Thank you for the feedback, closing.
this bug is already reproducible in 4.9 beta1 and beta2
(In reply to comment #11) > this bug is already reproducible in 4.9 beta1 and beta2 sorry, I meant "again"
It is also still present in 4.8.3 (Kubuntu Precise packages). I am not quite sure there was a period since original reporting when it was not present.
Same problem here. Fedora 17 x86_64 + KDE 4.8.90 from kde-redhat unstable repo.
bug still present in 4.8.95
Looking into it
I have been experiencing this problem since I started to use KUbuntu 32 bit (Natty, Oneiric...) on two different laptops (HP 2510p, Dell E6320). Problem seems to be generic because these laptops have totally different hardware, ACPI data are good and updated on the proc file system, but the Battery Monitor never works after resume.
Lukáš: if you or somebody else would point out the related sources in the KDE source tree, I can check those files and fix the bug since it is always reproducable on my machines and it is an annoying thing.
Created attachment 72336 [details] Patch for powermanagement plasma engine
It would be cool if you could test the above patch for kde-workspace :)
I applied your patch, installed the new plasma_engine_powermanagement.so, restarted my session, suspended... and no luck. the battery applet still seems stuck and not updating charge status. :(
I use KDE 4.7.2, so I could not apply exactly the same patch, but the only difference between my KDE version and yours that the disabled DBus reply is async in your case and sync in KDE 4.7.2. So I used the following: setData("Battery", "Has Battery", !batterySources.isEmpty()); if (!batterySources.isEmpty()) { setData("Battery", "Sources", batterySources); /* COMMENT QDBusMessage msg = QDBusMessage::createMethodCall("org.kde.Solid.PowerManagement", "/org/kde/Solid/PowerManagement", "org.kde.Solid.PowerManagement", "batteryRemainingTime"); QDBusPendingReply< int > reply = QDBusConnection::sessionBus().asyncCall(msg); reply.waitForFinished(); if (reply.isValid()) { //kDebug() << "Remaining time 1:" << reply.value(); setData("Battery", "Remaining msec", reply.value()); } COMMENT */ } Results: The patch does not effect anything, the same sympthoms are observed before and after. I publish them to see an exact test cases for the problem: Test case 1: ------------ 1. Laptop is not suspended in this case 2. Pull and reconnect the AC power Result: The Battery Monitor always works correctly Test case 2: ------------ 1. Laptop on AC power 2. Suspend 3. Pull the AC power 4. Resume on battery power Result: Battery Monitor shows the battery percentage correctly. Test case 3: ------------ 1. Laptop on battery power 2. Suspend 2. Resume on battery power Result: Battery Monitor does not work, it is stuck at the same battery percentage.
Csába, upgrade to 4.8, the code is fixed there, this bug is about 4.9/master.
The bug is in the battery applet (QML) itself, the powermanagement engine itself is correctly updating the battery charge percent and state, even after suspend/resume.
Created attachment 72402 [details] QML battery applet patch
Git commit ec3ef679d7e186b8f2e5d438c42292d6688084bc by Lukas Tinkl. Committed on 09/07/2012 at 18:21. Pushed by lukas into branch 'KDE/4.9'. fix Battery Monitor widget stops tracking charging state changes after suspend/resume cycle also fix the description to correctly reflect charging/discharging state M +3 -2 plasma/generic/applets/batterymonitor/contents/ui/PopupDialog.qml M +21 -8 plasma/generic/applets/batterymonitor/contents/ui/batterymonitor.qml http://commits.kde.org/kde-workspace/ec3ef679d7e186b8f2e5d438c42292d6688084bc
Git commit cbfaa5161731e0789b348c9a6ebe67e10d49b190 by Lukas Tinkl. Committed on 09/07/2012 at 18:21. Pushed by lukas into branch 'master'. fix Battery Monitor widget stops tracking charging state changes after suspend/resume cycle also fix the description to correctly reflect charging/discharging state M +3 -2 plasma/generic/applets/batterymonitor/contents/ui/PopupDialog.qml M +21 -8 plasma/generic/applets/batterymonitor/contents/ui/batterymonitor.qml http://commits.kde.org/kde-workspace/cbfaa5161731e0789b348c9a6ebe67e10d49b190
*** Bug 289696 has been marked as a duplicate of this bug. ***
Still having this problem on 4.9.3 (archlinux). Reproducible by going into hibernate with the battery unplugged and resuming the system with just the battery on.
The bug is still present in 4.8 branch. Can't find any QML files for Battery Monitor there, so I assume it's done in a different way and there's no way to apply this patch to 4.8. Is there a chance to get a patch for 4.8? The bug is quite annoying indeed.
*** Bug 302360 has been marked as a duplicate of this bug. ***
The bug is still present in KDE 4.9.5, using Linux Mint KDE version and Asus A55V laptop.
The bug has always been present for me. I'm using KDE 4.10.5 on Arch Linux. I'm rocking a System76 Lemur Ultra (3rd Gen Intel Core i5). If the laptop is plugged in upon resume, there are no issues. However, if it is not plugged in upon resume, it performs the default "critical battery" option. Additionally, the "30 second notification" pops up, obviously 30 seconds before it does anything (in this case, shutdown/hibernate/suspend upon critical action would be the active action).
This bug is still present in plasma5/plasmashell. I'm using Arch Linux. If the battery was charging and then I put the laptop to sleep, then unplug it and wake it up, the icon stays blue and the tooltip reads "charging". Clicking on the icon shows correct information but the icon stays the same. /sys/class/power_supply/BAT1/status is throwing correct results as well I also think that this bug is causing low battery notifications not to show up.. but I'll check that out