Description of problem: On my Dell E6320 with kde-workspace-4.8.95-1.fc17.x86_64, the battery plasmoid doesn't show the correct charge value of the battery. The plasmoid changes if the AC adapter i splgged in but still doesn't update the charge value. Version-Release number of selected component (if applicable): kde-workspace-4.8.95-1.fc17.x86_64 How reproducible: Always Steps to Reproduce: 1.Add battery plasmoid to panel 2.Unplug AC adapter and wait some time 3.compare charge value shown by plasmoid and gkrellm or calculate current charge from values in /sys Actual results: Plasmoid charge value isn't correct Expected results: Plasmoid shows correct charge value of battery. Additional info:
$ upower --dump and $ solid-hardware details /org/freedesktop/UPower/devices/battery_BAT0
Same here (Fedora 17 + kde-workspace-4.8.95-1.fc17.x86_64). Oddly enough, if I run the plasmoid in its own window ("plasma-windowed battery"), it shows the correct charge value of the battery. More info: [christian@laptop ~]$ upower --dump Device: /org/freedesktop/UPower/devices/line_power_ADP1 native-path: /sys/devices/LNXSYSTM:00/device:00/ACPI0003:00/power_supply/ADP1 power supply: yes updated: Tue Jul 3 10:40:49 2012 (1174 seconds ago) has history: no has statistics: no line-power online: yes Device: /org/freedesktop/UPower/devices/battery_BAT1 native-path: /sys/devices/LNXSYSTM:00/device:00/PNP0A08:00/device:0f/PNP0C09:00/PNP0C0A:00/power_supply/BAT1 vendor: SAMSUNG Electronics power supply: yes updated: Tue Jul 3 10:40:54 2012 (1169 seconds ago) has history: yes has statistics: yes battery present: yes rechargeable: yes state: fully-charged energy: 27.75 Wh energy-empty: 0 Wh energy-full: 27.75 Wh energy-full-design: 44.4 Wh energy-rate: 15.1071 W voltage: 12.301 V percentage: 100% capacity: 62.5% technology: lithium-ion Daemon: daemon-version: 0.9.17 can-suspend: yes can-hibernate yes on-battery: no on-low-battery: no lid-is-closed: no lid-is-present: yes is-docked: no [christian@laptop ~]$ solid-hardware details /org/freedesktop/UPower/devices/battery_BAT0 udi = '/org/freedesktop/UPower/devices/battery_BAT0' parent = '' (string) vendor = '' (string) product = '' (string) description = '' (string) [christian@laptop ~]$ solid-hardware details /org/freedesktop/UPower/devices/battery_BAT1 udi = '/org/freedesktop/UPower/devices/battery_BAT1' parent = '/org/freedesktop/UPower' (string) vendor = 'SAMSUNG Electronics' (string) product = 'Lithium Ion Battery' (string) description = 'Lithium Ion Battery' (string) Battery.plugged = true (bool) Battery.type = 'PrimaryBattery' (0x3) (enum) Battery.chargePercent = 100 (0x64) (int) Battery.rechargeable = true (bool) Battery.chargeState = 'NoCharge' (0x0) (enum)
Christian, can you do the same "dump" when running on battery please?
Sure, here is it: [christian@laptop ~]$ upower --dump Device: /org/freedesktop/UPower/devices/line_power_ADP1 native-path: /sys/devices/LNXSYSTM:00/device:00/ACPI0003:00/power_supply/ADP1 power supply: yes updated: Tue Jul 3 11:34:10 2012 (137 seconds ago) has history: no has statistics: no line-power online: no Device: /org/freedesktop/UPower/devices/battery_BAT1 native-path: /sys/devices/LNXSYSTM:00/device:00/PNP0A08:00/device:0f/PNP0C09:00/PNP0C0A:00/power_supply/BAT1 vendor: SAMSUNG Electronics power supply: yes updated: Tue Jul 3 11:36:10 2012 (17 seconds ago) has history: yes has statistics: yes battery present: yes rechargeable: yes state: discharging energy: 26.64 Wh energy-empty: 0 Wh energy-full: 27.75 Wh energy-full-design: 44.4 Wh energy-rate: 19.314 W voltage: 11.912 V time to empty: 1.4 hours percentage: 96% capacity: 62.5% technology: lithium-ion History (charge): 1341329770 96.000 discharging 1341329720 97.000 discharging History (rate): 1341329770 19.314 discharging 1341329750 22.233 discharging 1341329720 19.625 discharging 1341329695 21.900 discharging Daemon: daemon-version: 0.9.17 can-suspend: yes can-hibernate yes on-battery: yes on-low-battery: no lid-is-closed: no lid-is-present: yes is-docked: no
so, I think there is a correlation between some plasmoids not updating, but only after a suspend->resume cycle. I'm seeing some oddness with plasma-nm too recently (the applet displays incorrect signal strength). Any of you seeing this on a fresh boot without ever having suspended?
$ solid-hardware details /org/freedesktop/UPower/devices/battery_BAT1 too please :)
[christian@laptop ~]$ solid-hardware details /org/freedesktop/UPower/devices/battery_BAT1 udi = '/org/freedesktop/UPower/devices/battery_BAT1' parent = '/org/freedesktop/UPower' (string) vendor = 'SAMSUNG Electronics' (string) product = 'Lithium Ion Battery' (string) description = 'Lithium Ion Battery' (string) Battery.plugged = true (bool) Battery.type = 'PrimaryBattery' (0x3) (enum) Battery.chargePercent = 91 (0x5b) (int) Battery.rechargeable = true (bool) Battery.chargeState = 'Discharging' (0x2) (enum)
Rex, you are right. The problem is triggered by a suspend->resume cycle. After a reboot, the battery plasmoid is working as expected. BTW, I've seen the plasma-nm bug as well. Is there another bug report for this?
For me, battery applet is stuck at 94% , but $ upower -d Device: /org/freedesktop/UPower/devices/line_power_AC native-path: /sys/devices/LNXSYSTM:00/device:00/ACPI0003:00/power_supply/AC power supply: yes updated: Mon Jul 2 16:00:50 2012 (69692 seconds ago) has history: no has statistics: no line-power online: yes Device: /org/freedesktop/UPower/devices/battery_BAT0 native-path: /sys/devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/BAT0 vendor: SMP model: DELL PD6858 serial: 297 power supply: yes updated: Mon Jul 2 16:00:57 2012 (69685 seconds ago) has history: yes has statistics: yes battery present: yes rechargeable: yes state: fully-charged energy: 86.58 Wh energy-empty: 0 Wh energy-full: 86.58 Wh energy-full-design: 86.58 Wh energy-rate: 0.0111 W voltage: 12.448 V percentage: 100% capacity: 97.2051% technology: lithium-ion Daemon: daemon-version: 0.9.17 can-suspend: yes can-hibernate yes on-battery: no on-low-battery: no lid-is-closed: no lid-is-present: yes is-docked: no $ solid-hardware details /org/freedesktop/UPower/devices/battery_BAT0 udi = '/org/freedesktop/UPower/devices/battery_BAT0' parent = '/org/freedesktop/UPower' (string) vendor = 'SMP' (string) product = 'DELL PD6858' (string) description = 'Lithium Ion Battery' (string) Battery.plugged = true (bool) Battery.type = 'PrimaryBattery' (0x3) (enum) Battery.chargePercent = 100 (0x64) (int) Battery.rechargeable = true (bool) Battery.chargeState = 'NoCharge' (0x0) (enum) So, seems upower/solid are correct, the applet just isn't getting the update.
Ah, found https://bugs.kde.org/show_bug.cgi?id=287952 for this particular issue.
Yup, looks like it :/ The problem with suspend is that the devices "vanish" from the system (get removed internally) and they reappear upon the resume and the Plasma dataengine holds reference to the stale objects, therefore not receiving any updates.
Created attachment 596049 [details] upower dump
Created attachment 596050 [details] solid battery details
Just to be sure, is it just the charge percent that isn't getting updated? What about the AC plug state, does the plasmoid correctly react to plugging/unplugging the cable?
For me, the AC plug state gets displayed just fine. It's only the charge value that is wrong.
It looks like this is more related to KDE bug #287952
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.
%changelog * Mon Jul 09 2012 Rex Dieter <rdieter> 4.8.95-3 - Battery Monitor widget stops tracking charging state changes after suspend/resume cycle (#837345, kde#287952)