GNOME Bugzilla – Bug 611555
When charger disconnected battery goes to full
Last modified: 2020-11-06 20:13:53 UTC
When Its charging everything is fine but when I disconnected the charger my battery status goes to full and it wont show my correct status unless I reboot or pkill power PS: killall gnome-power-manager and starting gnome-power-manager again does not change the status but pkill power and starting power manager again shows the correct battery status. I am using acer aspire one ZG5 with bios 3309 using ubuntu LUCID gnome power manager 2.29.91
Can any one please help here, Now I have come to a conclusion that this bug is in upowerd. If I unplug the charger the battery will go to full. then I killall gnome-power-manager and start it again batery is again full. The I sudo killall upowerd and killall gnome-power-manager and start gnome-power-manager now the battery status is correct. Please let me know If any type of debug information is required. Please
I think you need to investigate why upower gets the status wrong. Running upowerd on the console with --verbose is probably a good first step. Thanks.
Created attachment 164143 [details] upower --verbose sorry for the very late reply :( If I do: $ sudo killall upowerd $ sudo /usr/lib/upower/upowerd --verbose my battery status is updated instantly. upower 0.9.1
There are 11 people facing this issue downstream too. also reported: https://bugs.launchpad.net/ubuntu/+source/upower/+bug/467825
I can confirm this on a HP Pavilion DV6730ec with Ubuntu 10.04, gnome-power-manager 2.30.0-0ubuntu1 and upower 0.9.1-1. I attached some log files, too. In the tar-ball you find: - upowerd.log: the output of "upowerd --verbose" - gnome-power-manager.log: the output of "gnome-power-manager --verbose" - sysfs.log: the contents of /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0A:00/power_supply/BAT0. Precisely, I used the following code snippet to generate the log: while (true); do echo; date; for i in $(find -type f); do echo -n "$i: "; cat $i; done; sleep 10; done > sysfs.log - power_status.log: a log of power-related events, e.g., when I plugged in the AC connector It took a few days, until the problem occurred again. That is why the logs are a couple of MBs (~8MB) when uncompressed. When you look into power_status.log, everything goes well until Thu Jul 8 20:46:56 CEST 2010. This is when upowerd fails to notice that the AC was unplugged. Usually, I kill and restart upowerd, which causes gnome-power-manager to update the power status (i.e., the status icon shows that the battery is discharging). I did not kill upowerd this time, though. Next time I plugged in the AC connector, upowerd picked this up without me restarting it and everything was back to normal (Thu Jul 8 22:15:29 CEST 2010). There are two details which I would like to add to Omer's report: - Even if you restart upowerd, gnome-power-manager fails to trigger any events such as automatic hibernation, when battery is critically low. Gnome-power-manager does show the correct battery status (i.e., discharging), but it does not warn when the battery is low and does not hibernate when it is critically low. - For me the problem seems to occur primarily under these conditions: battery fully charged, laptop lid closed, I then unplug the AC connector. It does not seem to happen, when the battery is not fully charged. And it seems much less likely to happen (if at all), when the laptop lid is not closed. I found a similar bug report in the Red Hat bug tracker. From my understanding, it describes the same issue and there has already been done a fair amount of debugging: https://bugzilla.redhat.com/show_bug.cgi?id=521874
Created attachment 165647 [details] upowerd --verbose upowerd --verbose gnome-power-manager --verbose /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0A:00/power_supply/BAT0
Hi, These are snippets of the reports i made in https://bugs.launchpad.net/ubuntu/+source/upower/+bug/467825 Did an quick and dirty experiment and edited the source file myself and built the upower package and preliminary results are promising. The gnome power manager now reacts after a while, i think the poll rate is 30s, when i unplug the AC power. Will run this for a while to see that it is not just a coincidence. This is the line i edited. diff src/linux/up-device-supply.c src/linux/up-device-supply.c~ 549c549 < /* supply->priv->enable_poll = (state != UP_DEVICE_STATE_FULLY_CHARGED); */ --- > supply->priv->enable_poll = (state != UP_DEVICE_STATE_FULLY_CHARGED); I commented out the whole line, it is perhaps not the grandest solution but it seems to work. I have not found any function to call to see if the computer has AC power so i cannot implement that. Just to clarify the problems i have seen and what my test has fixed. On the aspire one the charge is correctly reported from boot until the charge is full. Then if you remove the powercord gnome power manager reports full charge until the battery dies. This is due to the fact that upower stops polling the battery when the charge is full. upower has a poll of the battery on changes in the ac supply but when the battery is fully charged it takes a while for it to start reporting that it is discharging so the automatic polls around ac power event does not catch this and it disables the polling of the battery. restaring upowerd or plugging in the AC power will remedy this, provided the battery isn't full yet. I have not been able to solve the fact that it doesn't seem to trigger the hibernation, i had less than 1% left when i didn't dare to run any longer and plugged the AC back in. Just a tip on debugging this the upower --monitor-detail is a nice command.
This is the output from upower -d when the battery is below 10% upower -d Device: /org/freedesktop/UPower/devices/line_power_ACAD native-path: /sys/devices/LNXSYSTM:00/device:00/ACPI0003:00/power_supply/ACAD power supply: yes updated: Tue Jun 28 07:56:42 2011 (7 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/PNP0C0A:00/power_supply/BAT1 vendor: SIMPLO model: UM08A73 serial: 00A3 power supply: yes updated: Tue Jun 28 07:56:47 2011 (2 seconds ago) has history: yes has statistics: yes battery present: yes rechargeable: yes state: fully-charged energy: 0.9768 Wh energy-empty: 0 Wh energy-full: 12.6984 Wh energy-full-design: 24.42 Wh energy-rate: 10.3452 W voltage: 10.222 V percentage: 7.69231% capacity: 52% technology: lithium-ion History (charge): 1309240600 7.692 charging 1309240585 7.955 discharging 1309240555 8.829 discharging 1309240525 9.441 discharging History (rate): 1309240600 10.345 charging 1309240585 10.578 discharging 1309240555 10.279 discharging 1309240525 10.268 discharging Daemon: daemon-version: 0.9.9 can-suspend: no can-hibernate no on-battery: no on-low-battery: no lid-is-closed: no lid-is-present: no is-docked: no
bugzilla.gnome.org is being replaced by gitlab.gnome.org. We are closing all old bug reports in Bugzilla which have not seen updates for many years. If you can still reproduce this issue in a currently supported version of GNOME (currently that would be 3.38), then please feel free to report it at https://gitlab.gnome.org/GNOME/gnome-power-manager/-/issues/ Thank you for reporting this issue and we are sorry it could not be fixed.