After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 338281 - Gnome-Power-Manager repeatedly tells me the battery is charged
Gnome-Power-Manager repeatedly tells me the battery is charged
Status: RESOLVED FIXED
Product: gnome-power-manager
Classification: Deprecated
Component: gnome-power-manager
2.14.x
Other All
: Normal normal
: ---
Assigned To: GNOME Power Manager Maintainer(s)
GNOME Power Manager Maintainer(s)
: 335612 337865 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-04-13 00:52 UTC by Thomas M. Hinkle
Modified: 2006-04-21 16:07 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
log (76.41 KB, text/plain)
2006-04-14 01:43 UTC, Thomas M. Hinkle
  Details
patch that should fix the problem. (2.80 KB, patch)
2006-04-15 08:16 UTC, Richard Hughes
none Details | Review

Description Thomas M. Hinkle 2006-04-13 00:52:32 UTC
Please describe the problem:
When my laptop is plugged in and running, gnome-power-manager repeatedly tells
me the battery is 100% charged. Looking at preferences reveals no way to turn
off the notification, so I have to deal with intermittent notifications. This
isn't happening every few seconds or anything -- it's more on a scale of minutes
to tens of minutes -- but it would be nice if gnome-power-manager noticed that
the power had never dipped substantially below 100% and so it didn't need to
notify me again.

Obligatory acpi info follows:
root@hydrophax:~# for i in /proc/acpi/battery/*/*; do echo $i; cat $i; done
/proc/acpi/battery/BAT0/alarm
alarm:                   unsupported
/proc/acpi/battery/BAT0/info
present:                 yes
design capacity:         6000 mAh
last full capacity:      8128 mAh
battery technology:      rechargeable
design voltage:          14800 mV
design capacity warning: 412 mAh
design capacity low:     248 mAh
capacity granularity 1:  10 mAh
capacity granularity 2:  25 mAh
model number:            JM-12
serial number:           2168913098
battery type:            LION
OEM info:                Hewlett-Packard
/proc/acpi/battery/BAT0/state
present:                 yes
capacity state:          ok
charging state:          charged
present rate:            unknown
remaining capacity:      8128 mAh
present voltage:         12503 mV
root@hydrophax:~#


Steps to reproduce:
1. 
2. 
3. 


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Richard Hughes 2006-04-13 08:53:29 UTC
Thanks for the bug. Can you please attach the *complete* debug trace from:

gnome-power-manager --no-daemon --verbose

(you can stop it after you've got a couple of repeat warnings) and I'll see what's going wrong. Thanks.

Richard.
Comment 2 Thomas M. Hinkle 2006-04-14 01:43:14 UTC
Created attachment 63419 [details]
log
Comment 3 Richard Hughes 2006-04-14 08:35:29 UTC
Thanks for the trace. You have a really odd battery. Two things:

* When you start getting the repeated notifications, can you run lshal -m for a couple of iterations please.
* Are you able to compile from CVS or try a patch against 2.14.0?

Thanks,

Richard.
Comment 4 Thomas M. Hinkle 2006-04-14 10:49:57 UTC
I'll give this a go as soon as I get a chance. I can pull from CVS and try compiling, but I don't have a bleeding-edge jhbuild set-up (just the bleeding edge provided in ubuntu dapper). But if compiling the CVS code doesn't require compiling lots of dependencies, I can definitely give it a go.
Comment 5 Thomas M. Hinkle 2006-04-14 20:18:00 UTC
tom@hydrophax:~$ lshal -m

Start monitoring devicelist:
-------------------------------------------------
acpi_BAT0 property battery.charge_level.last_full = 101258624 (0x6091580)
acpi_BAT0 property battery.charge_level.current = 100859968 (0x6030040)
acpi_BAT0 property battery.voltage.current = 12458 (0x30aa)
acpi_BAT0 property battery.remaining_time = 6 (0x6) (new)
acpi_BAT0 property battery.charge_level.last_full = 101583744 (0x60e0b80)
acpi_BAT0 property battery.charge_level.current = 101183808 (0x607f140)
acpi_BAT0 property battery.voltage.current = 12498 (0x30d2)
acpi_BAT0 property battery.rechargeable.is_charging = true
acpi_BAT0 property battery.charge_level.percentage = 100 (0x64)
acpi_BAT0 property battery.remaining_time removed
acpi_BAT0 property battery.charge_level.current = 101583744 (0x60e0b80)
acpi_BAT0 property battery.reporting.current = 8128 (0x1fc0)
acpi_BAT0 property battery.rechargeable.is_charging = false
acpi_BAT0 property battery.charge_level.last_full = 101591872 (0x60e2b40)
acpi_BAT0 property battery.charge_level.current = 101591872 (0x60e2b40)
acpi_BAT0 property battery.voltage.current = 12499 (0x30d3)
acpi_BAT0 property battery.charge_level.last_full = 101583744 (0x60e0b80)
acpi_BAT0 property battery.charge_level.current = 101583744 (0x60e0b80)
acpi_BAT0 property battery.voltage.current = 12498 (0x30d2)

This brought it through two iterations or so. The behavior's a bit funky -- right now, for example, I'm still running everything but no longer getting the power notifications.
Comment 6 Toni Lampela 2006-04-15 00:13:44 UTC
I have the same problem:

donza@uniikki:~$ for i in /proc/acpi/battery/*/*; do echo $i; cat $i; done
/proc/acpi/battery/BAT0/alarm
alarm:                   unsupported
/proc/acpi/battery/BAT0/info
present:                 yes
design capacity:         6000 mAh
last full capacity:      3360 mAh
battery technology:      rechargeable
design voltage:          14800 mV
design capacity warning: 250 mAh
design capacity low:     150 mAh
capacity granularity 1:  10 mAh
capacity granularity 2:  25 mAh
model number:            JM-6
serial number:           0108712614
battery type:            LION
OEM info:                Hewlett-Packard
/proc/acpi/battery/BAT0/state
present:                 yes
capacity state:          ok
charging state:          discharging
present rate:            0 mA
remaining capacity:      3360 mAh
present voltage:         12488 mV


donza@uniikki:~$ lshal -m

Start monitoring devicelist:
-------------------------------------------------
acpi_BAT0 property battery.charge_level.last_full = 41966400 (0x2805b40)
acpi_BAT0 property battery.charge_level.current = 41966400 (0x2805b40)
acpi_BAT0 property battery.voltage.current = 12490 (0x30ca)
acpi_BAT0 property battery.charge_level.last_full = 41963040 (0x2804e20)
acpi_BAT0 property battery.charge_level.current = 41963040 (0x2804e20)
acpi_BAT0 property battery.voltage.current = 12489 (0x30c9)
acpi_BAT0 property battery.charge_level.last_full = 41959680 (0x2804100)
acpi_BAT0 property battery.charge_level.current = 41959680 (0x2804100)
acpi_BAT0 property battery.voltage.current = 12488 (0x30c8)
acpi_BAT0 property battery.remaining_time = 187350 (0x2dbd6) (new)
acpi_BAT0 property battery.charge_level.last_full = 41966400 (0x2805b40)
acpi_BAT0 property battery.charge_level.current = 41966400 (0x2805b40)
acpi_BAT0 property battery.voltage.current = 12490 (0x30ca)
acpi_BAT0 property battery.remaining_time removed
acpi_BAT0 property battery.charge_level.last_full = 41963040 (0x2804e20)
acpi_BAT0 property battery.charge_level.current = 41963040 (0x2804e20)
acpi_BAT0 property battery.voltage.current = 12489 (0x30c9)
acpi_BAT0 property battery.charge_level.last_full = 41966400 (0x2805b40)
acpi_BAT0 property battery.charge_level.current = 41966400 (0x2805b40)
acpi_BAT0 property battery.voltage.current = 12490 (0x30ca)
acpi_BAT0 property battery.charge_level.last_full = 41963040 (0x2804e20)
acpi_BAT0 property battery.charge_level.current = 41963040 (0x2804e20)
acpi_BAT0 property battery.voltage.current = 12489 (0x30c9)
Comment 7 Richard Hughes 2006-04-15 07:47:39 UTC
Toni, your trace is really useful. Do you see how battery.charge_level.current 41966400 and then goes to 41963040 even when charged (i.e. it fluctuates up and down).
I think I need to put a check in g-p-m for this case, so that the percentage has to go from 99->100 for the notification, *and then back to 95* before we trigger on the 99->100 transition again.

I'll work on this today at some point.
Comment 8 Richard Hughes 2006-04-15 08:16:52 UTC
Created attachment 63542 [details] [review]
patch that should fix the problem.

Could you try this patch please. It's against the 2-14 branch, so should apply against 2.14.x, or you can try HEAD as I've committed it in that too. Many thanks.
Comment 9 Richard Hughes 2006-04-15 13:51:40 UTC
*** Bug 337865 has been marked as a duplicate of this bug. ***
Comment 10 Richard Hughes 2006-04-15 13:53:34 UTC
*** Bug 335612 has been marked as a duplicate of this bug. ***
Comment 11 Toni Lampela 2006-04-15 14:10:41 UTC
I tried to compile gnome-power-manager from CVS with your patch (I used "cvs diff -u > patchfile", is this correct?) but I seem to be caught in dependency mess. CVS version seems to need newer dbus-glib-1 than I can find from Ubuntu Dapper repos. If you can help me with this I can try to patch it. How can I apply patch to 2.14.0 sources? I'm very newbie with these things :) Yes, I notice the fluctuation. I was suspecting something like that. It's also strange that the charging state is discharging while I'm on AC power. Is that correct?

I'd be so glad if the patch fixes this. That notification can be so annoying :)
Comment 12 Richard Hughes 2006-04-15 14:35:20 UTC
CVS does need 0.61 which fixes loads of problems with 0.60. You can grab the CVS 2-14 branch (or the http://ftp.gnome.org/pub/GNOME/sources/gnome-power-manager/2.14/gnome-power-manager-2.14.1.tar.bz2 tarball would be easier) and apply the patch to that.
Comment 13 Johnny Proton 2006-04-17 22:21:36 UTC
Your battery is now fully charged.  Your battery is now fully charged.  Your battery is now fully charged.
Comment 14 Richard Hughes 2006-04-17 22:29:41 UTC
Johnny, have you tried the patch?
Comment 15 Johnny Proton 2006-04-17 23:20:55 UTC
No, I haven't tried the patch.  I'd love to but I don't know how to do it.  I'm really only comfortable with using yum and rpm to install/update packages.
Comment 16 Thomas M. Hinkle 2006-04-17 23:30:40 UTC
Patch appears to be have done the trick. Since this is a tad intermittent, I won't breathe entirely easy until 24 hours or so of use, but iirc unplugging and replugging before consistently generated repeat error messages and no longer does.
Comment 17 Richard Hughes 2006-04-20 08:41:48 UTC
Thomas, is the bug okay to close?

Johnny, the fix is in the 2-14 branch, and 2.14.2 will be released on the 29th May. If you want a more pressing update, I suggest you do a redhat bugzilla and ask them to pull this fix in from the 2-14 branch into a FC5 update.
Comment 18 Thomas M. Hinkle 2006-04-20 11:05:11 UTC
Bug is okay to close -- I haven't had the repeat announcement in days.

While I've got your attention, I have some other issues which I'll need to file new bugs for:

1. Reported time remaining varies wildly (I'm given estimates that suggest my battery only lasts for 10 minutes at some points and at other times I'm given estimates that suggests my battery lasts for 24 hours).

2. Sleep-on-idle appears not to work.

Before I file those bugs, I thought I'd check -- is it likely those issues are related to the weirdness with my battery you saw in the lshal output?
Comment 19 Richard Hughes 2006-04-21 16:07:35 UTC
(In reply to comment #18)
> 1. Reported time remaining varies wildly (I'm given estimates that suggest my
> battery only lasts for 10 minutes at some points and at other times I'm given
> estimates that suggests my battery lasts for 24 hours).

File a bug, bug if your battery is old/broken, don't expect decent data.

> 2. Sleep-on-idle appears not to work.

It should, again, file a bug if reqd.

Richard.