Action on critical battery is not triggered - gnome-power-manager

Bug #481576 reported by nameiner
104
This bug affects 20 people
Affects Status Importance Assigned to Milestone
gnome-power-manager (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

Binary package hint: gnome-power-manager

System Info:
Hardware: HP dv4-1120us
OS: Ubuntu 9.10
Kernel: 2.6.31-14-generic
gpm-version: 2.28.1-0ubuntu1

What I expected to happen:
When the battery reaches critical level the laptop should hibernate like set up in the preferences.

What happened instead:
When the battery reaches critical level the laptop didn't hibernate. It keeps running until the battery is completely empty and than just switches off.

How to replicate:
Let the laptop run on battery till empty.

ProblemType: Bug
Architecture: amd64
Date: Thu Nov 12 16:10:34 2009
DistroRelease: Ubuntu 9.10
NonfreeKernelModules: wl
Package: gnome-power-manager 2.28.1-0ubuntu1
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
SourcePackage: gnome-power-manager
Uname: Linux 2.6.31-14-generic x86_64

Revision history for this message
nameiner (nameiner) wrote :
Revision history for this message
nameiner (nameiner) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

Can you please open a Terminal, do

  killall -9 gnome-power-manager
  gnome-power-manager --no-daemon --verbose > ~/gpm.log 2>&1

then let the battery time out (or at least go to something like 1%). After that, please attach gpm.log here. Thanks!

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

I did as you told me:

killall -9 gnome-power-manager
gnome-power-manager --no-daemon --verbose > ~/gpm.log 2>&1

This created an empty log file.
I let it run on battery until 2-3 minutes after the critical battery warning was shown.

Revision history for this message
Martin Pitt (pitti) wrote :

Hm, it shouldn't be empty any more after some seconds.. Is it still?

Revision history for this message
nameiner (nameiner) wrote :

I had it running for over an hour before my battery was drained. The file was still empty.
When I run

gnome-power-manager --verbose > ~/gpm.log 2>&1

it fills up pretty fast. I added that log yesterday already (see post #2).

Revision history for this message
Martin Pitt (pitti) wrote :

Ah, sorry; thanks!

Changed in gnome-power-manager (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Maciej Strzelecki (mstrzele) wrote :

In the previous bug report I wrote about the same problem. From what I noticed, nameiner also has the HP laptop (information about the battery), it can be a clue. My model is HP 6530b.

Revision history for this message
Maciej Strzelecki (mstrzele) wrote :

In the first minutes before the end of the battery, charge is over 2%, and then suddenly 0% what g-p-m is probably getting lost by. In gpm.log: - percentage zero, something's gone wrong.

Revision history for this message
nameiner (nameiner) wrote :

I can confirm Maciej's observation. After a short period of time on critical power it drops to 0%.

I also wonder if it could be something about the missing "time left" which g-p-m never shows on my laptop. Settings and thresholds for g-p-m in gconf-editor indicate that g-p-m is working based on that time. Which would mean it can't trigger the action if it doesn't know when to trigger it.
See attached screen shots.

Revision history for this message
nameiner (nameiner) wrote :
Revision history for this message
Maciej Strzelecki (mstrzele) wrote :

Changing percentage_action to 3 or greater and use_time_for_policy to false is a temporary solution for this bug.

gconftool-2 --type int --set /apps/gnome-power-manager/thresholds/percentage_action 3
gconftool-2 --type bool --set /apps/gnome-power-manager/general/use_time_for_policy false

In gpm-core.c on line 128 there is an error condition that checks percentage. I don't know what GPM policy is, but it's possible to omit checking this condition or additionally check what last correct level was.

PS Sorry for my weak English.

Revision history for this message
kdemarest (kdemarest) wrote :

I'm fairly certain that I've experienced this problem since Gutsy. I'm running Jaunty now and still have the problem. Incidentally, this bug should be considered critical. Apparently, draining a Li-on battery completely kills the battery (mine only has 9.8% of it's original capacity).

I've checked out the battery info, and I did find it interesting that battery info specifies low power and warning states based on the mAh remaining on the battery, not on a percentage.

I've been trying to read the source code from gnome-power-manager, specifically to see how the % battery is calculated (gpm-warning.c). I'm figuring it's getting the information from /proc/acpi/battery/BAT*/info and state, but I haven't been able to confirm this in the source. I'm thinking that the action should be done on the batteries low power spec (contained in /proc/acpi/battery/BAT*/info), not on the percentage currently calculated by gpm.

I have a Toshiba U305-S7448. I attached a file with my battery info.

Revision history for this message
Nick Steeves (nick-0) wrote :

I'm running Karmic, and am still experiencing this bug. I'll try bumping the time_action and time_critical values to more conservative settings, and will post an update soon. As I have an old battery, my Thinkpad's critical power level is around 5%. Hibernate should occur at 4%, or 3% at the absolute lowest. A time-based value seems better for a wider range of battery capacities, but the default 120 and 300 seconds are just too low.

Revision history for this message
Nick Steeves (nick-0) wrote :

P.S. When running gnome-power-manager in verbose mode, I get no output before hibernate doesn't occur and the system dies. I mounted my partition -o sync, and tail -f gpm.log in another tab, just to make sure I wouldn't miss anything.

Revision history for this message
cwwees (cwwees) wrote :

Kevin wrote above about loss of Li-Ion capacity by draining it. I took my (rather new) battery back for warrantee since capacity was so low. What I found is a problem in battery management on the laptop/software.

My battery powers the unit for 25-30 minutes. I believe that failure to hibernate is due to sudden collapse of power - the machine tries but runs out of juice. When the store ran the battery on their test equipment, it came back charged and ran for over 3 hours.

Something in the power management has written a value into the battery memory that isn't the correct capacity for this battery. The result is that the battery refuses to accept a charge. The symptom reported here may be generated by some other portion of power management.

If anyone can tell me how to reset the battery capacity, I'd like to know. This battery has much more capacity than I am getting.

Changed in gnome-power-manager (Ubuntu):
importance: Undecided → Low
Revision history for this message
bivanbi (balazs-lengyak) wrote :

My hardware is Lenovo s10-2, about 2 months old, battery in mint condition, Ubuntu 9.10 with latest updates applied.

Experience: I kept a close watch on Power Statistics -> Detail. My remaining time, percentage etc displayed correctly all the time. When percentage and remaining time reached 0, the netbook run for another 10 minutes before suddenly powering off. So at least battery information is correctly interpreted by Ubuntu.

Revision history for this message
bivanbi (balazs-lengyak) wrote :

update: out of curiosity, set threshold levels of _critical and _action to 93 and 92 percent respectively. (battery fully charged)

Killed and started gnome-power-manager --no-daemon --verbose and waited.

I when reached 92%, another minute passed, when I received a warning that it is going to hibernate NOW. And indeed it did.

gnome-power-manager produced NO output on stdout or stderr, except for this line _after_ waking up from hibernate:
(gnome-power-manager:3975): devkit-power-gobject-DEBUG: DBUS timed out, but recovering

So at least I know that I was able to catch messages from gpm.

Revision history for this message
Konrad (konradmb) wrote :

This bug also exist in lucid. I attached gpm.log from acer aspire one d250. On last minutes battery is at 3% and suddenly stays at 0%. Discharging to 0% can damage battery!

Revision history for this message
Samuel Kogler (daasdingo) wrote :

I can confirm this bug on a
 - Toshiba Satellite L300 26K
 - with ubuntu 9.10 all updates applied

Percentage is displayed correctly(+ remaining time),
I tried:

Revision history for this message
Samuel Kogler (daasdingo) wrote :

accidentally hit hotkey for post...

anyways, i tried:
- changing the gconf values to percentage
- altering percentages

still, I never get a notification or a sound if percentage
is at LOW/CRITICAL/ACTION, and at 0% the notebook just dies, no shutdown no nothing.

May I ask why the priority of this bug is LOW? This can damage hardware seriously, and open work is just gone...

Revision history for this message
elq (eva-lotte) wrote :

Confirmed for lucid on HP Pavilion dv3550eg.

On previous installation (ubuntu 8.10) at least acoustic warning at low battery worked. I don't remember if it hibernated.

I'd also vote for I higher priority.

Revision history for this message
gnimsh (loochyj) wrote :

I am running 10.04 32bit and this bug definitely affects me as well.

Revision history for this message
Matthew Kerle (mattkerle) wrote :

9.10 amd64 (Dell XPS 1645 laptop) and I get that as well.

Revision history for this message
elq (eva-lotte) wrote :

Some additional information to my last post:

I figured out that the solution suggest by Maciej Strzelecki, setting use_time_for_policy to false, worked in my case (HP dv3550eg, ubuntu 10.04 64-bit).

!! It is important that you either restart the system or kill gnome-power-manager and start it again after changing any settings (see post by bivanbi) Otherwise it won't accept the changes. !!

If you are curious and want to see all options available for gpm, run gconf-editor and look for gnome-power-manager in "apps". A short description for each parameter is available.

Good luck to make your system shutdown/suspend properly.

Revision history for this message
mcon (mr-mcon) wrote :

Im running Lucid Lynx (i386) on a Acer Aspire One D150, (upgraded to 2gb RAM) i can confirm that hibernate function works for me if I have the value percentage_action on 5 or higher, then the system hibernates automatically.

I also tried lower values than 5 and then nothing happened until battery totally died.

In my case it seems that my battery needs to have at least 5% (actually 4%, because the action starts when its not 5% anymore) to be able to complete the hibernate. Because when computer then is turned off i cannot start it again without the AC connected. Also tested to just connect AC during startup, then unplug, when I did that the computer died immediately. Conclusion: the battery really is empty.

Therefore in my case this isn't a bug it,s just needs the correct action value. Maybe its the same for some of you others.

Just a hint to try. Good luck

Revision history for this message
kdemarest (kdemarest) wrote : Re: [Bug 481576] Re: Action on critical battery is not triggered - gnome-power-manager

I'm curious to know where gnome-power-manager gets the battery info and
state information. If it's getting battery information from
/proc/acpi/battery/BAT*/info, we can call this $info, then why does it need
a percentage? the info file has the mAh when the battery is low and when it
is critical. so why would the percentage matter? if i do cat
/proc/acpi/battery/BAT*/state, let's call this $state, it shows the current
mAh of my battery. so if $state is below the $info.lowbattery or
$info.criticalbattery then action should be taken. it seems to me that the
percentage values should be made irrelevant. i mean, does the info file not
always contain the critical and low battery mAh on all systems?

seidos

On Sun, Sep 19, 2010 at 9:11 AM, mcon <email address hidden> wrote:

> Im running Lucid Lynx (i386) on a Acer Aspire One D150, (upgraded to 2gb
> RAM) i can confirm that hibernate function works for me if I have the
> value percentage_action on 5 or higher, then the system hibernates
> automatically.
>
> I also tried lower values than 5 and then nothing happened until battery
> totally died.
>
> In my case it seems that my battery needs to have at least 5% (actually
> 4%, because the action starts when its not 5% anymore) to be able to
> complete the hibernate. Because when computer then is turned off i
> cannot start it again without the AC connected. Also tested to just
> connect AC during startup, then unplug, when I did that the computer
> died immediately. Conclusion: the battery really is empty.
>
> Therefore in my case this isn't a bug it,s just needs the correct action
> value. Maybe its the same for some of you others.
>
> Just a hint to try. Good luck
>
> --
> Action on critical battery is not triggered - gnome-power-manager
> https://bugs.launchpad.net/bugs/481576
> 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:
> Binary package hint: gnome-power-manager
>
> System Info:
> Hardware: HP dv4-1120us
> OS: Ubuntu 9.10
> Kernel: 2.6.31-14-generic
> gpm-version: 2.28.1-0ubuntu1
>
> What I expected to happen:
> When the battery reaches critical level the laptop should hibernate like
> set up in the preferences.
>
> What happened instead:
> When the battery reaches critical level the laptop didn't hibernate. It
> keeps running until the battery is completely empty and than just switches
> off.
>
> How to replicate:
> Let the laptop run on battery till empty.
>
> ProblemType: Bug
> Architecture: amd64
> Date: Thu Nov 12 16:10:34 2009
> DistroRelease: Ubuntu 9.10
> NonfreeKernelModules: wl
> Package: gnome-power-manager 2.28.1-0ubuntu1
> ProcEnviron:
> LANG=en_US.UTF-8
> SHELL=/bin/bash
> ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
> SourcePackage: gnome-power-manager
> Uname: Linux 2.6.31-14-generic x86_64
>
> To unsubscribe from this bug, go to:
>
> https://bugs.launchpad.net/ubuntu/+source/gnome-power-manager/+bug/481576/+subscribe
>

Revision history for this message
Rüdiger Kupper (ruediger.kupper) wrote :

Confirming the problem on a Thinkpad T61.

Revision history for this message
Rüdiger Kupper (ruediger.kupper) wrote :

Sorry, I should have liked to add: I didn't even receive the critical warning, altough power history shows that critical threshold was passed 7 minutes before the laptop switched off.

Revision history for this message
kdemarest (kdemarest) wrote :

wanted to add that i am running 10.04 now, and the problem is still there. if i unplug the notebook from AC, and battery level is at 197mAh (according to /proc/acpi/battery/BAT1/state), no message is displayed. according to /proc/acpi/battery/BAT1/info low battery warning should happen at 300mAh, and critical is at 200mAh.

how does gnome power manager calculate it?

Revision history for this message
Nick Steeves (nick-0) wrote :

confirmed on a Thinkpad X32 and a Samsung N150, both with Ubuntu 10.04.

Revision history for this message
spbrereton (simon-brereton) wrote :

Also confirmed on the MacBookPro - 2.1

I really don't see how this can claim to be a production ready OS if it can't at least tell me my battery is about to die. I don't usually run it with a battery, but that's to save my battery. However, this bug makes me very reluctant to use my laptop as a laptop because there's no telling when the battery will give up and work will be lost.

Revision history for this message
Khalil Ibrahim (khalilibrahim-com) wrote :

Confirmed on HP Pavilion, with Mint Lisa 12

it is not displaying any message , and takes no action on critical battery action, whether use-time-for-policy is true or false (i.e. whether using percentage or time policy)

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.