Laptop Battery Time Remaining Outrageously Inaccurate

Bug #120258 reported by PeterL
328
This bug affects 64 people
Affects Status Importance Assigned to Milestone
Upower
Opinion
Undecided
Unassigned
gnome-power
Unknown
Medium
gnome-power-manager (Ubuntu)
Confirmed
High
Meghana N M
gnome-settings-daemon (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Ubuntu 7.04 Feisty Fawn

Hardware is HP Pavilion DV1000 series (specific DV1588EA)

Battery monitor when running on battery reports percentage of battery remaining correctly, but the corresponding remaining time is often fabulously wrong (and can swing between e.g a few minutes to tens of hours in the blink of an eye). /* What I wouldn't give for batteries that can last 14 hours between charges... */

It looks for all the world like the underlying values are being held in storage classes which are too small or where value-wrapping is not being handled quite right...

BTW UBUNTU is fantastic; I'm a convert! Keep up the good work!

Revision history for this message
Bryce Harrington (bryce) wrote :

I've noticed the same with a Dell 1505n running Gutsy. The tooltip popup says there is 55 min remaining when the battery is at 98%.
Yet if I pull up the Device Information page for it, it correctly shows "Discharge Time: 5 hours 56 minutes"

Revision history for this message
Bryce Harrington (bryce) wrote :

Aha!! I think I figured this one out.

Short answer: In gconf-editor, set apps->gnome-power-manager->use_profile_time to FALSE (unchecked).

Longer answer: In poking around inside gnome-power-manager I could see that it *does* get the correct discharge time, sometimes (the Device Info page, for instance), but when running it through the debugger I found it zeros out that number. Inside gnome-power-manager, gpm-cell-array.c there is the following bit of code:

       /* We may want to use the old time remaining code.
         * Hopefully we can remove this in 2.19.x sometime. */
        if (cell_array->priv->use_profile_calc == TRUE &&
            unit->kind == GPM_CELL_UNIT_KIND_PRIMARY) {
                gpm_debug ("unit->percentage = %i", unit->percentage);
                unit->time_discharge = gpm_profile_get_time (cell_array->priv->profile, unit->percentage, TRUE);
                unit->time_charge = gpm_profile_get_time (cell_array->priv->profile, unit->percentage, FALSE);
         } else {

This appears to be what causes this to get zero'd out. By setting 'use_profile_time' in gconf off, it causes the use_profile_calc parameter in the above code to be FALSE, which turns off that bit of code. The comment there before the code makes it sound like the authors are iffy on this code to begin with, so presumably this bug is a sign that having this code go away would be a good thing. :-)

Bryce Harrington (bryce)
Changed in gnome-power-manager:
importance: Medium → High
Revision history for this message
PeterL (pilord) wrote :

Looking in my installation, gconf-editor, set apps->gnome-power-manager->use_profile_time didn't exist [and was/is therefore FALSE (?)]

I added this field and then tried both values but neither makes any obvious difference. Then again gconf-editor reports this new key as having no schema (whatever *that* is...)

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

It looks like this key is now located at apps->gnome-power-manager->general->use_profile_time

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

PeterL: you won't find this key in your gconf, since battery profiles were introduced in version 2.19.x (I assume you're using some 2.18.x version). I'm not sure what could be the cause, but if you're using some 2.18.x version, you can discard battery profiles being the problem.

Revision history for this message
Chris Halse Rogers (raof) wrote :

Is this caused by https://bugs.launchpad.net/ubuntu/+source/gnome-power-manager/+bug/123664 ? Can you check if suspending grossly distorts your battery profile?

Revision history for this message
PeterL (pilord) wrote :

Re : "Can you check if suspending grossly distorts your battery profile?"
Hi Chris,

I don't need to suspend to get bizarre "Battery Time Remaining" estimates; simply unplugging the mains adaptor and mouse-over the battery icon a few times is sufficient.
As I stated in my original bug report, the percentage battery remaining figure seems to be reliable-enough.

Revision history for this message
Chris Halse Rogers (raof) wrote :

I was obviously unclear. I don't mean that the battery time is only wrong after suspending. I mean that the battery profile (which you can see in the "profiled discharge time" graph of power history) is influenced by time while the laptop is suspended - and since the laptop is using hardly any power while suspended, this makes the battery profile vastly underestimate the normal power usage (and hence overestimate the time remaining).

This manifests (for me) as a large spike in the profiled discharge graph at around the 30% mark, around the level I usually resume from suspend, which I can reduce by allowing the battery to discharge through that level a couple of times, and not suspending.

Revision history for this message
PeterL (pilord) wrote :

Re : "Can you check if suspending grossly distorts your battery profile?"
Hi Chris,

I left the PC suspended most of today, then resumed this evening.

The resulting "Power History" graph was stalled during the suspen period and seems to be set in a different timezone from myself; I'm on GMT (plus 1 hr summer-time) and it's 21:07, the Power History graph currently reads 14:18 !!

The graph I get reflects my previous observation; the time remaining swings wildly (and many times) between almost 10 hours and a few minutes. The oscillation is displayed as having occurred 12 times in an indicated 20 minutes.

Revision history for this message
tuharsky (tuharsky) wrote :

Hi,

I have similar problem with Feisty on HP Compaq nx9105. The remaining percentage is correct, however the time is usually extraordinary high.

this is my battery:

alarm: unsupported
present: yes
design capacity: 4400 mAh
last full capacity: 3458 mAh
battery technology: rechargeable
design voltage: 14800 mV
design capacity warning: 220 mAh
design capacity low: 132 mAh
capacity granularity 1: 264 mAh
capacity granularity 2: 3780 mAh
model number: Primary
serial number:
battery type: Lion
OEM info: Hewlett-Packard
present: yes
capacity state: ok
charging state: discharging
present rate: 0 mA
remaining capacity: 485 mAh
present voltage: 14181 mV

Can I help somehow?

Revision history for this message
Nick McMahon (nmcmahon) wrote :

My battery currently has 684985 hours 30 mins remaining (67%), I hope I make it home!
is there a way we can reset the profile?
also willing to help.

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

Can you open an upstream bug please. Thanks.

Revision history for this message
seekortry (danieljwall) wrote :

I have the same problem appear suddenly on my Dell 1420. The battery manager does not work correctly any longer. If I run the laptop on battery power, it will not charge after I plug it back in. Once plugged-in, it says I am fully charged at some percentage (which drops each time I unplug). If I reboot and go to to the bios, I can watch the battery charge as normal. I first thought it was a battery problem. Dell sent me a new battery. Same problem. I first noticed this defect about two weeks ago. So it may not be related to the original issue in this thread.

Revision history for this message
Dan Alderman (danalderman) wrote :

Same issue on a Thinkpad X61s 1.60Ghz. Running up to date Hardy A5. Percentage is correct but remaining time and graphs are wildly wrong.

Revision history for this message
Ted Gould (ted) wrote :

@Dan Alderman

Could you please post screenshots of the the graphs?

Thanks.

Revision history for this message
Lutieri G. B. (lutierigb-gmail) wrote :
Revision history for this message
gmazk (gmazk-8) wrote :

I have the same issue on my Acer Aspire 5672... Ubuntu Gutsy P.M. reports that my battery may be damaged (running at 43% of it's full capacity) even when I start my OS with the notebook plugged in the AC.

Revision history for this message
madneon (madneon) wrote :

On: HP Pavilion HDX 9050 EG, Gnome Power Manager reports constantly ~150% real battery state.

Revision history for this message
madneon (madneon) wrote :

...remaining time, that is.

Revision history for this message
Twistedfish (supergeek-tech) wrote :

Has anyone found a solution for this? I am having the same issue as seekortry"

"I have the same problem appear suddenly on my Dell 1420. The battery manager does not work correctly any longer. If I run the laptop on battery power, it will not charge after I plug it back in. Once plugged-in, it says I am fully charged at some percentage (which drops each time I unplug). If I reboot and go to to the bios, I can watch the battery charge as normal. I first thought it was a battery problem. Dell sent me a new battery. Same problem. I first noticed this defect about two weeks ago. So it may not be related to the original issue in this thread"

I am running a Toshiba Satellite. P35-S611.

Revision history for this message
Eder Bastos (riskbreaker927) wrote :

I have run Ubuntu Gutsy, Hardy, and Intrepid on my Inspiron 1501, and Hardy on my girlfriend's Gateway MX**** something or other laptop, and have never once over the last year gotten an accurate battery life reading.

Revision history for this message
Philipp (dergringo-deactivatedaccount) wrote :

I can confirm this Bug on my ThinkPad T61, Ubuntu Hardy x86.

1. The power history seems to be wrong and shows a usage of about 9W (I wish it was so). But powertop shows about 18W.

2. The remaining time is about 2.5 times bigger than the one shown by the power manager. When about three real minutes go over, then the power manger makes one minute out of it.

Revision history for this message
kforum (euro-fix) wrote :

i just wanted to say that on kubuntu 8.10 beta the kpowermanager works quite ok, and most of the times knows exactly how much is left.
so maybe this is gnome specific issue. ;)

Revision history for this message
seekortry (danieljwall) wrote : Re: [Bug 120258] Re: Laptop Battery Time Remaining Outrageously Inaccurate

For me, the problem resolved when I backed up my home directories and
re-installed Ubuntu with the latest ISO. The problem started with the
update to Hardy Heron. It was never resolved with any subsequent
patches. But it seemed to have been resolved since it works with a
fresh install. It is kind of weird because it reminds me more of a
Windows kind of problem/solution and not something typical of what
Ubuntu has become.

On Fri, Oct 10, 2008 at 12:52 AM, kforum <email address hidden> wrote:
> i just wanted to say that on kubuntu 8.10 beta the kpowermanager works quite ok, and most of the times knows exactly how much is left.
> so maybe this is gnome specific issue. ;)
>
> --
> Laptop Battery Time Remaining Outrageously Inaccurate
> https://bugs.launchpad.net/bugs/120258
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in "gnome-power-manager" source package in Ubuntu: Confirmed
>
> Bug description:
> Ubuntu 7.04 Feisty Fawn
>
> Hardware is HP Pavilion DV1000 series (specific DV1588EA)
>
> Battery monitor when running on battery reports percentage of battery remaining correctly, but the corresponding remaining time is often fabulously wrong (and can swing between e.g a few minutes to tens of hours in the blink of an eye). /* What I wouldn't give for batteries that can last 14 hours between charges... */
>
> It looks for all the world like the underlying values are being held in storage classes which are too small or where value-wrapping is not being handled quite right...
>
> BTW UBUNTU is fantastic; I'm a convert! Keep up the good work!
>

--
Today we reconsecrate our country to long-cherished ideals in a
suddenly changed civilization. In every land there are always at work
forces that drive men apart and forces that draw men together. In our
personal ambitions we are individualists. But in our seeking for
economic and political progress as a nation, we all go up, or else we
all go down, as one people.

FDR, second inaugural address, 1937

Revision history for this message
Tormod Volden (tormodvolden) wrote :

gnome-power-manager keeps some (dis)charge history in ~/.gnome2/gnome-power-manager. If numbers look strange, try to delete this files (at best when gnome-power-manager is not running).

seekortry, when you backed up your home directories, did you also back up (and restore) the .gnome2 directory?

Revision history for this message
Cybah (jon-cybus) wrote :

I can confirm this on a pretty fresh install of Ubuntu 8.10 running on a Dell Inspiron 9400. The applet says that my battery has 358955 hours remaining (37.2%). See attached screenshot.

What's the best way to debug this, so I can help?

Revision history for this message
Tormod Volden (tormodvolden) wrote :

As suggested on https://wiki.ubuntu.com/DebuggingGNOMEPowerManager the output from running gnome-power-bugreport.sh can give some details about your battery and its recognition by HAL.

Revision history for this message
Cybah (jon-cybus) wrote :

Further information... I can't deterministically reproduce this bug. Sometimes the readings are accurate, sometimes wrong. I tried hibernate/resume, but the problem didn't reoccur. I tried a fresh boot recently and noticed a little while ago the incorrect readings while charging from AC. However, as I type this bug report, the readings have returned to normal.

Attached is Cybah-gnome-power-bugreport-normal.txt taken while readings are as expected.

Revision history for this message
Sesivany (jiri-eischmann) wrote :

I think the problem is that gnome-power-manager takes the value from the battery. For example LiOn batteries tend to report lower times if they were stressed by higher energy consumption for a short time. I think we will get more accurate values if gnome-power-manager calculates the remaining time from the remaining energy and the current consumption (or weighted average of consumption values for 5, 10, 15 minutes while lastest value has the highest weight).

Revision history for this message
The3DmaN (xthe3dmanx) wrote :

I am also having this same problem. Any Solution?

  Twistedfish wrote on 2008-07-31: (permalink)

Has anyone found a solution for this? I am having the same issue as seekortry"

"I have the same problem appear suddenly on my Dell 1420. The battery manager does not work correctly any longer. If I run the laptop on battery power, it will not charge after I plug it back in. Once plugged-in, it says I am fully charged at some percentage (which drops each time I unplug). If I reboot and go to to the bios, I can watch the battery charge as normal. I first thought it was a battery problem. Dell sent me a new battery. Same problem. I first noticed this defect about two weeks ago. So it may not be related to the original issue in this thread"

Revision history for this message
tzp (tzp) wrote :

The wrong charge time estimate bug is still present in 9.04 Jaunty, Power manager 2.24.2.
What is interesting, the Battery charge monitor (2.26.1) works fine, it gives realistic charge time estimate.
Power manager should do the same.

My laptop is a HP/Compaq 8510w.

Revision history for this message
stopie (stopie) wrote :

No charge/discharge times displayed at all - percentage remaining does stay reliable though
gconf editing *fix* had no effect for me : (
Bug is Karmic specific for me - had no issues in 9.04 - 9.10 is fresh install

Laptop is Dell Mini 9

Revision history for this message
kdemarest (kdemarest) wrote :

I get about 46 minutes from my 5200mAh battery. I charged it until the charge light indicated it was fully charged, then let the battery completely run down until the system powered off. Typing acpi at the command line doesn't report the % full accurately, but there is a problem with the battery capacity now (only getting 46 minutes), and I got the message that my battery capacity is at 41% and is broken or damaged. My problem isn't just with gnome-power-manager, it's with acpi.

Revision history for this message
kdemarest (kdemarest) wrote :

I'm running a toshiba u305-s7448.

Revision history for this message
kdemarest (kdemarest) wrote :

Just learned draining a L-ion battery completely will permanently damage the battery's capacity. I won't be purchasing a new battery until I can be certain that gnome-power-manager will provide the proper warnings/actions to prevent damage to a new battery. I have looked at the gnome-power-manager source code, but I'm currently not confident that it is getting the proper information from the /proc/acpi/battery/BAT*/info file to properly provide a warning or take action when the battery is at a critical charge state. Here is my battery's info.

present: yes
design capacity: 5200 mAh
last full capacity: 354 mAh
battery technology: rechargeable
design voltage: 12597 mV
design capacity warning: 300 mAh
design capacity low: 200 mAh
capacity granularity 1: 32 mAh
capacity granularity 2: 32 mAh
model number: NS2P3SZNJ5WR
serial number: 17249
battery type: LION
OEM info: SANYO

I'm currently working on a perl script to see if I can get the functionality I need in order to insure my next battery stays fully functional. Here's a paste of the script if you are interested in utilizing it/updating it for your needs. http://paste.ubuntu.com/340361/

Revision history for this message
llawwehttam (llawwehttam) wrote :

I have just installed 9.10 karmic and have the bug too. Anyone found a fix yet?

Revision history for this message
kdemarest (kdemarest) wrote : Re: [Bug 120258] Re: Laptop Battery Time Remaining Outrageously Inaccurate

I haven't found a fix. Closest thing would be a few perl scripts that I
came across and have tried running/modifying. But they aren't a fix, at
least I wouldn't consider them one.

On Sun, Dec 27, 2009 at 6:03 AM, llawwehttam <email address hidden> wrote:

> I have just installed 9.10 karmic and have the bug too. Anyone found a
> fix yet?
>
> --
> Laptop Battery Time Remaining Outrageously Inaccurate
> https://bugs.launchpad.net/bugs/120258
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “gnome-power-manager” package in Ubuntu: Confirmed
>
> Bug description:
> Ubuntu 7.04 Feisty Fawn
>
> Hardware is HP Pavilion DV1000 series (specific DV1588EA)
>
> Battery monitor when running on battery reports percentage of battery
> remaining correctly, but the corresponding remaining time is often
> fabulously wrong (and can swing between e.g a few minutes to tens of hours
> in the blink of an eye). /* What I wouldn't give for batteries that can last
> 14 hours between charges... */
>
> It looks for all the world like the underlying values are being held in
> storage classes which are too small or where value-wrapping is not being
> handled quite right...
>
> BTW UBUNTU is fantastic; I'm a convert! Keep up the good work!
>
> To unsubscribe from this bug, go to:
>
> https://bugs.launchpad.net/ubuntu/+source/gnome-power-manager/+bug/120258/+subscribe
>

Revision history for this message
forsakenpariah (forsakenpariah) wrote :

Same problem with Karmic amd64 on my Inspiron 1501. The remaining time is usually 3 - 24 hours when unplugging and almost always says critical or below critical level when plugging in, often causing the computer to hibernate, though my percentage remaining rarely drops below 75%.

Revision history for this message
David Tombs (dgtombs) wrote :

Could someone with the crazy-varying estimates please attach different logs of "devkit-power --dump", run when the time remaining is different?

For example:

1h 15m : log it
0h 15s: log it
6h: log it

About three logs should suffice. This will determine whether the error is in g-p-m or in the underlying system software.

Changed in gnome-power-manager (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
David Tombs (dgtombs) wrote :

Oh, and please tell us what percentage and time remaining g-p-m was reporting when you took each dump as well. Thanks!

Changed in gnome-power-manager (Ubuntu):
status: Incomplete → In Progress
Revision history for this message
David Tombs (dgtombs) wrote :

Hi Martin, please provide explanations of status changes. Thanks.

https://wiki.ubuntu.com/Bugs/Status

Changed in gnome-power-manager (Ubuntu):
status: In Progress → Incomplete
Revision history for this message
supereworldshop@gmail.com (supereworldshop) wrote :
Revision history for this message
Antti Kaihola (akaihola) wrote :

When unplugging my Dell Mini 9, often I get a message which tells a correct charge percentage (e.g. 75%) but estimates remaining time at 1 minute. The laptop then hibernates (and freezes completely because of the sleep/hibernate-with-SD-card-mounted bug).

Revision history for this message
Antti Kaihola (akaihola) wrote :

Oh, and this is Lucid, updated today.

Revision history for this message
Guillermo Villafuerte (strongville94) wrote :

I have this problem with HP 2133 Mini-Note PC:

When connected to AC power, power-manager reports draining time is about 2 hours, but when I disconnect from AC, it suspends inmediately saying that battery will last 2 minutes (with 100% loaded!). Could it be a medition error? (calculating 2 hours like 2 minutes or vice versa?)

Revision history for this message
Guillermo Villafuerte (strongville94) wrote :

Oh, I forgot it: I have Lucid Beta 2 from Live CD

Revision history for this message
Ketil Wendelbo Aanensen (ketilwaa-deactivatedaccount) wrote :

This problem is still very annoying to me on Lucid. Unplugging the power throws a window that tells me: "Laptop battery critcally low - Computer will suspend very soon unless it is plugged in". Clicking OK or Cancel results in nothing except the window closing.
However, I tried out battery-status: https://launchpad.net/battery-status If I use that, my computer will suspend itself every time I unplug the power.
This bug has now lasted across several versions of Ubuntu with a high importance. Is there anything I can do to get this from "Incomplete" to something else?

Revision history for this message
Ketil Wendelbo Aanensen (ketilwaa-deactivatedaccount) wrote :

Scratch my last comment. With the normal battery icon in indicator-applet, clicking OK after I pull out the cable suspends the computer, so I need to turn off automatic hibernation in the power settings.

Revision history for this message
Ketil Wendelbo Aanensen (ketilwaa-deactivatedaccount) wrote :

Sorry about spamming this bug, but I can't even turn off suspend/hibernate/shutdown from the battery preferences, so this is a really annoying usability issue (especially since hibernate/suspend has been severely broken for who knows how long on Ubuntu on my computer)

Changed in gnome-power:
status: Unknown → New
Revision history for this message
David Tombs (dgtombs) wrote :

Ketil, to get it out of "Incomplete", could you post the information I requested in comment 39? In lucid replace "devkit-power" with "upower".

Revision history for this message
Ketil Wendelbo Aanensen (ketilwaa-deactivatedaccount) wrote :

@David Tombs: I would, but the command doesn't work. What package includes devkit-power?

Revision history for this message
David Tombs (dgtombs) wrote :

Ketil: Like I said, you'll need to use upower in Lucid. It's been renamed. So, "upower --dump".

Revision history for this message
Ketil Wendelbo Aanensen (ketilwaa-deactivatedaccount) wrote :

Here is the output.

First is fully charged on AC power, second is 1 sec after unplugging the cable (the laptop battery critically low warning has appeared), the third after I have clicked Cancel.

Revision history for this message
David Tombs (dgtombs) wrote :

Hi Ketil, thanks for the files but they don't actually contain any useful information for debugging the problem. As I requested in comment 39, could you please attach different dumps while discharging, each one when the time remaining shifts wildly? Like I said, take one when it says 15m remain, one when it later says 3h remain, etc.

Revision history for this message
Ketil Wendelbo Aanensen (ketilwaa-deactivatedaccount) wrote :

On my computer, trouble is, it doesn't vary wildly the way earlier described. The problem for me is as I described in comment #47 & #48

Revision history for this message
David Tombs (dgtombs) wrote :

Oh, well then you have a different problem, then. Please make a new report for yourself with "ubuntu-bug gnome-power-manager".

Revision history for this message
Ketil Wendelbo Aanensen (ketilwaa-deactivatedaccount) wrote :

@David Tombs: Yeah, you're right, I was thinking it was a symptom of the same problem. Found the bug already reported, and a workaround: https://bugs.launchpad.net/ubuntu/+source/gnome-power-manager/+bug/579069

Revision history for this message
Rob (rhbowman-deactivatedaccount) wrote :

I am using a 6715b with a high cap battery and it tells me only 1 hour remaining when at 99%

Changed in gnome-power:
importance: Unknown → Medium
Revision history for this message
Antti Kaihola (akaihola) wrote :

This problem still exists on my Dell Mini 9 with a freshly installed Ubuntu 10.10.

Battery percentage is reported correctly, but sometimes when I unplug the power cord, time remaining is 0:01 even though battery is over 90%.

Revision history for this message
Theatre-X (theatrex) wrote :

Exists with me too. I'm running Ubuntu 10.10 on a Toshiba Satellite L355

Linux Katormix 2.6.35-23-generic #36-Ubuntu SMP Tue Oct 26 17:03:18 UTC 2010 i686 GNU/Linux

Revision history for this message
Antti Kaihola (akaihola) wrote :

This work-around does solve the issue on my Dell Mini 9:

    $ gconftool-2 --type bool --set /apps/gnome-power-manager/general/use_time_for_policy false

Revision history for this message
kdemarest (kdemarest) wrote :

Could it be that this bug is related to this one: https://bugs.launchpad.net/ubuntu/+source/gnome-power-manager/+bug/481576 ?

Revision history for this message
Lans (thelans) wrote :

In Oneiric on my eeepc, when not plugged in, I have a message that tell me battery status is critically low ( even at 100% ) and the computer is put to sleep.

In Natty, the message was in the top right corner, and the computer wasn't put to sleep.

Revision history for this message
Aidan Fell (islandmonkey) wrote :

Is this STILL going on in Oneiric? What's taking so long? It comes up on my HP G61 laptop that there is 6 minutes remaining when there's actually still 90% left.

Changed in gnome-power-manager (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Aidan Fell (islandmonkey) wrote :

If so many people are being affected by this bug, then this bug shouldn't be incomplete. I'm marking this as confirmed.

Revision history for this message
J. Austin Rodriguez (jeanaustinr) wrote :

I'm encountering the same issue with this HP Pavilion dv3 notebook running Ubuntu 11.10 64-bit.

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

I'm pretty sure some of you will be fixed by this upstream commit:

commit b971b43c45bef9251e1d6389716b9fbe107802c7
Author: Leonardo Robol <email address hidden>
Date: Wed Oct 19 17:13:12 2011 +0100

    Use linear regression to get better predicted battery times

    For hardware that has no rate data we use the differences in charge over a time
    period to work out the effective rate. Using linear regression this estimation
    is much more realistic.

    To do this, introduce a simple circular buffer and use an index to calculate
    the rate on each update.

    Signed-off-by: Richard Hughes <email address hidden>

Revision history for this message
LaMont Jones (lamont) wrote :

This is especially annoying since unplugging the laptop from power results in "battery critically low, hibernating now!". with the 9 cell battery, OTOH, it just says things like "Laptop battery low. Approximately 7 minutes remaining (92%)" followed instants later by the indicator claiming 3+ hours remaining.

perhaps not being so quick to believe itself would be in order.

Revision history for this message
LaMont Jones (lamont) wrote :

The above is on oneiric, with unity (not that it should affect things).

Changed in gnome-settings-daemon (Ubuntu):
status: New → Confirmed
Revision history for this message
Benjamin Baker (benjamin-baker) wrote :

Is this an appropriate place to offer advice to people working on this bug? I see what's going wrong, at least on my computer, and was wondering if I could make a suggestion...

tags: added: also hp in mini netbook observed oneric running
tags: removed: also hp in mini netbook observed oneric running
Revision history for this message
David Tombs (dgtombs) wrote :

Hi Richard, thanks for the notice on that commit. You would say this is an issue with upower then?

---
Ubuntu Bug Squad volunteer triager
http://wiki.ubuntu.com/BugSquad

Changed in gnome-power-manager (Ubuntu):
assignee: nobody → ahmed mostafa farag (ahmed-farag1993)
Changed in gnome-settings-daemon (Ubuntu):
assignee: nobody → ahmed mostafa farag (ahmed-farag1993)
Changed in gnome-power:
status: New → Unknown
Revision history for this message
Jem (jemmeny) wrote :

This bug affects me (on Compaq-Presario-CQ41). It's annoying, because sometimes it will say time till battery is empty is 0min and then hibernate my computer even though my batter has >30% charge left. I can immediate turn my computer on again because I still have heaps of charge left.

Revision history for this message
Aidan Fell (islandmonkey) wrote :

I have noticed that this bug occurs in LXDE. Therefore, I have added upower to the list of affected packages.

Revision history for this message
Dmitry Diskin (diskin) wrote :

Does this post show some hint for this bug: http://forum.eeeuser.com/index.php?/topic/81732-battery-measurements-are-wrong-eeepc-900-ubuntu-1004/page__view__findpost__p__710079 ?

Quote:
This is a problem with the way the battery reports its charging state. The ubuntu applet (and the rest of the system, down to the kernel) expects the charge to be reported in mAh but instead the battery itself reports a percentage. If you look at state and info in /proc/acpi/battery/BAT0/, you'll find that a fully charged battery reports a charge of 100 mAh ... with a (reported) design capacity of 5200 mAh this works out to 1.9 %.

papukaija (papukaija)
Changed in gnome-power-manager (Ubuntu):
assignee: ahmed mostafa farag (ahmed-farag1993) → nobody
Changed in gnome-settings-daemon (Ubuntu):
assignee: ahmed mostafa farag (ahmed-farag1993) → nobody
Changed in gnome-power-manager (Ubuntu):
assignee: nobody → Meghana N M (meghananm95)
Changed in upower:
status: New → Opinion
Revision history for this message
Jak Mason (jackey-mason) wrote :

I'm running Ubuntu 18.04 on a 2015 Macbook Pro, 13" with a newish replacement battery that charages and runs down completely normally for it's specs. I only see a 18% charge when fully charged event though it will run for ours under load. Additionally, remaining life shows 0:40 minutes. Glad I this is logged here as the problem was being denied elsewhere. Thanks

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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