Xfce4 Power Manager does not restore screen power

Bug #1259339 reported by Lutz Andersohn on 2013-12-09
362
This bug affects 73 people
Affects Status Importance Assigned to Milestone
xfce4-power-manager
Confirmed
Medium
xfce4-power-manager (Ubuntu)
Undecided
Unassigned

Bug Description

I am running xfce 4.11. Power manager is configured to do nothing when the lid closes.
When I close the lid, I get ACPI events and that trigger the /etc/acpi/lid.sh scipt.
this script in turn calls "CheckPolicy" which returns 0 since xfce4 power manager is running and the lid.sh script exits before actually doing anything. In particular, when I open the lid, 'xset dpms force on' does not get called and the screen stays dark.

looks to me, the acpi script relinquishes all duties to xfce4-power-manager - as it should - but xfce4-power-manager does not turn power to the screen back on.

My system:
xubuntu 12.04 64 bit (converted from a ubunu install originally).
output from uname -a:
Linux mypc 3.5.0-23-generic #35~precise1-Ubuntu SMP Fri Jan 25 17:13:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
xubuntu

xfce3-power-manager 1.2.0-1ubuntu1.1_ppa1

I am running xfce 4.11. Power manager is configured to do nothing when the lid closes.
When I close the lid, I get ACPI events and that trigger the /etc/acpi/lid.sh scipt.
this script in turn calls "CheckPolicy" which returns 0 since xfce4 power manager is running and the lid.sh script exits before actually doing anything. In particular, when I open the lid, 'xset dpms force on' does not get called and the screen stays dark.

looks to me, the acpi script relinquishes all duties to xfce4-power-manager - as it should - but xfce4-power-manager does not turn power to the screen back on.

Changed in xfce4-power-manager:
importance: Unknown → Medium
status: Unknown → Confirmed
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xfce4-power-manager (Ubuntu):
status: New → Confirmed

Are you using xfpm in combination with logind/systemd?

I presume by xfpm you are referring to xfce4-power-manager? If so, then yes, it is running along with upowerd, at least both show up in "ps -e"

not sure about logind/systemd: to my knowledge I didn't do anything here that wasn't out of the box. I'd be happy to run any diagnostics you need and post it here.

Yes, xfpm was intended as shorthand for xfce4-power-manager.

What version of what distro are you using?

I originally installed Ubuntu 12.04.03 LTS 64 bit which I subsequently upgraded to Xubuntu. The problem thus occured under Xubuntu 12.04 LTS 64 bit.

Minium (minium) wrote :

Referring to my previous post https://bugs.launchpad.net/bugs/1303736

I've discovered yet another peculiar fact - when putting the computer into suspend mode
over the main menu I can log in over the display manager and the display is restored correctly.

Minium (minium) wrote :

In my case I'm running Xubuntu 14.04 with the 3.13.0-23-generic kernel.
Furthermore, "xfce4-power-man" as well as "upowerd" are running.

Pasi Lallinaho (knome) on 2014-04-14
summary: - xfce4 power manager does not restore screen power
+ Xfce4 Power Manager does not restore screen power
Gjorgji (j-gjorgji) on 2014-04-16
information type: Public → Public Security
information type: Public Security → Public
slumbergod (slumbergod) wrote :

When I turned Light Locker off the problem stopped for me and now I can open and close my laptop lid without it exhibiting the strange behaviour.

Peter (pegro) wrote :

With Light Locker turned off the screen is restored after waking up but the mouse cursor disappears (see https://bugs.launchpad.net/bugs/1297144). Switching to a text console and back to the X console makes the mouse cursor visible again.

This bug should really have higher importance. Both laptops that I have upgraded to 14.04 have this bug, can't vote twice though :)

Are you sure it's the fault of xfce4-power-manager?
When I use gnome-screensaver instead of light-locker (still using xfce4-power-manager), all is fine.

When using light-locker:
 - I lock the screen (also but not only after suspend-resume)
 - Wake the display
 - Light locker appears, fill password, confirm
 - Display turns off
 - "Blindly" run "xrandr --auto"
 - Display turns on

Ted Cox (ted-m-cox) wrote :

I'm having this issue, too. Here are three workarounds:

Here are three workarounds:

1) Log out before closing your laptop lid. Your screen should start normally when you log in next.

2) If after opening your laptop and logging in you get a black screen, open TTY1 by pressing

CTRL + ALT + F1.

At the prompt, log in with your name and password. Then type:

sudo service lightdm restart

Log in one more time and your screen should be restored.

3) If after opening your laptop and logging in you get a black screen, use a keyboard shortcut to open a terminal (You'll be doing this with a blank screen, so type carefully!):

Super + t

Then type:

xrandr -- auto

sanchopanza forgot to mention that by doing 2) will lose any unsaved work
also
xrandr -- auto
(space after the two dashes) won't do anything useful, but
xrandr --auto
will

Ted Cox (ted-m-cox) wrote :

Thanks for pointing those out, Reinis!

Nikola Milić (milke) wrote :

This has become the same bug as Bug#1303736.

Mike Chelen (mchelen) wrote :

You can set a keyboard shortcut for "xrandr --auto" and then you don't have to type it in manually. I had a problem where the mouse would not reappear, but switching to TTY1 with CTRL+ALT+F1 then switching back with CTRL+ALT+F7 fixed that.

fv (fratiman-vladut) wrote :

I can confirm!!!
To recover from black screen: "xrandr --auto" blind in terminal opened with super+t
To get mouse working: ctrl+alt+f1 then ctrl+alt+f7

Chris Wilson (laun5hpad) wrote :

I can also confirm this behaviour in Xubuntu 14.04. The remedy is the same for comment #18 (fv).
I did not have this problem for 13.10 or 13.04.

Interestingly, when I switch off Light Locker and rely on Power Manager to suspend the laptop when closing the lid, the screen is restored okay. (But for some reason the Display settings window is now visible..!?)

This leads me to think that the issue is with Light Locker, and not Power Manager. (Although is Power Manager responsible for the mysterious appearance of the Display settings window on resume..??)

In my opinion, this is one example of a very visible bug that will affect many people. It should be fixed with a high priority, especially with it affecting an LTS release.

Lutz Andersohn (landersohn-m) wrote :

This bug (https://bugs.launchpad.net/bugs/1259339 )
is not related to sus[pend or hibernate as described in 1303736. Bug 1259339 was observed configured to only turn the screen off when the lid is closed; I am thus don't see the obviousness of it being a duplicate of 1303736. No doubt the underlying causes may be the same, can't see, just thought I point this out.
I also fail to understand how a bug in 12.04 (Earlier) can be a duplicate of one in 14.04 (later)? Shouldn't it be the opposite?

Lutz, your report is not necessary a dupe of the issue which many people face in Xubuntu 14.04. However, you are using components of Xfce 4.11 (PPA) according to the bug description, so it is not a default 12.04 installation anymore and the cause for the problem might be indeed the same.
All comments added to this report thus far address the "new" problem, but feel free to remove the duplicate status and add a note to the bug description to redirect users accordingly.

This bug (black screen after reopening laptop) also occurs in Linux Mint with XFCE installed.

Patrik Bubák (inoki) wrote :

Also affects me. Can anyone point me on how to replace this with let's say gnome-screensaver? Or I simply de-install light locker and install gnome screensaver.

bje (bje) wrote :

This is a serious bug for an LTS release and I don't consider killing off the session to regain the display to be a satisfactory workaround (by this definition, rebooting is also a workaround!). Please make a fix for this bug a priority.

Lutz Andersohn (landersohn-m) wrote :

there are other workarounds than an session logout. I fixed this by adding an xrandr call in acpi/lid.sh to force the screen to come on.

Lutz, could you post exactly what you have in your acpi/lid.sh? Thanks.

I created one myself and run xrandr --auto or xrandr --display :0.0 --auto on the 'button/lid open' event, but it does not do anything. Running xrandr --auto blindly while the screen is dark lightens up the screen again, but then the mouse cursor is gone.

In general, the workarounds in #13 are just not feasible for most users who have little clue about Linux (this machine, for example, is for my dad), so fixing this bug should have much higher priority. Especially since this is an LTS release.

One simple work-around I found is to do the following:

1. Disable the check box to lock the screen before suspending in xfce-power-manager settings.
2. Enable "lock on suspend" in Light Locker settings

Now the screen is properly locked when resuming from suspend *and* screen power is restored after logging in.

Tested this on two Xubuntu 14.04 systems, seems to work.

Lawrence Ong (lawrence-ong) wrote :

I have written an automated script to execute the "xrandr --auto" command after resume. It solves the blank-screen problem for me.

1. Create the following file named "00_screen" in /etc/pm/sleep.d/

=================
#!/bin/bash
case "$1" in
    thaw|resume)
 sleep 5
 sudo -u <user> env DISPLAY=:0 /usr/bin/xrandr --auto
        ;;
    *)
        ;;
esac
==================

replace <user> with your username

2. Change it to be executable:

# chmod +x 00_screen

Eric (ericwongcm) wrote :

#30 works for me.
I am using Xubuntu 14.04

Maxim Nosovets (molny) wrote :

#30 not works for me.
fresh installed Xubuntu 14.04.1, netbook Samsung N143 (Intel GMA 3150)

pepitux (alarga) wrote :

#30 not works for me, but #31 yes works

I'm using Mint 17 (Qiana) with Xfce 4.11.6

Nicholas Nelson (nenelson1981) wrote :

#31 Thank you so much. This problem was driving me nuts.
On a side note if anyone is interested in having the screen wake up when the laptop is set to do nothing when closing the lid I have found the following works.

1. Use the directions on the following site to create the appropriate files in the /etc/acpi and /etc/acpi/events directory:

    http://askubuntu.com/questions/525995/catch-lid-close-and-open-events

2. Paste the following lines into the lid.sh script (don't forget to make the script executable):

#!/bin/sh

sleep 5
sudo -u <user_name_here> env DISPLAY=:0 /usr/bin/xrandr --auto

3. Restart ACPI

sudo /etc/init.d/acpid restart

Hope this works for you!! Thanks to everyone who contributed to this post.

Alex Gavryushkin (omail) wrote :

I'm using Xubuntu 14.04 on a mid 2010 Macbook. Has had this issue and had to restart lightdm using `sudo service lightdm restart` every time. But have just noticed that if I open the lid, get the dark screen, then close the lid again and reopen it once again, the session gets restored. No lightdm restarting any more!

baptx (b4ptx) wrote :

This bug is shared on the Xubuntu website: http://xubuntu.org/news/screen-locking-in-xubuntu-14-04/
By the way, when I use light locker, the screen brightness is not restored to the correct percentage. When I use xscreensaver, the brightness level remains the same after locking. It is probably related to this bug but if it isn't, feel free to create a new bug report. I'm using Xubuntu 14.04 LTS as update on Dell XPS 13 Developer Edition revision 2 (shipped with Ubuntu 12.04 LTS).

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.