power manager insists batter is broken

Bug #119318 reported by Bogdan Butnaru
16
Affects Status Importance Assigned to Milestone
gnome-power-manager (Ubuntu)
Invalid
Undecided
Unassigned
Gutsy
Invalid
Undecided
Unassigned

Bug Description

Hello! I've just updated from Feisty to Gutsy. I'm having a strange issue with the power manager. (I use Gnome for pretty much everything, btw.)

Each time I start up the computer, the power manager claims the battery's total capacity is only 33%, which probably means a bad or old battery. I'm almost sure that isn't the case (I have about the same uptime on a battery as when I bought the laptop, AFAIK). After the start-up finishes the power applet correctly shows the battery almost full, though.

I've also seen the manager at least once shutting down the computer with quite a lot of battery left (about a third), on a separate occasion.

I've read somewhere the power manager switched to a new battery estimator (I can't find where, though); apparently it needs a few battery cycles to "learn" the battery's behavior.

If that's true then it's still a bug: I think it should use the old heuristics until it has a reasonably good estimation (ie, it goes through a couple of full charge-discharge cycles with a better than, say, 5% estimate; restarts or time aren't good, as I often keep the computer plugged in for a few days). Otherwise, it can scare people with fake warnings, and can cause loss of work by shutting down with a full battery.

Revision history for this message
Juan Pablo Salazar Bertín (snifer) wrote :

Confirmed. I've experienced shutdowns because policy actions are not taken until an accurate profile is built for a battery.
Old estimation should be used instead to take policy actions, until an accurate profile is built.

Changed in gnome-power-manager:
status: Unconfirmed → Confirmed
Revision history for this message
Juan Pablo Salazar Bertín (snifer) wrote :

Current version affected by this bug: 2.19.3-0ubuntu2.

Revision history for this message
Bogdan Butnaru (bogdanb) wrote :

I think there are actually two sides to this bug.

On the one hand, I occasionally get the warning that my battery's old or broken and only has 36-25% maximum capacity left. (Not, this is not the charge of the battery, but the maximum charge.) I don't know how it estimates it (presumably from some battery self-description), but (a) it's vastly inaccurate, as my charge couldn't have decreased that much without me noticing, and (b) it decreased by about seven percent in the two weeks since I upgraded. I didn't notice the warning in a while, but I might have pressed the "don't warn me anymore" button, I'm not sure.

On the other hand, it's the estimation of _current_ charge that's the problem. After I upgraded to Gutsy, the new estimator became active. The problem is that it was convinced that power was critically low when the battery was at around 50% charge (and it's weird, it _told_ me I had 50% charge, but only five minutes left...) And since the computer was set to shut down on critically low power, it _could_not_ learn that the charge was enough for 40 more minutes, because it was shut down. I had to manually disable the automatic shutdown (and risk data corruption) to get it to learn it was safe to stay up until about 5% of the charge.

Revision history for this message
Juan Pablo Salazar Bertín (snifer) wrote :

About your battery max capacity, I'm not really sure, but probably g-p-m gets your battery capacity from /proc/acpi/battery/BAT0/info. If that's not accurate, it's probably not g-p-m's fault.

About your battery current charge, you can read a little more here: http://hughsient.livejournal.com/28386.html.

Revision history for this message
Bogdan Butnaru (bogdanb) wrote :

About the current charge (since I can't post there, I don't have LJ): instead of bugging users, the manager could simply do what it did before it had the new "profiling" features. (Or, it could initialize the profile with the "old" one, instead of blank data.) It will then be at least as good as the old one, and it will get better while learning. (Now it can be better, but it's worse than the old one the first few charge cycles.)

About the battery max capacity, this is really weird. I took a look at that /proc file, it looks quite strange (see below). The last/current charge is given as more than ten times the design capacity. I think it's probably an over-enthusiastic extrapolation (the voltage is higher than designed, and I think there's an exponential there in the calculation). Anyway, the warning is still weird. It should warn me I have too much battery capacity, not too little... (By the way, I notice it has some "by design" numbers for low/warning levels, they should be used to initialize the model.)

$ cat /proc/acpi/battery/BAT0/info
present: yes
design capacity: 5200 mAh
last full capacity: 63718 mAh
battery technology: rechargeable
design voltage: 11100 mV
design capacity warning: 520 mAh
design capacity low: 157 mAh
capacity granularity 1: 52 mAh
capacity granularity 2: 52 mAh
model number: DELL PC7646
serial number: 1660
battery type: LION
OEM info: Samsung SDI

$ cat /proc/acpi/battery/BAT0/state
present: yes
capacity state: ok
charging state: charged
present rate: 1 mA
remaining capacity: 63718 mAh
present voltage: 12352 mV

Revision history for this message
Richard Hughes (richard-hughes) wrote :

>I think it's probably an over-enthusiastic extrapolation

No, it's a broken BIOS that doesn't read the battery data, but instead hardcodes some values. My X60 does the same.

Revision history for this message
Richard Hughes (richard-hughes) wrote :

>the manager could simply do what it did before it had the new "profiling" features.

Some batteries don't give out rate, or if they do, it's _wildly_ inaccurate. Seriously, sometimes it's out my an order of magnitude.

Revision history for this message
SqUe (sque) wrote :

At the live CD at least of gutsy tribe 5, I am experiencing the same. But Feisty also reported that my battery's capacity was ~= 50% of initial desing capacity from the very first time I bought this laptop (6 months ago).

my cat /proc/acpi/battery/BAT0/info
present: yes
design capacity: 6000 mAh
last full capacity: 3712 mAh
battery technology: rechargeable
design voltage: 14800 mV
design capacity warning: 192 mAh
design capacity low: 116 mAh
capacity granularity 1: 10 mAh
capacity granularity 2: 25 mAh
model number: Primary
serial number:
battery type: LION
OEM info: Hewlett-Packard

which if i remember correctly (I had checked it a couple of months ago), my battery is not a 6000mAh but around 3000mAh (I read it on the battery).
I don't know where is the bug exactly, but I think its not gnome's...

HP dv6187ea

Revision history for this message
Rodrigo Pinheiro (ametade) wrote :

Since I have upgraded to Gutsy I'm getting 1h30m of battery life instead of almost 2h30h I had at Feisty.

Revision history for this message
Dan (sureshot) wrote :

I got the same problem as Rodrigo has. In Feisty, I got around 2h40m, with Gutsy I get around 1h40m battery life. Strange, since Gutsy was supposed to be easier on the battery than Feisty; at least that was the reason why I upgraded to Gutsy.

Revision history for this message
BeN (bromito) wrote :

Hello,

I have the same problem on my laptop (Fujitsu AMILO Pi 2530) with Gutsy the battery is given for 3 hours of autonomy but it's saying 1h15 98% ; It's strange because it's a new computer...

Revision history for this message
Brian Watson (vertexoflife) wrote :

Same problem here with a Toshiba Tecra, battery life is drastically shortened.

Revision history for this message
Bogdan Butnaru (bogdanb) wrote :

I should probably mention that this doesn't seem to happen anymore for me.

However, during the last few weeks I had several computer issues, which among other things led to replacing the motherboard (twice), the hard drive and the battery, and reinstalling Gutsy from scratch (the previous one had been updated all the way from Dapper).

The fact that the battery was broken — and, more interestingly, it still worked but its self-reporting didn't — may mean that was the problem. However, the symptoms I reported initially did happen right after updating to Gutsy, so there was probably a bug involved, too.

With the new battery uptime seems to be close to three hours, which is quite good. That's about what I was getting when I first got the laptop, despite the fact that the new battery is smaller (5200mAh vs 6000).

Revision history for this message
Robert (robrwo) wrote :

I have this problem too. On my Lenovo/IBM ThinPad Z60m Feisty had over 4.5 hours of battery life, which I've used. After upgrading to Gutsy, it reports 2.5 hours of battery life. Gnome Power Manager and acpi (command line) agree.

I note that acpi (command line) and Xfce battery monitor initially reported over four hours of battery life. Now they are giving values that agree with GPM.

Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

Please all make a distinction and open separate bug reports accordingly:
- gnome-power-manager reports you battery only lasts X hours while it is much more *actually* -> just an estimation problem
- since Gutsy, your laptop uptime on battery is much shorter than in Feisty -> power consumption problem
- before Gutsy, the estimated time was bogus (based on vendor information) and now it's accurate, though sorter -> no problem, just desillusion ;-) Please notice it's really normal that even new computers don't last what the advertisement says (who said vendors lie?).

And if some issues are fixed now in Hardy, please let us know. For now this bug mixes about three different problems and thus is useful to nothing at all. Thanks - and BTW if you need help to work this out, just ask!

Revision history for this message
Bogdan Butnaru (bogdanb) wrote :

As I mentioned above, I haven't encountered any gpm problems since Hardy. I hesitate to close the bug, as some users seem to have similar issues. But as far as I'm concerned you can close it and let people file new issues for Hardy (it's kind of old for a bug, anyway).

Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

Not clear whether there are still reasons to keep this bug open. Anyway we would need more details about each person's problem - so I close according to what the original reporter experiences. Don't hesitate to file new reports.

Changed in gnome-power-manager:
status: Confirmed → Invalid
status: Confirmed → Invalid
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.