Bug 19414

Summary: "xdg-screensaver suspend" when gnome-screensaver timeout is 1 min. froze the session.
Product: Portland Reporter: Daniel Yek <dyek>
Component: xdg-utilsAssignee: Fathi Boudra <fabo>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: medium    
Version: 1.0   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: xdg-screensaver patch for the 59-second problem.

Description Daniel Yek 2009-01-05 17:33:51 UTC
Created attachment 21708 [details] [review]
xdg-screensaver patch for the 59-second problem.

"xdg-screensaver suspend" when gnome-screensaver timeout is 1 min. froze the session.
Fixing xdg-screensaver 59 seconds bug.

Here is the problem description and a simple patch.

This command suspends the Screen Saver operation. 
$ xdg-screensaver suspend <a window id> 

That is, this to prevent the Screen Saver from kicking in (activating).
This "inhibits" the Screen Saver from operating.

xdg-screensaver implements this suspend operation by spawning a 
background process to loop and 
poke gnome-screensaver or SimulateUserActivity.


PROBLEM:
This xdg-screensaver utility failed to work if 
gnome-screensaver timeout is set to 1 min. 
(that is, gnome-screensaver is set to "regard as idle after 1 min".)

As xdg-screensaver sleeps for 59 seconds and then waking up to poke
gnome-screensaver (SimulateUserActivity), 
gnome-screensaver has already started fading.

When the SimulateUserActivity occurs, gnome-screensaver appears to 
fall into inconsistent state, where it neither activate, nor deactivate.
That is, gnome-screensaver fade in and "freeze" the desktop session -- 
from there on, it will not show the password authentication screen 
anymore and the user lost control of the working session. 

SOLUTION:
This is a gnome-screensaver bug, 
but if xdg-screensaver only sleeps for 50 seconds instead of 59 seconds, 
it will be able to wake up in time, this problem doesn't happen.

Files Modified:
scripts/xdg-screensaver
Comment 1 Fathi Boudra 2009-07-26 10:41:45 UTC
Fixed in CVS

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.