GNOME Bugzilla – Bug 338281
Gnome-Power-Manager repeatedly tells me the battery is charged
Last modified: 2006-04-21 16:07:35 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:
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.
Created attachment 63419 [details] log
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.
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.
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.
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)
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.
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.
*** Bug 337865 has been marked as a duplicate of this bug. ***
*** Bug 335612 has been marked as a duplicate of this bug. ***
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 :)
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.
Your battery is now fully charged. Your battery is now fully charged. Your battery is now fully charged.
Johnny, have you tried the patch?
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.
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.
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.
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?
(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.