Bug 71874

Summary: fully charged battery reported as 0% charged
Product: upower Reporter: Rex Dieter <rdieter>
Component: generalAssignee: Richard Hughes <richard>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Rex Dieter 2013-11-21 13:37:50 UTC
See also downstream bug,
https://bugzilla.redhat.com/show_bug.cgi?id=1025980

Since upgrading to upower-0.9.23 (upower-0.9.23-1.fc20.x86_64 build specifically), booting or resuming laptop with fully charged battery upower reports:
    state:               fully-charged
    percentage:          0%

full upower -d output below:

$ upower -d
Device: /org/freedesktop/UPower/devices/line_power_AC
  native-path:          AC
  power supply:         yes
  updated:              Sat 02 Nov 2013 01:12:55 PM CDT (125 seconds ago)
  has history:          no
  has statistics:       no
  line-power
    online:             yes

Device: /org/freedesktop/UPower/devices/battery_BAT0
  native-path:          BAT0
  vendor:               SMP
  model:                DELL PD6858
  serial:               1842
  power supply:         yes
  updated:              Sat 02 Nov 2013 01:13:00 PM CDT (120 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.464 V
    percentage:          0%
    capacity:            93.2564%
    technology:          lithium-ion

Daemon:
  daemon-version:  0.9.23
  on-battery:      no
  on-low-battery:  no
  lid-is-closed:   no
  lid-is-present:  yes
  is-docked:       no



Now unplug from AC wait a bit and percentage jumps up to expected values:
    percentage:          97%

$ upower -d
Device: /org/freedesktop/UPower/devices/line_power_AC
  native-path:          AC
  power supply:         yes
  updated:              Sat 02 Nov 2013 10:01:33 PM CDT (154 seconds ago)
  has history:          no
  has statistics:       no
  line-power
    online:             no

Device: /org/freedesktop/UPower/devices/battery_BAT0
  native-path:          BAT0
  vendor:               SMP
  model:                DELL PD6858
  serial:               1842
  power supply:         yes
  updated:              Sat 02 Nov 2013 10:03:39 PM CDT (28 seconds ago)
  has history:          yes
  has statistics:       yes
  battery
    present:             yes
    rechargeable:        yes
    state:               discharging
    energy:              78.366 Wh
    energy-empty:        0 Wh
    energy-full:         86.58 Wh
    energy-full-design:  86.58 Wh
    energy-rate:         36.5523 W
    voltage:             12.032 V
    time to empty:       2.1 hours
    percentage:          97%
    capacity:            93.2564%
    technology:          lithium-ion
  History (rate):
    1383447819  36.552  discharging
    1383447789  33.788  discharging
    1383447759  34.177  discharging

Daemon:
  daemon-version:  0.9.23
  on-battery:      yes
  on-low-battery:  no
  lid-is-closed:   no
  lid-is-present:  yes
  is-docked:       no
Comment 1 Rex Dieter 2013-11-21 13:50:05 UTC
This may be relevant:

systemctl status upower:
...

Nov 21 07:48:45 localhost.localdomain upowerd[1656]: (upowerd:1656): UPower-Linux-WARNING **: energy 86.580000 bigger than full 77.899800
Nov 21 07:48:45 localhost.localdomain upowerd[1656]: (upowerd:1656): GLib-GObject-WARNING **: value "111.000000" of type 'gdouble' is invalid or out of range for prop... 'gdouble'
Comment 2 Rex Dieter 2014-01-16 12:51:38 UTC
Confirmed fixed in 0.9 branch with Oct 22 commit, backported to fedora 0.9.23 packaging downstream.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.