Application Indicator causes Gnome Power fallback icon to show/hide on each refresh

Bug #529052 reported by Bernhard on 2010-02-27
314
This bug affects 67 people
Affects Status Importance Assigned to Milestone
Application Indicators
Fix Released
High
Kalle Valo
indicator-application (Ubuntu)
High
Yomar Ruiz
Lucid
High
Kalle Valo

Bug Description

Binary package hint: gnome-panel

When running on battery, my lucid battery applet shows strange behavior. It comes and goes in the notification area. It also uses way more space than it should. See the attached screenshot.

w1zard says:
"Using dbus-monitor, the following errors are relevant;

When the icon is removed:

signal sender=:1.3 -> dest=(null destination) serial=436 path=/org/ayatana/NotificationItem/gnome_power_manager/Menu; interface=org.ayatana.dbusmenu; member=LayoutUpdated
   uint32 196
   int32 0

And when the icon restores:

signal sender=:1.3 -> dest=(null destination) serial=434 path=/org/ayatana/NotificationItem/gnome_power_manager/Menu; interface=org.ayatana.dbusmenu; member=LayoutUpdated
   uint32 195
   int32 0"

ProblemType: Bug
Architecture: amd64
Date: Sat Feb 27 16:24:50 2010
DistroRelease: Ubuntu 10.04
InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Alpha amd64 (20100224.1)
Package: gnome-panel 1:2.29.91-0ubuntu1
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.utf8
 SHELL=/bin/zsh
ProcVersionSignature: Ubuntu 2.6.32-14.20-generic
SourcePackage: gnome-panel
Uname: Linux 2.6.32-14-generic x86_64

Related branches

Bernhard (b.a.koenig) wrote :
Bernhard (b.a.koenig) wrote :

Actually, it keeps moving to the left.

Chris Coulson (chrisccoulson) wrote :

Thank you for your bug report. Are you using the indicator applet there, or just the standard notification icon? What version of libappindicator0 are you using (apt-cache policy libappindicator0).

What do you mean when you say the icon comes and goes? Has this behaviour changed recently? Under what conditions does it happen? Is your problem only with the extra space used?

affects: gnome-panel (Ubuntu) → gnome-power-manager (Ubuntu)
Changed in gnome-power-manager (Ubuntu):
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
importance: Undecided → Low
status: New → Incomplete
Bernhard (b.a.koenig) wrote :

Yes, I am not using indicator applet, this could be part of the problem. If I add indicator applet, then battery is part of that applet. My libappindicator0 is 0.0.14-0ubuntu1.

By comes and goes I mean that it shows up and vanishes in cycles of about 1min. This and the extra space is the problem. I don't know if the behavior has recently changes cause I just upgraded to lucid yesterday.

Bernhard (b.a.koenig) wrote :

Btw, it probly shows up when it updates and then vanishes after a couple of seconds and additionally moves to the left.

Chris Coulson (chrisccoulson) wrote :

Have you restarted your session since updating to 0.0.14-0ubuntu1 of libappindicator0? The space issue is already fixed there. I'm not sure about the other issue of the icon coming and going though

affects: gnome-power-manager (Ubuntu) → indicator-application (Ubuntu)
Omer Akram (om26er) wrote :

Please update to indicator-application - 0.0.14-0ubuntu1 that might solve the problem.

Bernhard (b.a.koenig) wrote :

OK, just restarted and it's still moving left and "coming and going". Here what I get from xsession-errors:

(gnome-power-manager:1896): GLib-GObject-WARNING **: invalid cast from `GtkStatu
sIcon' to `GtkWidget'

(gnome-power-manager:1896): Gtk-CRITICAL **: gtk_widget_hide: assertion `GTK_IS_
WIDGET (widget)' failed

Bernhard (b.a.koenig) wrote :

This is not fixed for me in 0.0.14-0ubuntu1.

Bernhard (b.a.koenig) wrote :

And I don't think the duplicate is correct since I am not having crashes, just the icon vanishing.

Sense Egbert Hofstede (sense) wrote :

Thank you for providing the XSession errors, they're most helpful. I'm reassigning this to gnome-power-manager since the bug seems to be in the Indicator Application usage of g-p-m and assigning it to Martin Pitt since he wrote the code for this.

affects: indicator-application (Ubuntu) → gnome-power-manager (Ubuntu)
Changed in gnome-power-manager (Ubuntu):
assignee: Ubuntu Desktop Bugs (desktop-bugs) → Martin Pitt (pitti)
importance: Low → Medium
Chris Coulson (chrisccoulson) wrote :

Martin didn't right the patch for this - that was Jan Arne Petersen.

The bug this was linked to has a misleading title - the actual issue the reporter was experiencing was the gap in the notification area increasing in size each time the icon reappeared, but the reporter of that bug kept mixing multiple issues (including a "crash" that he never actually experienced. I did ask the reporter to update the title/description with the real issue). That appears to be the same issue you're experiencing as well - please confirm this.

If that is the case, then this is an indicator-application bug (as the fallback to GtkStatusIcon for people not using the indicator applet happens internally to libappindicator - gnome-power-manager has no control over that, and it's not a gpm bug).

The GLib critical and warning message there are a red herring.

Are you describing the icon coming and going as a bug too? If so, please describe the conditions this occurs under, and did this behaviour change recently I can't recreate this issue, and without further information it is difficult to do anything else with it.

Changed in gnome-power-manager (Ubuntu):
assignee: Martin Pitt (pitti) → nobody
Chris Coulson (chrisccoulson) wrote :

Both of those error messages occur internally to libappindicator because the code assumes GtkStatusIcon is a subclass of GtkWidget, which is not the case. This is the bit which fails (it causes those messages AND the extra space to appear in the notification area):

gtk_widget_hide(GTK_WIDGET(status_icon));

This should be:

gtk_status_icon_set_visible (status_icon, FALSE);

Sense Egbert Hofstede (sense) wrote :

Chris, if you could, please fix this in a personal branch and file a merge request. :)

Chris Coulson (chrisccoulson) wrote :

All of the symptoms here are due to libappindicator (including the disappearing icon)

affects: gnome-power-manager (Ubuntu) → indicator-application (Ubuntu)
Changed in indicator-application (Ubuntu):
status: Incomplete → Triaged
pheonix7117 (pheonix7117) wrote :

This is happening to me as well. Is there a fix/workaround available? I'm also using gnome-shell, if that matters. It worked not less than a week ago, so an update must have caused the issue I'm guessing....

Bernhard (b.a.koenig) wrote :

@Chris: let me know if you need any further info on this bug. As for your question of the "coming and going", it just happens automatically, in cycles of about 1-2 minutes. I don't do anything, maybe it's the power manager updating the icon.

One other info that might be relevant here is that the battery applet has no tooltip for me. I can left-click on it, but there is no tooltip.

Experiencing the exact same problem; also no tooltip and following error pair every time the icon disappears:

(gnome-power-manager:2493): GLib-GObject-WARNING **: invalid cast from `GtkStatusIcon' to `GtkWidget'
(gnome-power-manager:2493): Gtk-CRITICAL **: gtk_widget_hide: assertion `GTK_IS_WIDGET (widget)' failed

I patched the source package indicator-application with your change (msg #13, app-indicator.c:898) and recompiled, built and installed libappindicator0. gnome-power-manager still keeps vanishing, but at least the notification area doesn't keep growing (it stays the same size now). In .xsession-errors there are no errors from gnome-power-manager now.

(BTW, I also used version 0.0.14-0ubuntu1)

I can confirm the same problem on my fully updated Lucid Lynx laptop (updated just a few minutes ago, and a reboot done after running update-manager). The indicator for the battery appears and disappears all by itself, no interaction required. I can get a menu for the battery icon when it appears, but when it disappears, clicking on the area where it was does nothing. Everytime the battery icon appears and disappears, it adds a little bit more space to the right that aventually causes everything to the left of the original location on the bar (i.e. everything to the left of the bar) to disappear as well. You have to reboot to fix the problem, but then it starts the process all over again.

You don't need to reboot -- for a quick fix, killing gnome-power-manager and restarting it does suffice.

pheonix7117 (pheonix7117) wrote :

I haven't tried the patch yet, but I got an update today that included gnome-power-manager (didn't check if indicator-application was included as well) and the issue is still there. On my end personally, I'm using Lucid with gnome-shell. It did work initially (even in gnome-shell) until sometime last week, when I noticed the power applet was just not appearing. I then also realized that my sound applet wasn't showing in gnome-shell either. I never really had the issue of the power applet flickering or moving to the left except once when I tried manually killing/restarting it a few times, and then only once. Other than that, I just have no applet in gnome-shell. When I try to switch to metacity, both the sound and power applets have X's for icons. The "About" for each lists "Indicator Applet" (also, the generic email/messaging applet appears in metacity, but not in gnome-shell, with the same "About" info). Is this a new thing to try to combine system applets into one centralized group? I guess for now "Indicator Applet" doesn't work with gnome-shell when the gnome-panels are missing.

I realize I'm adding a whole new variable with gnome-shell, but the icons are still not working properly in metacity for me, either. Is there a way of reverting to the old applets meanwhile until the issues are sorted out? Again, before sometime last week, both sound and power applets worked fine in gnome-shell....
Thanks.

pheonix7117 (pheonix7117) wrote :

I just got a gnome-power-manager update which fixed *almost* all my issues in gnome-shell. Now I'm back to regular applet. The flickering and moving to the left each reappearance only starts when I change from battery<-->adapter in either direction. In both situations, when i click on the icon (when it's visible) and open the preferences/battery window(s), the icon remains in place and stops flickering until i switch modes again.

I got the same update and rebooted (yeah, I don't have to)...but the problem still persists. The battery icon appears and disappears all on it's own as the notification area grows and grows (wierd). I'm running on battery power (and it also occurs when plugged in, and doesn't appear to be related to switching between the two).

Note: I did an upgrade from Karmic, am running an Asus Eee PC 1000h with 2gb RAM, and the very latest patches to Lucid Alpha 3. I run Gnome desktop, the window-picker-applet, the gnome menu, two instances of the CPU Frequency scaling monitor, system monitor applet, notification area applet, eee-control-tray, clock, indicator session applet.

pheonix7117 (pheonix7117) wrote :

Leaving my Lucid machine on over night resulted in the icon having shifted all the way to the left. This was a clean install from Lucid Alpha 2, with the latest patches. It appears switching to/from battery/adapter just accelerates the process in some way.

Is there any way to fix this? Or do we just have to remove the notification area? Any alternatives to the notification area applet if this can't be fixed?

2 PatrickSCarrroll:
> Any alternatives to the notification area applet if this can't be fixed?
No, imho. Same bug present in notification area applet from Avant Window Navigator.

Bernhard (b.a.koenig) wrote :

This is actually working fine for me now. My version is 0.3.2-0ubuntu3.

Fixed for me.

pheonix7117 (pheonix7117) wrote :

Is that the indicator-applet version? I'm using the same version myself. I'm guessing you're using metacity and not gnome-shell, right?

Bernhard (b.a.koenig) wrote :

Yes, I'm using metacity wm. It was broke for me a couple of days ago, but a recent update must have fixed it for me.

Omer Akram (om26er) wrote :

as per last comment

Changed in indicator-application (Ubuntu):
status: Triaged → Fix Released
Omer Akram (om26er) wrote :

if any one still face this fell free to open this bug again.

Bug still present for me.

tekstr1der (tekstr1der) wrote :

I am still seeing issue this after resuming from suspend with indicator applet 0.3.2-0ubuntu3 and g-p-m 2.29.91-0ubuntu3.

Changed in indicator-application (Ubuntu):
status: Fix Released → Confirmed
pheonix7117 (pheonix7117) wrote :

I'm still seeing this issue across the board. I also tried adding another keyboard layout to see what the keyboard indicator went (since I saw that it was listed in the panel.js file for gnome-shell for ordering purposes) and it creates a space for it with the proper menu and everything, without an icon. Haven't noticed if it moves/flickers, but so far it seems like it's merely lacking an icon to display.
The battery monitor icon is still entirely missing for me (in gnome-shell), along with the other icons/applets from indicator-application/applet. This includes the sound, battery, mail/messenging. When I use metacity+gnome-panel, all the indicator-applications/applets show up, but both sound and battery icons are X's.
Seems like when I do a metacity/gnome-panel --replace, the keyboard icon is still missing. Doesn't seem like the battery icon is flickering or moving, however, just missing an icon.

Summary: except for the proper icon, seems fixed for me in metacity+gnome-panel. Should I open a new bug report for my issues with indicator-applications/applet in gnome-shell? Is there an alternative applet/icon for the battery monitor that doesn't depend on indicator-application (like gnome-volume-applet for sound) that I can use?

pheonix7117 (pheonix7117) wrote :

I don't mean to spam this thread, but I got a few more updates recently which now results in the battery applet showing itself (even in gnome-shell) with the correct icon. I'm now at the stage where it flickers on and off every 20-30 seconds or so, but does NOT move across the screen. Whenever it disappears, the rest of the icons shift back to the right as if it was closed normally, then move to the left to make room for it when it appears (a.k.a. they act like they should).

pheonix7117 (pheonix7117) wrote :

In case it helps:

$ apt-cache policy libindicator0
libindicator0:
  Installed: 0.3.4-0ubuntu1
  Candidate: 0.3.4-0ubuntu1
  Version table:
 *** 0.3.4-0ubuntu1 0
        500 http://archive.ubuntu.com lucid/main Packages
        100 /var/lib/dpkg/status

Joe Hurr (joehurr) wrote :

I'm getting the exact same thing, battery indicator on and off, shift a little to the left each time. I got the same output as pheonix7117 above.

'Tis most irksome.

I've been having the same problem since upgrading via update-manager -d to Lucid yesterday, on an HP Compaq 6510b, which is a Centrino Duo.

$ apt-cache policy libindicator0
libindicator0:
  Installed: 0.3.4-0ubuntu1
  Candidate: 0.3.4-0ubuntu1
  Version table:
 *** 0.3.4-0ubuntu1 0
        500 http://mirrors.rit.edu lucid/main Packages
        100 /var/lib/dpkg/status

$ uname -a
Linux [hostname] 2.6.32-15-generic #22-Ubuntu SMP Tue Mar 2 02:24:17 UTC 2010 i686 GNU/Linux

I have the battery set to always display, and this does slow its leftward march, but only as long as it's plugged in. As soon as you unplug it, it disappears/reappears about every thirty seconds (probably how often it's polling acpi for the battery state). My console is also being spammed with this every time it happens:
(gnome-power-manager:4141): GLib-GObject-WARNING **: invalid cast from `GtkStatusIcon' to `GtkWidget'
(gnome-power-manager:4141): Gtk-CRITICAL **: gtk_widget_hide: assertion `GTK_IS_WIDGET (widget)' failed

I can confirm the same as Phoenix7117. The icon continues to appear and disappear all by itself. It is no longer shifting everything over to the left anymore (i.e. making the toolbar unuseable) though so at least it's now somewhat fixed. I'm up-to-date with everything in update-manager (propsed fixes, etc, everything) as of about an hour ago. There is still no tooltip for the battery icon, and right-clicking on the icon does nothing.

rtobar (amores-incompletos) wrote :

I was also having the same problem in fluxbox (see bug #531339 for screenshot). In the last days, anyways, with the updates, the behavior has changed, but is not entirely fixed. I can report the following situation:

With AC adapter:
 * Start g-p-m. No problems/warnings on console during the entire lifetime of g-p-m
 * The icon displays OK in the systray.
 * When switching to battery, the icon goes and come back about 3 times, to finally dissapear
 * When switching back to AC, the icon comes and go about 3 times, to finally stay

With battery:
 * Start g-p-m. Got a warning (the only one during the lifetime of g-p-m):
(gnome-power-manager:6329): GLib-GObject-WARNING **: value "-nan" of type `gdouble' is invalid or out of range for property `percentage' of type `gdouble'
 * The icon displays OK in the systray.
 * Same behavior as explained before with AC adapter, but now icon stays while on battery, and hides when on AC.

Hope this helps.

Rodrigo

Changed in indicator-application (Ubuntu):
status: Confirmed → Invalid
status: Invalid → Confirmed
Felix (apoapo) wrote :

I'm using LXDE and got the dis/reappear behaviour. I recognized that it becomes faster when the battery state reaches lower levels.

like:

1-3 minutes while >50%
1 minute >20%
every few seconds > 0%

(just to give you an idea ;) )

Is that power manager icon flashing normally with lower battery? (I'm new to Gnome-ish tools and lxde)

I could be a missing icon then?

Bernhard (b.a.koenig) wrote :

For those people where it's still not working: did you try to attach an indicator applet to your panel?
(Hmm, I know gnome-shell might not have an indicator applet, maybe this is part of the problem....)

I was trying use notification area and indicator applet for gnome-panel and notification area for AWN. Same issue present in all apps.
Is it gnome-power-manager bug maybe?

After updating libindicator0 to 0.3.5-0ubuntu1 as soon as it became available in APT, the leftward march has stopped, but it still disappears and reappears while charging or discharging. This is in the notification area on a Gnome panel. I just added the Indicator Applet to this panel to see if it exhibited any behaviour anything similar, and it does not -- the battery icon is always present there, whether charging or not. I don't normally use that applet, but I'm willing to leave it in to stop the weird flashing behaviour.

summary: - battery applet comes and goes in notification area
+ Application Indicator causes Gnome Power fallback icon to show/hide on
+ each refresh
description: updated
Changed in indicator-application:
status: New → Confirmed
Changed in indicator-application (Ubuntu):
status: Confirmed → Triaged
tags: added: indicator-application
Christian Reis (kiko) on 2010-03-22
tags: added: regression-potential
androith (androith) wrote :

I confirm the bug, but also a short-term solution.

This is my situation:
1. Upgraded from 9.10 through update-manager -d (or whatever).
2. Had annoying bug described above, where the gnome-power-manager flickers on and off (it is gnome-power-manager, because the icon disappears when i killall gnome-power-manager).

This is my short-term fix:
1. Remove gnome-power-manager from panel.
2. Add "Indicator Applet" panel widget (by right-clicking on the Gnome panel, choosing "Add to Panel..." and selecting "Indicator Applet"). This will cause an applet containing the battery indicator, volume control and annoying/mysterious mail icon to appear (coupled) -- with no flickering.

Is this bug somehow an artifact of a shift to this new type of panel notification?

Tried previous, but did not work for me. Indicator applet do not show any battery indicator. How to enable battery status display in indicator applet? I have only volume and e-mail (unused as I prefer mozilla thunderbird).

pheonix7117 (pheonix7117) wrote :

Also as a note, albeit less relevant, indicator applet does not appear whatsoever when using Gnome Shell.

Following #48, I managed to use indicator-applet removing configuration file ~/.config/autostart/gnome-power-manager.desktop and launching indicator-applet-complete.
And I confirm as androith that the behaviour is shown only using gnome-power-manager applet not integrated into indicator-applet. But not all ubuntuers are using vanilla gnome desktop and indicator-application.

Changed in indicator-application (Ubuntu Lucid):
status: Triaged → Confirmed
importance: Medium → High
assignee: nobody → Canonical Desktop Experience Team (canonical-dx-team)
David Barth (dbarth) on 2010-03-26
Changed in indicator-application:
assignee: nobody → Ted Gould (ted)
importance: Undecided → High
milestone: none → ubuntu-10.04-beta-2
status: Confirmed → Triaged
Changed in indicator-application (Ubuntu Lucid):
milestone: none → ubuntu-10.04-beta-2
Kalle Valo (kvalo) on 2010-03-31
Changed in indicator-application (Ubuntu Lucid):
assignee: Canonical Desktop Experience Team (canonical-dx-team) → Kalle Valo (kvalo)
Changed in indicator-application:
assignee: Ted Gould (ted) → Kalle Valo (kvalo)
maciek (bikemaciek) wrote :

it also happens on my asus eeepc 900, battery icon appears and disappears every minute.. Im using standard notification area, and im NOT GOING TO USE INDICATOR APPLET (because it sucks). So adding it to panel isnt a fix for me... (sorry for my english)

Kalle Valo (kvalo) wrote :

I have investigated this and the problem is related to gnome-power-manager creating a new menu during each update. This is the function (from 12-add-appindicators.patch) creating a new menu:

static void
gpm_tray_icon_devices_changed_cb (GpmEngine *engine, GpmTrayIcon *icon)
{
 GtkMenu *menu;

 egg_debug("%s", __func__);

 menu = gpm_tray_icon_create_menu (icon);
 gtk_widget_show_all (GTK_WIDGET (menu));
 app_indicator_set_menu (icon->priv->app_indicator, menu);
}

If comment out call to app_indicator_set_menu() icon does not disappear anymore, but naturally the menu won't be updated. I'm exploring how to fix this properly.

Kalle Valo (kvalo) wrote :

Here's a simple test application to make it easy to reproduce the problem.

Kalle Valo (kvalo) on 2010-04-01
Changed in indicator-application:
status: Triaged → In Progress
Kalle Valo (kvalo) wrote :

In lp:~kvalo/indicator-application/dont-unfallback-after-timer-expired there's a proposal how this bug can be fixed.

Ted Gould (ted) on 2010-04-01
Changed in indicator-application:
status: In Progress → Fix Committed
milestone: ubuntu-10.04-beta-2 → 0.0.19
status: Fix Committed → Fix Released
D J Eddyshaw (david-eddyshaw) wrote :

This does not in fact solve the original bug report, which relates to the battery icon appearing and disappearing in the notification area (rather than anything to do with indicator-application.)

This is *not* fixed by the recent change to indicator-application.

On Fri, 2010-04-02 at 03:49 +0000, D J Eddyshaw wrote:
> This is *not* fixed by the recent change to indicator-application.

Did you restart your session? (logout/login) It fixed my test...

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package indicator-application - 0.0.19-0ubuntu1

---------------
indicator-application (0.0.19-0ubuntu1) lucid; urgency=low

  * New upstream release.
    * Setup the icons to use the -panel variants even when falling
      back to status icons. (LP: #547072)
    * Change python bindings to use _with_path so that they can set
      the icon path. (LP: #527061)
    * Don't set the fallback timer if we're already in a fallback
      mode to avoid unfalling back excessively. (LP: #529052)
    * Fix distcheck of documentation
 -- Ted Gould <email address hidden> Thu, 01 Apr 2010 15:56:02 -0500

Changed in indicator-application (Ubuntu Lucid):
status: Confirmed → Fix Released
D J Eddyshaw (david-eddyshaw) wrote :

I was mistaken - bug *is* fixed by the latest update.
Many thanks to everybody

pheonix7117 (pheonix7117) wrote :

I understand that Gnome3 (gnome-shell) is not likely a priority at this point, but the latest update does *not* seem to fix the indicator applet issue in Gnome Shell.

CPKS (c-1) wrote :

Agreed that the power icon appears stably now. It doesn't respond to mouseover or right-click on my test systems (AMD64 and i386).

Yomar Ruiz (yomar-r95) on 2011-04-29
Changed in indicator-application (Ubuntu):
assignee: Kalle Valo (kvalo) → Yomar Ruiz (yomar-r95)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers