Page 1 of 1

xfce4-power-manager creating extra space after suspend

Posted: Thu Dec 19, 2013 6:12 pm
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.

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

Posted: Fri Dec 20, 2013 6:45 pm
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.

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

Posted: Sat Dec 21, 2013 2:27 am
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!

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

Posted: Sat Dec 21, 2013 4:59 pm
by drooly
can't you disable the power-managers systray completely? you can still access it through the menu.

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

Posted: Sun Dec 22, 2013 1:10 am
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.

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

Posted: Thu Dec 26, 2013 4:34 pm
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, ...

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

Posted: Fri Dec 27, 2013 1:02 am
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

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

Posted: Sat Dec 28, 2013 6:38 pm
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!

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

Posted: Mon Jan 13, 2014 5:29 am
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  

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

Posted: Thu Jul 10, 2014 2:08 pm
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
......