SUMMARY I am using the latest version of KDE-plasma5 on latest Pop!_OS (20.04). The battery Icon in the tray shows undefined behaviour. There are 2 states to the behaviour: 1. It shows the change (i.e. power has been plugged in/out about an hour later) 2. It remains in the state it was when I powered on my Laptop even when I disconnect/ plugin. (i.e. if it was plugged in at boot time, it keeps showing plugged in even when the cord has been disconnected and vice versa.) Here I would like to note that whenever I hover in the applet, it shows the current charge of the battery accurately. However, it fails to recognise the state. Also, when I click on the applet, the widget detects the state accurately. The annoying part is when the Laptop gets suspended as the applet cannot recognize the battery level (at times it has suspended at 100% battery) STEPS TO REPRODUCE 1. Plug in the charger 2. Boot the Laptop 3. See the state of the applet 4. Remove the charging cord OBSERVED RESULT Undefined Behaviour of the applet in displaying battery charging/discharging status (as mentioned above) EXPECTED RESULT Well, do I really need to put anything here? ;) SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: Pop!_OS (available in About System) KDE Plasma Version: 5 KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION
Created attachment 129706 [details] Snaps of the error
Can you check whether the output of `upower -d` is also falsy? If so, this suggests an issue lower in the stack, also given suspend isn't actually handled by battery monitor.
The output of `upower -d` is correct. Are you sure this is not a KDE issue? Because this does not happen with Gnome (yeah, I checked this by installing Gnome again)
(In reply to Kai Uwe Broulik from comment #2) > Can you check whether the output of `upower -d` is also falsy? If so, this > suggests an issue lower in the stack, also given suspend isn't actually > handled by battery monitor. The wrong displaying does not matter as much as suspending (at times at 100%). Please look into the matter
Works for me, FWIW. I know that's not super helpful for you, but it seems like this is not a universal problem for everyone.
(In reply to Nate Graham from comment #5) > Works for me, FWIW. I know that's not super helpful for you, but it seems > like this is not a universal problem for everyone. Umm, did you take a look at the screenshot I attached? (Not the U&L question, but at the bottom right corner, where the issue is being seen). Also, what do I do in this case? You know, because I've tried reinstalling even Pop!_OS twice now. Please help as this is really an issue which has been getting on my nerves for about 4 months now. (By the way, this issue was not there before and has occurred after updating.)
Created attachment 129840 [details] Attachment of the screenshot where the bug is glaring at us
Yes, I looked at the screenshot. I just can't reproduce it on my own system with my own user account or a new one.
(In reply to Nate Graham from comment #8) > Yes, I looked at the screenshot. I just can't reproduce it on my own system > with my own user account or a new one. Is something wrong with my hardware in that case? Because this problem actually never occurred before even with KDE. It only started occurring recently. Do I report this to Pop!_OS then?
Just reproduced this. :/
(In reply to Nate Graham from comment #10) > Just reproduced this. :/ Great!!! Yay :P !!! Thanks tons for looking into the matter :). Hope it gets fixed soon :D
(In reply to Nate Graham from comment #10) > Just reproduced this. :/ Also, please take a look at https://unix.stackexchange.com/a/596984/367116
Also, if I want to try my hand at fixing the bug, where do I apply?
You don't need to apply anywhere, just fix the bug and send a merge request. :) https://invent.kde.org/plasma/powerdevil/-/merge_requests Documentation: https://community.kde.org/Infrastructure/GitLab
Thanks man. On it now :)
Oh hey! so the bug wasn't in powerdevil? And has it been fixed in the later versions?(5.18.5+)
It is, I just moved it to the component tracking the powerdevil applet itself.
Hi everyone, I have a bug that is very similar, except for the conditions of appearance. In my case, this only happens when the laptop is booted with the AC plugged in. When unplugged, the icon remains (which is not a big issue, but also behaviors are not changed to the desired ones for battery use). If instead the laptop boots unplugged, plugging in and out works normally. Also in my case, upower shows the correct information.
I have started to experience this.
The problem seems to be that `pmSource.data["AC Adapter"]["Plugged in"]`, which is used in various places, it continuing to return true after the power cable has ben unplugged, when it should be false.
Data is coming from the powermanagement data engine. The "Plugged in" property doesn't seem to be getting updated when it should be. "Charging" and "Discharging" do get updated, but not "Plugged In".
I'm getting the feeling that whoever's programmed that part has resorted(??) to UB and has not recognised that ;)
(In reply to Nate Graham from comment #21) > Data is coming from the powermanagement data engine. The "Plugged in" > property doesn't seem to be getting updated when it should be. "Charging" > and "Discharging" do get updated, but not "Plugged In". Same here, "Charging" and "Discharging" are correct, "Plugged In" isn't. And in fact: Device: /org/freedesktop/UPower/devices/line_power_AC native-path: AC power supply: yes updated: gio 10 set 2020, 17:45:55 (27 seconds ago) has history: no has statistics: no line-power warning-level: none online: no icon-name: 'ac-adapter-symbolic'
Debugged this a bit with Kai and we think it's a bug in upower itself. I've filed a bug report for them: https://gitlab.freedesktop.org/upower/upower/-/issues/126
*** Bug 442868 has been marked as a duplicate of this bug. ***
*** Bug 361708 has been marked as a duplicate of this bug. ***
I believe this needs to be fixed in the kernel drivers. FYI this is reported at https://bugzilla.kernel.org/show_bug.cgi?id=210425
*** Bug 440609 has been marked as a duplicate of this bug. ***
*** Bug 447333 has been marked as a duplicate of this bug. ***
*** Bug 447327 has been marked as a duplicate of this bug. ***
*** Bug 449728 has been marked as a duplicate of this bug. ***
*** Bug 449937 has been marked as a duplicate of this bug. ***
*** Bug 450126 has been marked as a duplicate of this bug. ***
*** Bug 364260 has been marked as a duplicate of this bug. ***
*** Bug 453139 has been marked as a duplicate of this bug. ***
Still an issue in 5.25.2 on Fedora 36. Is there any progress on the issue with upower?
Please don't re-open issues marked as RESOLVED UPSTREAM unless they are found to no longer be upstream issues or are found to be work-around-able in KDE code. See https://community.kde.org/Get_Involved/Issue_Reporting#Understand_what_the_resolution_statuses_mean
I also have the issue on Ubuntu 22.04 with Plasma 5.24.4, Kernel 5.15.0-41-generic . The flavor of it that I am seeing is that it happens only some times. The times when it works is when I reboot my laptop on battery power. I haven't yet found all cases that cause it to fail, but it definitely does in some cases (and then a reboot on battery is fine).
FWIW the upstream Kernel issue (https://bugzilla.kernel.org/show_bug.cgi?id=210425) seems to finally be fixed for me as of Kernel 6.0.10!
(In reply to Nate Graham from comment #40) > FWIW the upstream Kernel issue > (https://bugzilla.kernel.org/show_bug.cgi?id=210425) seems to finally be > fixed for me as of Kernel 6.0.10! Hm, still happening for me on 6.0.11 (F37) :-(
Interesting, I'm also on F37. I wonder if it only got fixed for certain hardware? I have a Lenovo ThinkPad X1 Yoga gen 4.
(In reply to Nate Graham from comment #42) > Interesting, I'm also on F37. > > I wonder if it only got fixed for certain hardware? I have a Lenovo ThinkPad > X1 Yoga gen 4. Probably yes, however I'm on Lenovo P1 gen2, so it's also Lenovo, but different platform
Hi. Just want to add my 2 cents: I have the same issue with the latest KDE Neon, Dell Precision 5560 (similar to XPS 15 9510), kernel 6.0.0-1009-oem
Happens on my laptop (Dell Inspiron 14 Plus 7420) too, I've tried many distros and all have this problem on Plasma.