xfce4-power-manager creating extra space after suspend

The standard panel of LXDE - http://wiki.lxde.org/en/LXPanel
Locked
jonnycat
Posts: 15
Joined: Wed Dec 04, 2013 8:17 pm

xfce4-power-manager creating extra space after suspend

Post by jonnycat »

Hello, I am using LXDE on a recent install of Debian 7.2 on a laptop. I have the xfce4-power-manager installed, and whenever I return from a suspend or hibernate, there is an extra space placed in the system tray (like a blank icon). Clicking this dead space with either mouse button reveals no menu. Repeated suspend or hibernation cycles add additional dead space, so if I have suspended five times there will be a dead space the width of five icons in the system tray.

If I close the xfce4-power-manager, both it, and all of the dead spaces disappear, so I know this is related to xfce4-power-manager. If I restart xfce4-power-manager, it starts normally, without the dead spaces. Also, running <lxpanelctl restart> returns the system tray to normal.

Any idea what might be causing this behavior, and/or any way to mitigate it? Thanks for your suggestions.
drooly
Posts: 791
Joined: Mon Apr 08, 2013 6:45 am

Re: xfce4-power-manager creating extra space after suspend

Post by drooly »

totally weird problem.
you could try posting on crunchbang forums, since they're quite tolerant about what distro or desktop environment you use.
you can always try to start the power manager manually from a terminal and see if you get some meaningful output.
jonnycat
Posts: 15
Joined: Wed Dec 04, 2013 8:17 pm

Re: xfce4-power-manager creating extra space after suspend

Post by jonnycat »

Hey thanks drooly. Unfortunately, running the application from the console quickly returns back to a command prompt after the program loads, without any messages. Rats!
drooly
Posts: 791
Joined: Mon Apr 08, 2013 6:45 am

Re: xfce4-power-manager creating extra space after suspend

Post by drooly »

can't you disable the power-managers systray completely? you can still access it through the menu.
jonnycat
Posts: 15
Joined: Wed Dec 04, 2013 8:17 pm

Re: xfce4-power-manager creating extra space after suspend

Post by jonnycat »

Well I could, but then I'd lose the battery charge icon in the system tray which I like to have. Thanks though.
lentai
Posts: 1
Joined: Thu Dec 26, 2013 3:52 pm

Re: xfce4-power-manager creating extra space after suspend

Post by lentai »

Hi,

I can confirm this problem, and I want to give more information about:
I'm using a laptop with Debian Wheezy 7.3 with LXDE (but also affects all my users that I'm migrating from Windows XP to GNU/Linux).

I investigate when appear empty spaces / blank space with xfce4-power-manager:
- (easy way to reproduce it) xfce4-power-manager-settings : System tray icon (Always show icon / Never show icon), change some times this, and you will get more and more empty spaces
- sometimes when you run it on autostart ( /etc/xdg/lxsessions/LXDE/autostart )
- as said before: suspend and hibernate
- when you extract the battery and insert again

Seems to be an old bug, but it's still present. I want to see the last version of Lubuntu if still occurs:
- https://bugs.launchpad.net/ubuntu/+sour ... bug/846878
- https://bugs.launchpad.net/ubuntu/+sour ... bug/880010

...

I tried a live usb with Lubuntu 13.10 and I cannot reproduce the bug (seems to be fixed), so perhaps it's fixed and we have to ask for a upgrade in debian stable (or backports): xfce4-power-manager, lxpanel, ...
Rex Bouwense
Posts: 1093
Joined: Sat Aug 27, 2011 5:44 pm
Location: Sierra Vista, Arizona USA
Contact:

Re: xfce4-power-manager creating extra space after suspend

Post by Rex Bouwense »

I can confirm that there is no such bug in Lubuntu 13.10 or any of the previous three version releases so perhaps it is Debian peculiar. Not sure.
However, I did find this from the Ubuntu Forums.
http://ubuntuforums.org/showthread.php? ... st11690707
Rex
drooly
Posts: 791
Joined: Mon Apr 08, 2013 6:45 am

Re: xfce4-power-manager creating extra space after suspend

Post by drooly »

there's opinions on the bug reports wether this is a bug with xfce4-power-manger or lxpanel...

it could be debian is using old versions, what is your version?
"This bug was fixed in the package xfce4-power-manager - 1.0.10-5ubuntu2"
compiling from git just might help, if your version is less.

a confirmed workaround:
https://bugs.launchpad.net/ubuntu/+sour ... omments/64
seems to be the same, with steb-by-step-instructions:
http://ubuntuforums.org/showthread.php? ... st11690707

different workaround:
https://bugzilla.redhat.com/show_bug.cgi?id=765726#c4

let us know how it goes!
jonnycat
Posts: 15
Joined: Wed Dec 04, 2013 8:17 pm

Re: xfce4-power-manager creating extra space after suspend

Post by jonnycat »

Drooly you are my hero, thank you so much!

I wasn't able to get the ubuntu solutions working, as it kept returning a "can't connect to display" error in the logs. I was however able to get it working with an element from the script from the redhat page though, which basically just ran the command as my user (prepending "su - user -c" to the command lines).

I did have to modify the script by removing the "exit 1" value from the ubuntu script, as it's inclusion prevented my computer from going into suspend at all.

BTW: this is for xfce4-power-manager 1.0.11 and Debian Wheezy (7.2).

Here is the final script that worked for me:

Code: Select all

#!/bin/bash 

case "$1" in 
          resume|thaw)
              su - jon -c "export DISPLAY=:0 && sleep 5 && lxpanelctl restart" 
              ;;
          *)  
              ;;
esac
exit 0  
fohrums
Posts: 8
Joined: Sat Dec 22, 2012 5:59 am

Re: xfce4-power-manager creating extra space after suspend

Post by fohrums »

jonnycat wrote:Drooly you are my hero, thank you so much! ......
Here is the final script that worked for me: ...... (posted above)
[SITUATION]
I have tested your version of the script myself and added your code in the following script file:
... after doing so I didn't 'Reboot' or exit 'LXDE' I simply closed the lid to suspend it and found out the script doesn't work when I brought the lid back up to resume my session.

Code: Select all

$ nano /etc/pm/sleep.d/reset_panel
[PROBLEM]
After checking the logs I get the message saying the script is "unexecutable". So, this fix isn't working for me.

Code: Select all

$ nano /vars/logs/pm-suspend.log
......
~/etc/pm/sleep.d/reset_panel is unexecuteable~
......
[SUGGESTION]
What does prevent the empty icons on resume from 'Suspend' is by disabling xfce4-power-manager's icon to display:
... blank spaces are mainly from the notification aspect displaying battery info and wireless connected-to automatically.

Code: Select all

xfce4-power-manager preferences > General (tab) > icon to not show at all
in replace of that is the lxpanel's default "Battery Monitor":

Code: Select all

right-click panel > Add / Remove Panel Items > Add > 'Battery Monitor'
[NOTE]
Also, hibernate/suspend still works because xfce4-power-manager is still in the background process. So, for this I have also set it to run @ autostart (when I log into LXDE).
... since the icon is missing; well, your just going to have to navigate to the program's executable or run it via terminal "xfce4-power-manager"

Code: Select all

# nano /etc/xdg/lxsession/LXDE/autostart
......
xfce4-power-manager
......
Locked