Bug 183612 - Gnome Power Manager continually pops-up "Battery Charged"
Summary: Gnome Power Manager continually pops-up "Battery Charged"
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-power-manager
Version: 5
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: John (J5) Palmieri
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-03-02 10:33 UTC by Graham Hudspith
Modified: 2013-03-13 04:49 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-03-06 10:22:27 UTC
Type: ---
Embargoed:


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

Description Graham Hudspith 2006-03-02 10:33:38 UTC
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 10:37:54 UTC
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 11:25:59 UTC
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 11:27:43 UTC
Created attachment 125520 [details]
Log file from HAL daemon

Comment 4 Graham Hudspith 2006-03-02 11:28:48 UTC
Created attachment 125521 [details]
Log file from GNOME Power Manager

Comment 5 Richard Hughes 2006-03-02 17:34:17 UTC
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 20:22:55 UTC
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 12:36:53 UTC
2006-03-03  Richard Hughes  <richard>
 * 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 12:55:23 UTC
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>
 * 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 10:12:20 UTC
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 10:22:27 UTC
Nice one!


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