No icon is shown if started while charging, whatever the icon policy is

Bug #32665 reported by Mathieu Pillard
10
Affects Status Importance Assigned to Milestone
gnome-power-manager (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

I've set the notification area icon to "always show". However, if I start gnome-power-manager while my battery is not full and charging, the icon fails to show. Relevant part of the log:

get_stock_id] gpm-manager.c:248 (00:35:38): Getting stock icon for tray
[get_stock_id] gpm-manager.c:320 (00:35:38): no devices (dis)charging, so no icon will be displayed.
[tray_icon_update] gpm-manager.c:361 (00:35:38): Going to use stock id: (null)
[tray_icon_update] gpm-manager.c:382 (00:35:38): no icon will be displayed

I found this bug while testing the patch for malone bug 32644. However I've test with and without the patch and it didn't make any difference: to have the icon to show I had to unplug AC.

Revision history for this message
Mathieu Pillard (diox) wrote :

% apt-cache policy gnome-power-manager
gnome-power-manager:
  Installed: 2.13.91-0ubuntu2
  Candidate: 2.13.91-0ubuntu2
  Version table:
     2.13.91-0ubuntu2 0
        500 http://archive.ubuntu.com dapper/main Packages
 *** 2.13.91-0ubuntu2 0
        100 /var/lib/dpkg/status

Revision history for this message
Daniel Silverstone (dsilvers) wrote :

Are you *certain* that the icon policy was set to 'always' ?

The 'no devices (dis)charging' message is only ever displayed if icon policy is 'charge'

Revision history for this message
Mathieu Pillard (diox) wrote :

I was about to say that I am, but I checked again and it was set to "charge". Sorry about not noticing this, I'm certain I never changed the policy, so I assumed it was set to "always" and didn't check, my mistake.

Revision history for this message
Mathieu Pillard (diox) wrote :

Ok actually, it's still a bug: I was charging at that time, even if the log exerpt doesn't say so, so it should have displayed an icon. I'll post a more complete log.

Revision history for this message
Richard Hughes (richard-hughes) wrote :

>I was charging at that time, even if the log exerpt doesn't say so

Does lshal report the battery as charging?

Revision history for this message
Mathieu Pillard (diox) wrote :

I managed to reproduce this on my laptop using these simple instructions:

gnome-power-manager:
  Installed: 2.13.92-0ubuntu1

* set gnome-power-manager to display icon when (dis)charging.
* unplug AC
* kill gnome-power-manager
* plug AC back. battery should, and is charging
* start gnome-power-manager
* icon is not shown.

the gnome battery applet showes the battery as charging, and lshal reports the battery as charging as well:
* battery.rechargeable.is_discharging = false (bool)
* battery.rechargeable.is_charging = true (bool)

If I unplug the AC once more, but this time while gnome-power-manager is up, the notification is shown and icon appears (exhibiting bug , because I think the icon appears after the notification - but I'll add that to the other bug). And if I plug the AC back I do get the icon.

Bottom line: if battery is charging (and only charging, discharging does show the icon) before gnome-power-manager is launched, the icon doesn't appear.

Revision history for this message
Mathieu Pillard (diox) wrote : output of gnome-power-manager --no-daemon --verbose

Looks like g-p-m wasn't aware of the fact that my battery is charging. Which is funny since the percentage does go up:)

% lshal | grep charging
  battery.rechargeable.is_discharging = false (bool)
  battery.rechargeable.is_charging = true (bool)

Revision history for this message
Daniel Silverstone (dsilvers) wrote :

Can you please confirm if this behaviour persists in 2.13.92-0ubuntu1 ?

Revision history for this message
Mathieu Pillard (diox) wrote :

Yes, it does. See my comment before the verbose output attachement.

Revision history for this message
Jonathon Conte (thesicktwist) wrote :

I'm running Dapper Testing on an IBM T41 Thinkpad and I'm experiencing this problem as well. Gnome-Power-Manager appears to be functioning because the brightness of the screen changes automatically when the AC adapter is plugged-in or removed. However, no icon appears in the Notification Area applet whether I'm using the battery or AC adapter.

If I start the Gnome Power Manager configuration utility (System-->Preferences-->Power Management) then the icon appears as soon as the window opens and it remains visible after I close the window.

The gnome-power-manager package that I have installed is version 2.13.92+CVS20060302-0ubuntu1.

Revision history for this message
Zack Cerza (zcerza-deactivatedaccount) wrote :

With the latest uprgade to 2.14.0-1 (I rebooted), the icon doesn't show. The policy is set to 'always show'. My battery is fully charged.

charging state: charged

Opening gnome-power-preferences does not make the icon show up; toggling between 'never show' and 'always show' does.

Changed in gnome-power-manager:
status: Unconfirmed → Confirmed
Revision history for this message
Richard Hughes (richard-hughes) wrote :

Zack, when it gets in this "funny" state where the icon doesn't show when it should, can you get the output of gnome-power-manager --verbose --no-daemon please. Thanks.

Revision history for this message
Jason Lu (pinchaoit) wrote :

I am running dapper beta on an IBM Thinkpad T41 and have the exact symptom. The icon doesn't show up upon startup. If I go to System ==> Preference ==> Power Management and toggle between 'never show' and 'alway show', the icon shows up.

Here is the output after I ran
gnome-power-manager --verbose --no-daemon:

_IceTransOpen: Unable to Parse address

(gnome-power-manager:8760): GnomeUI-WARNING **: While connecting to session manager:
Could not open network socket.
[gpm_debug_init] gpm-debug.c:130 (22:11:03): Verbose debugging enabled
*** WARNING ***
[main] gpm-main.c:219 (22:11:03): Unable to determine the address of the message bus
GNOME Power Manager has encountered a non-critical warning.
Consult http://bugzilla.gnome.org/buglist.cgi?product=gnome-power-manager for any known issues or a possible fix.
Please file a bug with this complete message if not present

Revision history for this message
Mathieu Pillard (diox) wrote :

FWIW I have been unable to reproduce this bug lately, I don't know what update fixed it if its fixed, though.

Revision history for this message
Ted Gould (ted) wrote :

Last comment was 2006 with a fixed, so I'm marking this bug as fixed. Please reopen if it is still an issue.

Thanks for helping. Ted.

Changed in gnome-power-manager:
status: Confirmed → Fix Released
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.