upower shows wrong battery percentage after waking up from suspend

Bug #770881 reported by Philip Muškovac
34
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Upower
New
Undecided
Unassigned
upower (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: upower

upower currently shows a remaining percentage of 8.13402% while it is in fact 81% as shown by ACPI.

$ upower --dump
Device: /org/freedesktop/UPower/devices/line_power_AC
  native-path: /sys/devices/LNXSYSTM:00/device:00/PNP0A08:00/device:0a/PNP0C09:00/ACPI0003:00/power_supply/AC
  power supply: yes
  updated: Tue Apr 26 10:41:47 2011 (1637 seconds ago)
  has history: no
  has statistics: no
  line-power
    online: no

Device: /org/freedesktop/UPower/devices/battery_BAT0
  native-path: /sys/devices/LNXSYSTM:00/device:00/PNP0A08:00/device:0a/PNP0C09:00/PNP0C0A:00/power_supply/BAT0
  vendor: Panasonic
  model: 42T4801
  serial: 9429
  power supply: yes
  updated: Tue Apr 26 11:08:52 2011 (12 seconds ago)
  has history: yes
  has statistics: yes
  battery
    present: yes
    rechargeable: yes
    state: discharging
    energy: 6.761 Wh
    energy-empty: 0 Wh
    energy-full: 83.12 Wh
    energy-full-design: 84.24 Wh
    energy-rate: 3.051 W
    voltage: 11.47 V
    time to empty: 2.2 hours
    percentage: 8.13402%
    capacity: 98.6705%
    technology: lithium-ion
  History (charge):
    1303808932 8.134 discharging
    1303808902 8.173 discharging
    1303808872 8.205 discharging
    1303808842 8.234 discharging
  History (rate):
    1303808932 3.051 discharging
    1303808902 2.735 discharging
    1303808872 2.583 discharging
    1303808842 2.389 discharging

Daemon:
  daemon-version: 0.9.9
  can-suspend: yes
  can-hibernate no
  on-battery: yes
  on-low-battery: yes
  lid-is-closed: no
  lid-is-present: yes
  is-docked: no

$ acpi -V
Battery 0: Discharging, 81%, 02:11:51 remaining
Battery 0: design capacity 735 mAh, last full capacity 725 mAh = 98%
Adapter 0: off-line

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: upower 0.9.9-4
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Tue Apr 26 11:08:12 2011
InstallationMedia: Kubuntu 11.04 "Natty Narwhal" - Alpha amd64 (20110124)
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=en_US.UTF-8
 LANGUAGE=en_US.UTF-8
SourcePackage: upower
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Philip Muškovac (yofel) wrote :
Revision history for this message
Rafael P. (rafael-p) wrote :

Can be fixed by killing upowerd ( /usr/lib/upower/upowerd). A script can be written in /etc/pm/sleep.d/ to do this at each resume from sleep.
An upstream fix is strongly desired though.

Revision history for this message
Hartmut Voge (hartmut-voge) wrote :

Similar effect on my machine:

The ThinkPad x61s is running ubuntu 11.04. The upowerd (0.9.9-4) shows sometimes a wrong energy-full value after wake up from standby:

upower --monitor-detail
Monitoring activity from the power daemon. Press Ctrl+C to cancel.
[14:46:10.037] device changed: /org/freedesktop/UPower/devices/battery_BAT0
  native-path: /sys/devices/LNXSYSTM:00/device:00/PNP0A08:00/device:01/PNP0C09:00/PNP0C0A:00/power_supply/BAT0
  vendor: SANYO
  model: 92P1003
  serial: 804
  power supply: yes
  updated: Sun Jun 12 14:46:09 2011 (1 seconds ago)
  has history: yes
  has statistics: yes
  battery
    present: yes
    rechargeable: yes
    state: discharging
    energy: 10.16 Wh
    energy-empty: 0 Wh
    energy-full: 166.08 Wh
    energy-full-design: 63.36 Wh
    energy-rate: 11.691 W
    voltage: 13.82 V
    time to empty: 52.1 minutes
    percentage: 6.11753%
    capacity: 98.6742%
    technology: lithium-ion
  History (charge):
    1307882769 6.118 discharging
    1307882739 6.190 discharging
    1307882709 6.274 discharging
    1307882679 6.334 discharging
  History (rate):
    1307882769 11.691 discharging
    1307882740 13.400 discharging
    1307882710 12.879 discharging
    1307882679 13.064 discharging

Workaround: As mentioned already, restart the upowerd after wake up seems to help.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in upower (Ubuntu):
status: New → Confirmed
Revision history for this message
Hiroshi Miura (miurahr) wrote :

seems duplicated with #626025
fix is in kernel acpi subsystem; http://www.spinics.net/lists/stable-commits/msg11704.html
that is in #775809

Revision history for this message
Benjamin Daines (benjamindaines) wrote :

Same problem here in 12.10

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.