Power Manager reports incorrect battery charge

Bug #410604 reported by Richard Cavell
130
This bug affects 30 people
Affects Status Importance Assigned to Milestone
devicekit-power (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

I have a second-gen MacBook, 15 inch white version with original battery. Latest battery firmware (1.4) applied in OS X. The battery still holds charge and works as it ought to. I have external lights that show me how much charge there is and whether the battery is charging.

I took my laptop off power about 2 hours ago, and allowed it to slowly discharge. I then plugged it back into power about 1 hour ago. I am attaching screenshots to show what power manager is reporting. It correctly identified that the power slowly drained, but when I plugged the AC power back in, it declared that there is 2.8% charge remaining and has done so for the last hour. I can confirm using my external lights that my battery discharged no lower than 80% and then was charging betwen 80 and 100% for the last hour.

Also, looking at the power statistics, it seems as though something is SNAFU. It appears as though one of the numbers is miscalculated. Also, my laptop reported 2.8% full for an hour when the rate was 2.8 Watts. Is it confusing the percentage-full with the wattage?

Richard

Revision history for this message
Richard Cavell (richardcavell) wrote :
Revision history for this message
Richard Cavell (richardcavell) wrote :
Revision history for this message
Richard Cavell (richardcavell) wrote :
Revision history for this message
Scott Howard (showard314) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. The issue that you reported is one that should be reproducible with the live environment of the Desktop CD of the development release - Karmic Koala. It would help us greatly if you could test with it so we can work on getting it fixed in the next release of Ubuntu. You can find out more about the development release at http://www.ubuntu.com/testing/. We need to test this in Karmic because there has been significant changes in how batteries are handled since Jaunty.

If it does exist in Karmic, could you run the following command into the terminal when you are experiencing this bug:
apport-collect 410604

Thanks again and we appreciate your help.

Changed in gnome-power-manager (Ubuntu):
status: New → Incomplete
Revision history for this message
Richard Cavell (richardcavell) wrote :

Hi,

Sorry, I should have said: I am experiencing this bug in 64-bit Karmic, with all updates applied up until early August. I never had any problems with battery status info in Jaunty. Karmic seems to have nothing but trouble interpreting my battery status, but Jaunty worked fine.

I am currently unable to reproduce the bug (ie Karmic is currently reporting the battery percentage correctly). I'll run apport-collect if it happens again.

Richard

Revision history for this message
Richard Cavell (richardcavell) wrote : apport-collect data

Architecture: amd64
DistroRelease: Ubuntu 9.10
Package: gnome-power-manager 2.27.5-0ubuntu1
PackageArchitecture: amd64
ProcEnviron:
 SHELL=/bin/bash
 LANG=en_AU.UTF-8
ProcVersionSignature: Ubuntu 2.6.31-5.24-generic
Uname: Linux 2.6.31-5-generic x86_64
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Revision history for this message
Richard Cavell (richardcavell) wrote :
Revision history for this message
Richard Cavell (richardcavell) wrote :
Revision history for this message
Richard Cavell (richardcavell) wrote :
Revision history for this message
Richard Cavell (richardcavell) wrote :
Changed in gnome-power-manager (Ubuntu):
status: Incomplete → New
tags: added: apport-collected
Revision history for this message
Richard Cavell (richardcavell) wrote :

Okay, I reproduced the bug. AC was unplugged and I was getting a very low battery status (3.4%) within Karmic while I ran apport-collect. However, the battery's external lights indicate almost 100% charge, and it is almost 100% charged because I only just took it off AC power.

Revision history for this message
Scott Howard (showard314) wrote :

Thanks for the report. From devkitpower --dump:
Device: /org/freedesktop/DeviceKit/Power/devices/battery_BAT0
  native-path: /sys/devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/BAT0
  vendor: DPON013
  model: ASMB013
  power supply: yes
  updated: Sun Aug 9 13:11:12 2009 (30 seconds ago)
  has history: yes
  has statistics: yes
  battery
    present: yes
    rechargeable: yes
    state: discharging
    energy: 37.1 Wh
    energy-empty: 0 Wh
    energy-full: 1091.77 Wh
    energy-full-design: 50.2 Wh
    energy-rate: 17.984 W
    voltage: 12.152 V
    time to empty: 2.1 hours
    percentage: 3.39816%
    capacity: 79.7809%

DKP is reporting the wrong information on the battery. GPM is then "working as intended" Reassigning to dkp.

affects: gnome-power-manager (Ubuntu) → devicekit-power (Ubuntu)
Changed in devicekit-power (Ubuntu):
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
pablomme (pablomme) wrote :

I have the same problem on my non-mac laptop, and I think bug #419819 refers to the same issue.

Revision history for this message
FrejSoya (frej) wrote :

Same issue, enegery-full is way too high.

Seems to be triggered after a suspend/resume cycle. Iit might be the kernel accidently wrong values just after a resume, and devicekit-power just reading the value once, even if it changes.

Revision history for this message
pablomme (pablomme) wrote :

> Seems to be triggered after a suspend/resume cycle.

In my case there is no suspend/resume involved, so I don't think this is the (only) trigger.

Revision history for this message
Richard Cavell (richardcavell) wrote :

Yeah, there was no suspend/resume for me, either. Just unplugging and replugging the power cord.

Suspend/resume causes a whole new bunch of problems for me, which is why I don't use it.

Richard

Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

Could it be related to bug #434251 ? Maybe a duplicate ?

Revision history for this message
Abhishek Dasgupta (abhidg) wrote :

Is the problem still there in lucid as well?

Revision history for this message
helder.silva (skandals) wrote :

Architecture: amd64
DistroRelease: Ubuntu 9.10
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
Package: devicekit-power 011-1ubuntu1
PackageArchitecture: amd64
ProcEnviron:
 SHELL=/bin/bash
 LANG=en_US.UTF-8
ProcVersionSignature: Ubuntu 2.6.31-17.54-generic
Uname: Linux 2.6.31-17-generic x86_64
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Revision history for this message
helder.silva (skandals) wrote : Dependencies.txt
Revision history for this message
helder.silva (skandals) wrote : XsessionErrors.txt
Revision history for this message
Tom Louwrier (tom-louwrier) wrote :

This is probably also related to bug 418428, which is very much not fixed yet in Lucid as of today (mar 23, 2010, all updates loaded twice a day).
DKP severely messes up charging/fully charged states and battery rate. Plugging in the AC adapter consistently gives me a spike in the reported battery load, leading to a predicted time to empty of just seconds. So the system shuts down on you.

Also I'm getting a fairly constant refusal to load the battery because it appears to be 'fully charged' when it obviously is not.

cheers Tom

Revision history for this message
Nikolaus Filus (nfilus) wrote :

Ping!
I have the same (?) problem, that gpm reported energy-full=951 and percentage<3%.
After reading some reports and digging deeper into the new devkit-power based architecture, I simply killed upowerd and restarted it by calling:
upower -d
which reports a more reasonable value (33 Wh) now. Plug/Unplug and Supend/Resume did not change the value yet ... must keep a look on this.

Revision history for this message
Tom Louwrier (tom-louwrier) wrote :

Here's something that might help: I switched to another power supply; same brand, smaller, but still.
The power management seems to be working as it should now (fine) but also the errors have gone from my logs (bug 549741).

To me this definitively points to a bug somewhere in the bios, the battery's firmware and/or the power supply (if any).
It may very well even be limited to a specific series of devices.

If that is the case, I don't think there will be a proper fix for it. Maybe addition of a quirk to detect it and activate a workaround (what?).
Of course I'll be happy to do more testing and report the outcome here. Just let me know.

I've posted the same comment in bug 418428 as well, since I think these bugs are related somehow.

cheers
Tom

Revision history for this message
Phil Davidov (davidovp69) wrote :

Another quick comment.

On a Lenovo T510 notebook, removing and reinserting the battery resets the battery statistics/calculations to their normal levels

Revision history for this message
hec1123 (jwindelen) wrote :

I've had the same issue on a Macbook 2,1 running Ubuntu 10.10.

Removing and reinserting the battery fixed the problem for me as well.

Revision history for this message
Omadas (bsperger) wrote :

I hate to be a bugmancer and raise this from the dead, but I believe it is better than cloning the issue (Even if it increases the heat). My problem is not being solved by removing the battery or any bios setting -indeed, windows reports battery levels correctly-.

At full charge, a battery that lasts 8 hrs in windows is down to 6 in Mint (I am ok with the compromise), but the problem is that those 6hrs are reported to only last a little over 4 hrs by the power manager. When I let it die and plugged it in, the power manager reported a 2% charge and 1hr13min of use (which as I type hasn't changed even though it has gained 10% charge). Obviously, something is not working as anticipated.

I do work in data entry, coding, and multimedia, so knowing how much battery life I can expect is important; I would ask that the importance be upped to medium as a power failure could result in the loss of user data, or worse (during an update this bug could damage an install). I would also ask for an elevation of this bug as it has not been solved for, or addressed in, 5 years.

Revision history for this message
Omadas (bsperger) wrote :

Jost Noticed this: Currently at 29% charge during a charge, power manager reports 58min of battery life. Unplugging and plugging in again, the notification that pops-up reports: 30% and 27min. Every time I repeat this experiment the popup will report a different amount, sometime as much as 1hr6min, sometimes as low as the 27min. just shown. If there are any commands you would like me to run, let me know.

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.