Resuming from standby/hibernate, screen is blank until key is pressed

Bug #509660 reported by Matt Perry
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
devicekit-power (Ubuntu)
Expired
Low
Unassigned
gnome-power-manager (Ubuntu)
Expired
Low
Unassigned
gnome-screensaver (Ubuntu)
Expired
Low
Unassigned
indicator-session (Ubuntu)
Expired
Low
Unassigned

Bug Description

Binary package hint: pm-utils

Using release: Ubuntu 9.10

When resuming from suspend or hibernate, the screen remains blank until a key is pressed or the mouse is moved. There is no indication to the end-user that the system to ready for them to continue.

Steps to reproduce:
1. Suspend or hibernate
2. Resume from suspension or hibernation

Actual Result:
Once the system has resumed, the screen remains blank.

Expected result:
The unlock screen should display so that the user knows the system is ready for them to use.

Revision history for this message
Chow Loong Jin (hyperair) wrote :

Confirming. And this is gnome-power-manager's territory.

affects: pm-utils (Ubuntu) → gnome-power-manager (Ubuntu)
Changed in gnome-power-manager (Ubuntu):
status: New → Confirmed
Revision history for this message
Chow Loong Jin (hyperair) wrote : Re: [Bug 509660] [NEW] Unlock screen not shown when resuming from standby or hibernation

I've narrowed down the issue to indicator-session and every other manual method
of suspending/hibernating that does not use the sleep hotkey bypassing
gnome-power-manager when suspending or hibernating the system, since they all
now talk to DeviceKit-Power directly.

As Chris Coulson mentioned in IRC, what's needed is for DeviceKit-Power to
provide signal hooks for entering/exiting sleep/hibernate state, so that
gnome-screensaver and network-manager among other applications can hook onto
these signals and perform anything necessary (in gnome-screensaver's case,
locking the screen for suspend and showing the dialog upon resume).

From what I can see, this is a summary of what needs to be done is order:
* devkit-power needs to grow support for the required signals
* gnome-screensaver needs to hook onto these signals once they have been added
* gnome-power-manager and every other rdep of devkit-power that plays around
with the screensaver needs to be amended to drop the repeated code.

  affects ubuntu/devicekit-power
  status confirmed
  affects ubuntu/gnome-screensaver
  status confirmed
  affects ubuntu/indicator-session
  status confirmed

--
Kind regards,
Chow Loong Jin (GPG: 0x8F02A411)
Ubuntu Contributing Developer

Changed in gnome-screensaver (Ubuntu):
importance: Undecided → Low
Changed in gnome-power-manager (Ubuntu):
importance: Undecided → Low
Changed in devicekit-power (Ubuntu):
importance: Undecided → Low
Changed in indicator-session (Ubuntu):
importance: Undecided → Low
summary: - Unlock screen not shown when resuming from standby or hibernation
+ Unlock dialog should be displayed when resuming from standby or
+ hibernation
Revision history for this message
quirks (quirks) wrote : Re: Unlock dialog should be displayed when resuming from standby or hibernation

Until this is fixed, you might want to use this workaround that I scripted quickly: create a file /etc/pm/sleep.d/90-gnome-screensaver.sh with the following content:

--- snip ---

#!/bin/sh

. /usr/share/acpi-support/power-funcs

case "$1" in
 thaw)
  # now, we should poke xscreensaver so you get a dialog
  if pidof gnome-screensaver > /dev/null; then
      for x in /tmp/.X11-unix/*; do
   displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`
   getXuser;
   if [ x"$XAUTHORITY" != x"" ]; then
       export DISPLAY=":$displaynum"
       su $user -c "(gnome-screensaver-command --poke)"
   fi
      done
  fi
 ;;
 *)
 ;;
esac

--- snip ---

Then, make the script executable: chmod a+x /etc/pm/sleep.d/90-gnome-screensaver.sh

The script is largely based on a script that was included for xscreensaver in hardy. I just adapted it for gnome-screensaver.

summary: - Unlock dialog should be displayed when resuming from standby or
- hibernation
+ Resuming from standby/hibernate, screen is blank until key is pressed
Revision history for this message
Charles Kerr (charlesk) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. We are sorry that we do not always have the capacity to look at all reported bugs in a timely manner. There have been many changes in Ubuntu since that time you reported the bug and your problem may have been fixed with some of the updates

I'm not able to reproduce this issue when testing in 14.04 -- when resuming from sleep, I see the new unity lockscreen before any keypress, mouse motion, or mouse click.

It would help us a lot if you could test it on a currently supported Ubuntu version. When you test it and it is still an issue, kindly upload the updated logs by running apport-collect <bug #> and any other logs that are relevant for this particular issue.

Changed in indicator-session (Ubuntu):
status: Confirmed → Incomplete
Changed in gnome-screensaver (Ubuntu):
status: Confirmed → Incomplete
Changed in gnome-power-manager (Ubuntu):
status: Confirmed → Incomplete
Changed in devicekit-power (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for gnome-screensaver (Ubuntu) because there has been no activity for 60 days.]

Changed in gnome-screensaver (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for devicekit-power (Ubuntu) because there has been no activity for 60 days.]

Changed in devicekit-power (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for gnome-power-manager (Ubuntu) because there has been no activity for 60 days.]

Changed in gnome-power-manager (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for indicator-session (Ubuntu) because there has been no activity for 60 days.]

Changed in indicator-session (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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