Bug 878736

Summary: Desktop not shown after unlocking screensaver
Product: [Fedora] Fedora Reporter: Amit Shah <amit.shah>
Component: gnome-shellAssignee: Owen Taylor <otaylor>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: admiller, amit.shah, collura, fmuellner, henrik, jmccann, leho, lmacken, mclasen, mordae, niki.guldbrand, otaylor, pedrogfrancisco, robatino, rstrode, sagarun, samkraju, scampa.giovanni, shalli.vcgfdt, tomek, twaugh, walters
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-05 08:11:37 EST Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Amit Shah 2012-11-21 00:21:31 EST
Description of problem:

This has happened mostly after resume from suspend.  At the unlock screen prompt, I enter my password (or swipe finger).  The password prompt goes away, but the desktop doesn't get shown, just the gray background with the minimal activity bar continues to be displayed.

On suspending again (using laptop fn keys), the desktop gets shown momentarily before entering suspend.

I have to use ctrl-alt-del to reboot.
Comment 1 Amit Shah 2012-11-21 00:56:35 EST
OK, it's not specific to suspend-resume, this happened on a normal lock screen action as well.

I could switch to a vterm, kill gnome-shell, go back to X, and re-start gnome-shell from a terminal window to continue my session.
Comment 2 Amit Shah 2012-11-21 13:06:08 EST
Proposing as a release blocker
Comment 3 Niki Guldbrand 2012-11-23 12:30:25 EST
I experince the same, but normally, after login, I can just hit Alt+F2, then r+Enter to restart gnome-shell and see the desktop again
Comment 4 Amit Shah 2012-11-25 01:45:16 EST
(In reply to comment #3)
> I experince the same, but normally, after login, I can just hit Alt+F2, then
> r+Enter to restart gnome-shell and see the desktop again

That worked for me as well, thanks.  However, when I did this, some of my gnome-terminal windows jumped workspaces (landed on the active one).  Not all, but some of them.
Comment 5 Amit Shah 2012-11-26 04:57:01 EST
This looks even more serious -- while this does not happen every time, I think I'v'e found a way to trigger it [1].  Also, when it's triggered, the alt+f2 combination works while the screensaver is shown, and typing 'r' there gets me to the desktop.  So this looks like a security hole.

[1] The way to reproduce this bug seems to be:
1. Suspend or lock a laptop, causing the  screensaver to be activated.
2. Resume laptop or press a key.  Before the up-arrow animation on the screensaver curtain is started or finished, press other keys or click the mouse.

One way to prevent this from happening is to let the up-arrow animation on the screensaver curtain to finish, then hit 'esc' or drag the curtain up using the mouse.  This bug hasn't reproduced when I've waited for the animation to finish.

So looks like bug 878740 is related.
Comment 6 Matthias Clasen 2012-11-26 10:28:09 EST
(In reply to comment #5)
 
> [1] The way to reproduce this bug seems to be:
> 1. Suspend or lock a laptop, causing the  screensaver to be activated.
> 2. Resume laptop or press a key.  Before the up-arrow animation on the
> screensaver curtain is started or finished, press other keys or click the
> mouse.

Not reproducing this, with gnome-shell 3.6.2 here.
Comment 7 Amit Shah 2012-11-26 12:01:46 EST
I'm on gnome-shell-3.6.2-2.fc18.x86_64.

A few messages from the log, if they help, follow.  Let me know if there are other logs someplace that I can upload to help.  I'm not sure if these were emitted exactly when the issue happened.  The last one (third) might be the most relevant, it refers to screenShield.js.


-----

Window manager warning: Received a NET_CURRENT_DESKTOP message from a broken (outdated) client who sent a 0 timestamp
    JS ERROR: !!!   Invalid work id 4
    JS ERROR: !!!     message = '"Invalid work id 4"'
    JS ERROR: !!!     fileName = '"/usr/share/gnome-shell/js/ui/main.js"'
    JS ERROR: !!!     lineNumber = '811'
    JS ERROR: !!!     stack = '"queueDeferredWork("4")@/usr/share/gnome-shell/js/ui/main.js:811
()@/usr/share/gnome-shell/js/ui/status/network.js:514
wrapper()@/usr/share/gjs-1.0/lang.js:204
(null)@/usr/share/gnome-shell/js/ui/status/network.js:369
wrapper(null)@/usr/share/gjs-1.0/lang.js:204
()@/usr/share/gnome-shell/js/ui/status/network.js:1855
wrapper()@/usr/share/gjs-1.0/lang.js:204
()@/usr/share/gnome-shell/js/ui/status/network.js:2075
wrapper()@/usr/share/gjs-1.0/lang.js:204
([object _private_NMClient_Client],[object _private_GObject_ParamSpec])@/usr/share/gnome-shell/js/ui/status/network.js:2071
wrapper([object _private_NMClient_Client],[object _private_GObject_ParamSpec])@/usr/share/gjs-1.0/lang.js:204
"'
Error: Connection activation failed.
Error: Connection activation failed.
Error: Timeout 90 sec expired.
Window manager warning: Log level 8: meta_window_raise: assertion `!window->override_redirect' failed
Window manager warning: Log level 8: meta_window_focus: assertion `!window->override_redirect' failed
Window manager warning: Received a NET_CURRENT_DESKTOP message from a broken (outdated) client who sent a 0 timestamp

-----
And another one, looks different:

Window manager warning: meta_window_activate called by a pager with a 0 timestamp; the pager needs to be fixed.
Window manager warning: Received a NET_CURRENT_DESKTOP message from a broken (outdated) client who sent a 0 timestamp
Window manager warning: Received a NET_CURRENT_DESKTOP message from a broken (outdated) client who sent a 0 timestamp
    JS ERROR: !!!   Exception was: TypeError: this._dragActor is undefined
    JS ERROR: !!!     message = '"this._dragActor is undefined"'
    JS ERROR: !!!     fileName = '"/usr/share/gnome-shell/js/ui/dnd.js"'
    JS ERROR: !!!     lineNumber = '506'
    JS ERROR: !!!     stack = '"(77130878)@/usr/share/gnome-shell/js/ui/dnd.js:506
wrapper(77130878)@/usr/share/gjs-1.0/lang.js:204
([object _private_Clutter_Event])@/usr/share/gnome-shell/js/ui/dnd.js:458
wrapper([object _private_Clutter_Event])@/usr/share/gjs-1.0/lang.js:204
([object _private_Clutter_Rectangle],[object _private_Clutter_Event])@/usr/share/gnome-shell/js/ui/dnd.js:170
wrapper([object _private_Clutter_Rectangle],[object _private_Clutter_Event])@/usr/share/gjs-1.0/lang.js:204
([object _private_Clutter_Rectangle],[object _private_Clutter_Event])@/usr/share/gnome-shell/js/ui/dnd.js:54
"'
Window manager warning: Received a NET_CURRENT_DESKTOP message from a broken (outdated) client who sent a 0 timestamp


-----
and another one:

Window manager warning: Received a NET_CURRENT_DESKTOP message from a broken (outdated) client who sent a 0 timestamp
      JS LOG: pushModal: invocation of begin_modal failed
Window manager warning: Log level 8: meta_end_modal_for_plugin: assertion `compositor->modal_plugin == plugin' failed
    JS ERROR: !!!   Exception was: Error: incorrect pop
    JS ERROR: !!!     message = '"incorrect pop"'
    JS ERROR: !!!     fileName = '"/usr/share/gnome-shell/js/ui/main.js"'
    JS ERROR: !!!     lineNumber = '638'
    JS ERROR: !!!     stack = '"popModal([object _private_St_Widget])@/usr/share/gnome-shell/js/ui/main.js:638
()@/usr/share/gnome-shell/js/ui/screenShield.js:838
wrapper()@/usr/share/gjs-1.0/lang.js:204
([object _private_Shell_IdleMonitor],18,false)@/usr/share/gnome-shell/js/ui/screenShield.js:588
"'
Window manager warning: Received a NET_CURRENT_DESKTOP message from a broken (outdated) client who sent a 0 timestamp

----


The outdated client message keep appearing frequently, and seems unrelated to this.
Comment 8 Giovanni Campagna 2012-11-26 15:49:49 EST
The issue is here is the handling of other active grabs when we activate the screen lock: we fail, but we don't notice, until it is too late.

Upstream report with a patch: https://bugzilla.gnome.org/show_bug.cgi?id=689106
Comment 9 Amit Shah 2012-11-26 23:20:46 EST
(In reply to comment #8)
> The issue is here is the handling of other active grabs when we activate the
> screen lock: we fail, but we don't notice, until it is too late.

I have workrave installed, which prompts for breaks after some timeout, and grabs mouse/keyboard, so that the user is forced to take a break.  Perhpas it's that.

> Upstream report with a patch:
> https://bugzilla.gnome.org/show_bug.cgi?id=689106

Thanks!
Comment 10 Amit Shah 2012-11-27 22:56:08 EST
Removing F18 blocker consideration -- looks like this needs workrave to reproduce.
Comment 11 Amit Shah 2012-11-30 01:10:43 EST
This just reproduced when I had quit workrave.  So looks like not related to that.
Comment 12 Henrik Nordström 2013-01-17 04:40:29 EST
It is easily reproducible with stock F18 software and should imho have stayed a release blocker, especially considering that there is an upstream patch available.

It does indeed seem to be related to keyboard grabs as Giovanni said above. There is very many applications in F18 that grabs the keyboard

  - virt-manager when showing a KVM desktop
  - Firefox in some situations
  - Some password prompts in other applications

In earlier Fedora versions the problem was different with the screensaver not locking the screen at all if the keyboard is grabbed by another application.

For various reasons I am hitting this bug almost daily, and without any third-party applications installed.
Comment 13 Henrik Nordström 2013-01-17 04:41:00 EST
*** Bug 896416 has been marked as a duplicate of this bug. ***
Comment 14 Henrik Nordström 2013-02-12 18:33:38 EST
FYI: rdesktop / vinagre also grabs the keyboard when the remote desktop is active and can be used to easily reproduce the problem, or as said above by connecting to a virtual machine in virt-manager or qemu (no actual virtual machine instance is needed, the virtual BIOS boot screen is sufficient)

A easy way to trigger is to set the screen lock timeout to minimum, then run

  qemu-kvm

with no arguments at all. Click on the window to activate the desktop and then wait for the timeout.

To release the qemu grab after the screen have been "locked" you need to press Ctrl+Alt.

At this stage Alt F2-r restores the desktop.

The clock screen is not reacting on keyboard input at all, but can be dragged away with the mounse revealing a password screen. Entering the correct password is possible, but results in a blank grey screen.

I would say there is three bugs here

a) The fact that thee is no indication that the keyboard is grabbed by some running application. Ideally the screen lock should force grab the keyboard, but maybe that is not possible to overide an existing grab. If overriding an existing grab is not possible then at least an indication would be appropriate. I do not think the old behavior of not locking at all is preferred, but maybe it is required if there is applications requiring a mouse click to deactivate the grab (I can imagine that some remote desktop viewer in full screen mode requires this)

b) That actually suceeding in entering the password results in a blank grey screen as if it still was locked.

c) The fact that Alt-F2 works after the other application have released it's grab, as if the screen was not locked.

Of which:

'a' is merely annoying and seems most applications do release the grab when loosing focus.

'b' is a bug which to many users renders the logged in session useless as not many end-users know about the Alt F2-r trick.

'c' is a security issue as the user thinks the screen is securely locked.
Comment 15 Jan Dvořák 2013-02-13 02:49:22 EST
Isn't this related to https://fedoraproject.org/wiki/Features/Grab_override?
Comment 16 lejeczek 2013-02-18 08:25:35 EST
just wanted to say my system suffers from the same/very similar problem.
laptop goes to sleep with rdesktop connected wakes up and no keyboard input at all, mouse works and I can switch between windows. No power button nor any other functional key work. I do ssh from another system and kill rdesktop then everything is back to normal.

I'm on
rdesktop-1.7.1-1.fc18.x86_64
gnome-shell-3.6.3-2.fc18.x86_64
and nouveau
Comment 17 Michael De La Rue 2013-02-23 09:52:42 EST
I am getting this;  it's extremely irritating.  It's very likely it happens when I am running a KVM virtual machine via virt-manager/virt-viewer.  Adding myself to the CC list to see any further information requests.  

N.B. alt-f2 brings up a command dialog.  You can still send some input to programs.  You just can't see anything.
Comment 18 Leho Kraav 2013-02-23 09:53:49 EST
gnome-shell-3.6.3 has already been released, including the fix for this.
Comment 19 Michael De La Rue 2013-02-23 11:35:26 EST
Seems I just got that version installed today.  On first testing I can't reproduce any more, though it was always a bit random beforehand.  If it happens again I'll come back.  Otherwise I guess it's fixed for me.  Thanks v. much.
Comment 20 Arun S A G 2013-03-04 07:58:38 EST
[saga@broughtfine-lm ]$ rpm -q gnome-shell
gnome-shell-3.6.3.1-1.fc18.x86_64
[saga@broughtfine-lm jailbird]$ 


Still not fixed! Here is my part of session.log


    JS ERROR: !!!   Exception in callback for signal: unlocked
    JS ERROR: !!!     message = '"incorrect pop"'
    JS ERROR: !!!     fileName = '"/usr/share/gnome-shell/js/ui/main.js"'
    JS ERROR: !!!     lineNumber = '638'
    JS ERROR: !!!     stack = '"popModal([object _private_St_Widget])@/usr/share/gnome-shell/js/ui/main.js:638
()@/usr/share/gnome-shell/js/ui/screenShield.js:869
wrapper()@/usr/share/gjs-1.0/lang.js:204
()@/usr/share/gnome-shell/js/ui/screenShield.js:839
wrapper()@/usr/share/gjs-1.0/lang.js:204
([object Object])@/usr/share/gnome-shell/js/ui/screenShield.js:719
wrapper([object Object])@/usr/share/gjs-1.0/lang.js:204
_emit("unlocked")@/usr/share/gjs-1.0/signals.js:124
([object Object])@/usr/share/gnome-shell/js/ui/unlockDialog.js:276
wrapper([object Object])@/usr/share/gjs-1.0/lang.js:204
_emit("verification-complete")@/usr/share/gjs-1.0/signals.js:124
([object _private_Gdm_UserVerifierProxy],"gdm-password")@/usr/share/gnome-shell/js/gdm/util.js:328
wrapper([object _private_Gdm_UserVerifierProxy],"gdm-password")@/usr/share/gjs-1.0/lang.js:204
"'
Window manager warning: Log level 8: meta_end_modal_for_plugin: assertion `compositor->modal_plugin == plugin' failed
    JS ERROR: !!!   Exception in callback for signal: Unlock
    JS ERROR: !!!     message = '"incorrect pop"'
    JS ERROR: !!!     fileName = '"/usr/share/gnome-shell/js/ui/main.js"'
    JS ERROR: !!!     lineNumber = '638'
    JS ERROR: !!!     stack = '"popModal([object _private_St_Widget])@/usr/share/gnome-shell/js/ui/main.js:638
()@/usr/share/gnome-shell/js/ui/screenShield.js:869
wrapper()@/usr/share/gjs-1.0/lang.js:204
([object _private_Gio_DBusProxy],":1.1",[object Array])@/usr/share/gnome-shell/js/ui/screenShield.js:426
_emit("Unlock",":1.1",[object Array])@/usr/share/gjs-1.0/signals.js:124
_convertToNativeSignal([object _private_Gio_DBusProxy],":1.1","Unlock",[object _private_GLib_Variant])@/usr/share/gjs-1.0/overrides/Gio.js:126
"'
Window manager warning: Log level 8: atk_object_notify_state_change: assertion `ATK_IS_OBJECT (accessible)' failed
 
Window manager warning: Log level 8: atk_object_notify_state_change: assertion `ATK_IS_OBJECT (accessible)' failed
 
(gnome-settings-daemon:1866): GnomeDesktop-CRITICAL **: gnome_rr_output_info_get_geometry: assertion `GNOME_IS_RR_OUTPUT_INFO (self)' failed
 
(gnome-settings-daemon:1866): GnomeDesktop-CRITICAL **: gnome_rr_output_info_get_geometry: assertion `GNOME_IS_RR_OUTPUT_INFO (self)' failed
=== xinerama setup Configuration ===
  Clone: false
  Output: Laptop attached to LVDS1
     status: on
     width: 1280
     height: 800
     rate: 60
     primary: true
     position: 0 0
  Output: (null) attached to VGA1
     status: off
     width: -1
     height: -1
     rate: -1
     primary: false
     position: -1 -1
  Output: (null) attached to HDMI1
     status: off
     width: -1
     height: -1
     rate: -1
     primary: false
     position: -1 -1
  Output: Hewlett Packard 24" attached to DP1
     status: on
     width: 1920
     height: 1200
     rate: 60
     primary: false
     position: 1280 0
  Output: (null) attached to HDMI2
     status: off
     width: -1
     height: -1
     rate: -1
     primary: false
     position: -1 -1
  Output: (null) attached to HDMI3
     status: off
     width: -1
     height: -1
     rate: -1
     primary: false
     position: -1 -1
  Output: (null) attached to DP2
     status: off
     width: -1
     height: -1
     rate: -1
     primary: false
     position: -1 -1
  Output: (null) attached to DP3
     status: off
     width: -1
     height: -1
     rate: -1
     primary: false
     position: -1 -1
=== auto-configure - xinerama mode Configuration ===
  Clone: false
  Output: Laptop attached to LVDS1
     status: on
     width: 1280
     height: 800
     rate: 60
     primary: true
     position: 0 0
  Output: (null) attached to VGA1
     status: off
     width: -1
     height: -1
     rate: -1
     primary: false
     position: -1 -1
  Output: (null) attached to HDMI1
     status: off
     width: -1
     height: -1
     rate: -1
     primary: false
     position: -1 -1
  Output: Hewlett Packard 24" attached to DP1
     status: on
     width: 1920
     height: 1200
     rate: 60
     primary: false
     position: 1280 0
  Output: (null) attached to HDMI2
     status: off
     width: -1
     height: -1
     rate: -1
     primary: false
     position: -1 -1
  Output: (null) attached to HDMI3
     status: off
     width: -1
     height: -1
     rate: -1
     primary: false
     position: -1 -1
  Output: (null) attached to DP2
     status: off
     width: -1
     height: -1
     rate: -1
     primary: false
     position: -1 -1
  Output: (null) attached to DP3
     status: off
     width: -1
     height: -1
     rate: -1
     primary: false
     position: -1 -1
=== Applying Configuration Configuration ===
  Clone: false
  Output: Laptop attached to LVDS1
     status: on
     width: 1280
     height: 800
     rate: 60
     primary: true
     position: 0 0
  Output: (null) attached to VGA1
     status: off
     width: -1
     height: -1
     rate: -1
     primary: false
     position: -1 -1
  Output: (null) attached to HDMI1
     status: off
     width: -1
     height: -1
     rate: -1
     primary: false
     position: -1 -1
  Output: Hewlett Packard 24" attached to DP1
     status: on
     width: 1920
     height: 1200
     rate: 60
     primary: false
     position: 1280 0
  Output: (null) attached to HDMI2
     status: off
     width: -1
     height: -1
     rate: -1
     primary: false
     position: -1 -1
  Output: (null) attached to HDMI3
     status: off
     width: -1
     height: -1
     rate: -1
     primary: false
     position: -1 -1
  Output: (null) attached to DP2
     status: off
     width: -1
     height: -1
     rate: -1
     primary: false
     position: -1 -1
  Output: (null) attached to DP3
     status: off
     width: -1
     height: -1
     rate: -1
     primary: false
     position: -1 -1
Window manager warning: Log level 8: meta_window_move_resize: assertion `!window->override_redirect' failed
Window manager warning: Log level 8: meta_window_move_resize: assertion `!window->override_redirect' failed
Window manager warning: CurrentTime used to choose focus window; focus window may not be correct.
Window manager warning: Got a request to focus 0x2c00003 (Hotot) with a timestamp of 0.  This shouldn't happen!
Comment 21 Dean Hunter 2013-03-23 23:07:50 EDT
Installed Packages
gnome-shell.x86_64                    3.6.3.1-1.fc18                    @updates

In a virt-manager window after an inactivity time out on the login screen with no lock enabled the default back-ground is displayed regardless of keyboard or mouse activity intended to display the login screen again.
Comment 22 Dean Hunter 2013-03-23 23:11:54 EDT
[admin@ipa ~]$ gsettings list-recursively org.gnome.desktop.screensaver
org.gnome.desktop.screensaver embedded-keyboard-command ''
org.gnome.desktop.screensaver embedded-keyboard-enabled false
org.gnome.desktop.screensaver idle-activation-enabled true
org.gnome.desktop.screensaver lock-delay uint32 0
org.gnome.desktop.screensaver lock-enabled false
org.gnome.desktop.screensaver logout-command ''
org.gnome.desktop.screensaver logout-delay uint32 7200
org.gnome.desktop.screensaver logout-enabled false
org.gnome.desktop.screensaver show-notifications false
org.gnome.desktop.screensaver status-message-enabled true
org.gnome.desktop.screensaver user-switch-enabled true
[admin@ipa ~]$
Comment 23 Dean Hunter 2013-06-13 16:53:17 EDT
This problem appears to have been resolved for me with updates in the last three months as I can no longer reproduce it.
Comment 24 Henrik Nordström 2013-06-13 18:35:25 EDT
There have been related patches that aim to prevent the screensaver from locking the screen while the keyboard is grabbed. And have indeed worked quite well in the last months. Have still happened that I have been left with a screen that looks like it's still locked but without login.

And in the latest updates the underlying problem of grabbed keyboards messing up the state seem to have resurfaced. Had the screen locked on one coputer today but keyboard was grabbed by an application so impossible to enter the password. And not fully locked either as Alt-TAB showed the running applications and Alt-F2 gave the run a command prompt, all ontop of the password entry box.
Comment 25 Fedora End Of Life 2013-12-21 04:27:44 EST
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 26 Fedora End Of Life 2014-02-05 08:11:45 EST
Fedora 18 changed to end-of-life (EOL) status on 2014-01-14. Fedora 18 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.