Bug 183612 - Gnome Power Manager continually pops-up "Battery Charged"
Gnome Power Manager continually pops-up "Battery Charged"
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: gnome-power-manager (Show other bugs)
5
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: John (J5) Palmieri
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-03-02 05:33 EST by Graham Hudspith
Modified: 2013-03-13 00:49 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-03-06 05:22:27 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Log file from HAL daemon (18.55 KB, application/x-gzip)
2006-03-02 06:27 EST, Graham Hudspith
no flags Details
Log file from GNOME Power Manager (3.46 KB, application/x-gzip)
2006-03-02 06:28 EST, Graham Hudspith
no flags Details

  None (edit)
Description Graham Hudspith 2006-03-02 05:33:38 EST
If I switch on my laptop BEFORE the mains-adaptor, when the system boots up and
I login to a gnome desktop, the gnome-power-manager notification thingy in the
panel will continually pop-up a "Battery Charged" (Your battery is now fully
charged) message every 30 seconds or so.

My laptop is a Dell D800, just over two years old. The battery is probably
getting a bit ropey by now, but still gives me about 2.5 hours of uptime on it's
own.

The version of gnome-power-manager is gnome-power-manager-2.13.92-1

I have found that if I then kill the gnome-power-management process and start
another one (actually, by selecting System -> Preferences -> More Preferences ->
Power Management from the menus), the new process does NOT pop-up the "Battery
Charged" notification (which is nice).
Comment 1 Richard Hughes 2006-03-02 05:37:54 EST
Can you get a verbose trace, and lshal -m output  when the notification is
flashing please?

See http://www.gnome.org/projects/gnome-power-manager/bugs.html for how to get
these.
Comment 2 Graham Hudspith 2006-03-02 06:25:59 EST
Richard - in between raising this bug and your comment, I have performed a yum
update.

When I boot up without power, the power-manager icon (does a tooltip when I
hover over it) states "Computer is running on battery power. Laptop battery 2
hours, 32 minutes remaining (96%)". **HOWEVER** when I plug the power cable in
(in an effort to get these notifications going for you again), the
gnome-power-manager does not realise this and thinks I am still running off
battery !!!

So I can't provide any tracing for you :-(

This mornings updates (among other, I can give the full list if you want) were:

gnome-power-manager.i386 2.13.92-1 -> 2.13.92-2

dbus.i386                FC5t3 -> 0.61-3
dbus-glib.i386           FC5t3 -> 0.61-3
dbus-x11.i386            FC5t3 -> 0.61-3
dbus-python.i386         FC5t3 -> 0.61-3
dbus-sharp.i386          FC5t3 -> 0.61-3

Here are the versions of the software I've currently got:

gnome-power-manager-2.13.92-2

dbus-0.61-3
dbus-glib-0.61-3
dbus-python-0.61-3
dbus-sharp-0.61-3
dbus-x11-0.61-3

hal-0.5.7-1
hal-cups-utils-0.5.5-1.2

kernel-2.6.15-1.1977_FC5
kernel-devel-2.6.15-1.1977_FC5

Raw ACPI Info (after I plugged in the power connector)
======================================================

/proc/acpi/battery/BAT0/alarm
alarm:                   7159 mWh
/proc/acpi/battery/BAT0/info
present:                 yes
design capacity:         71590 mWh
last full capacity:      71590 mWh
battery technology:      rechargeable
design voltage:          11100 mV
design capacity warning: 7159 mWh
design capacity low:     2169 mWh
capacity granularity 1:  715 mWh
capacity granularity 2:  715 mWh
model number:            DELL 0004P2
serial number:           10078
battery type:            LION
OEM info:                Sony
/proc/acpi/battery/BAT0/state
present:                 yes
capacity state:          ok
charging state:          charging
present rate:            32402 mW
remaining capacity:      66650 mWh
present voltage:         12762 mV
/proc/acpi/battery/BAT1/alarm
present:                 no
/proc/acpi/battery/BAT1/info
present:                 no
/proc/acpi/battery/BAT1/state
present:                 no

So, I've killed off the hald and gnome-power-manager processes and started them
in no-daemon verbose modes, both logging to a file. This is while the power
cable is unplugged. Then I'll plug the power cable back in, leave things for a
minute or so and then kill the processes again. I'll then attach the logs to
this bug report.
Comment 3 Graham Hudspith 2006-03-02 06:27:43 EST
Created attachment 125520 [details]
Log file from HAL daemon
Comment 4 Graham Hudspith 2006-03-02 06:28:48 EST
Created attachment 125521 [details]
Log file from GNOME Power Manager
Comment 5 Richard Hughes 2006-03-02 12:34:17 EST
I see you have two batteries, both of which "sort of" fully charged. Can you
reproduce this behaviour with only one battery installed?
Comment 6 Graham Hudspith 2006-03-02 15:22:55 EST
Sorry Richard, but I've only got one battery (and always have had!).

The Dell has room for two. I can withdraw the CD drive and replace it with a
second battery pack.

You can see that the second battery is "not present", above, by the lines:

/proc/acpi/battery/BAT1/alarm
present:                 no
/proc/acpi/battery/BAT1/info
present:                 no
/proc/acpi/battery/BAT1/state
present:                 no

After my last comment, kept the laptop on all day and the Gnome Power Manager
still insisted that the battery was discharging with 96% remaining :-)
Comment 7 Richard Hughes 2006-03-03 07:36:53 EST
2006-03-03  Richard Hughes  <richard@hughsie.com>
 * src/gpm-manager.c (battery_status_changed_primary): Remove the extra return
that sneaked in to the notification path. This caused people to get repeated
"battery is fully charged" messages if thier hardware was a little wonky.	Should
fix lp:32650 and rh:183612

Redhat also need to use the dbus 0.61 patch to g-p-m in rawhide (if it's going
to work correctly), as the dbus glib api has changed. Yay.

I'll push the g-p-m dbus-glib patch upstream now.

Richard.
Comment 8 Richard Hughes 2006-03-03 07:55:23 EST
This is CVS. You *NEED* to use this patch if you want g-p-m to work on an
freshly updated rawhide system.

2006-03-03  Richard Hughes  <richard@hughsie.com>
 * configure.in: Get the DBUS version, as now we have do stuff differently
depending on whether we are using dbus 0.60 or dbus 0.61. Yay. I love API
breakages. Sjoerd Simons found the bug, did the research, found the solution,
and wrote a patch to fix, for which I thank him greatly:

In dbus <= 0.60 dbus struct weren't really typed from dbus-glib's pov. In dbus
>= 0.61 they are, so when defining a signal you need to be more precise then before.

 * src/gpm-hal-monitor.c (watch_device_connect_property_modified): get the
correct struct type if we are using >= DBUS 0.61.

Richard.
Comment 9 Graham Hudspith 2006-03-06 05:12:20 EST
After today's yum updates:

gnome-power-manager-2.13.93-1

hal-0.5.7-3

kernel-2.6.15-1.2009.4.2_FC5
kernel-devel-2.6.15-1.2009.4.2_FC5

everything seems to work fine.

I can reboot without a power lead and g-p-m reports the remaining battery time -
and this time-remaining changes over time.

I can then re-plug-in the power lead and g-p-m updates to show the
time-until-charged and this value also changes over time.

Finally, when fully recharged, I get only one notification message.

Great work Richard and Sjoerd!
Comment 10 Richard Hughes 2006-03-06 05:22:27 EST
Nice one!

Note You need to log in before you can comment on or make changes to this bug.