gnome screensaver activation is hindered by unobscure routine

Bug #779639 reported by Robert Lange
28
This bug affects 2 people
Affects Status Importance Assigned to Milestone
GNOME Screensaver
Expired
Medium
OEM Priority Project
Won't Fix
Medium
Unassigned
Natty
Won't Fix
Medium
Unassigned
Oneiric
Invalid
Undecided
Unassigned
gnome-screensaver (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

Binary package hint: gnome-screensaver

The problem occurs in Natty, using the Unity desktop. I have not tried the old-style desktop to see if it also affects that.

https://bugzilla.gnome.org/show_bug.cgi?id=649755

I have reported upstream a bug in Gnome Screensaver that is preventing my screensaver from activating during session timeout. The symptom is that the session times out, the screen fades to black, and then immediately returns to the desktop. The symptoms are similar to Bug #241206 and Bug #363635, but the cause is different than those bugs.

Summary of upstream bug report:

The problem is caused in gs-manager.c by the function window_obscured_cb. This function is called when the screensaver window is obscured (i.e., when fast user switching swaps to another VT) or unobscured (i.e., switching back to the VT). In addition to attempting to disable or re-enable the screensaver animation, when the screensaver is unobscured the callback automatically makes a request to unlock the screen. This saves the user from having to press a key or wave their mouse around to bring up the unlock dialog.

My problem is that, for reasons I do not understand, my screensaver thinks, every time it activates due to session timeout, that its window is obscured briefly. window_obscured_cb is called twice in rapid succession, once for obscure, then again for unobscure. Because I do not use the screensaver lock feature, this means that, on the unobscure call, the screensaver is
deactivated. Thus, my screensaver will never activate due to a session timeout.

I have verified that the obscured window event is the reason for the screensaver deactivation using the debugging output.

I have attached a patch in the upstram bug report that fixes the problem by removing the line that calls the screensaver unlock automatically as a result of an unobscure event.

Tags: patch
Robert Lange (rcl24)
description: updated
Changed in gnome-screensaver:
importance: Unknown → Medium
status: Unknown → New
Changed in gnome-screensaver (Ubuntu):
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Shih-Yuan Lee (fourdollars) wrote :

This patch can help to fix this issue.

tags: added: patch
Revision history for this message
Shih-Yuan Lee (fourdollars) wrote :

I also prepare ppa:fourdollars/gnome-screensaver.

Revision history for this message
Chris Van Hoof (vanhoof) wrote :

Consolidating this bug into one report. Ayan, can you take a look at the patch in comment #1 to see if this is something that might make sense for a SRU, or submission upstream?

Cheers,
Chris

Changed in oem-priority:
status: New → Confirmed
importance: Undecided → Medium
Changed in gnome-screensaver (Ubuntu):
assignee: nobody → Ayan George (ayan)
status: Triaged → Confirmed
importance: Low → Medium
Changed in oem-priority:
assignee: nobody → Chris Van Hoof (vanhoof)
Revision history for this message
gbmidd (gbmidd) wrote :

I'm experiencing the same problem, using the Classic Desktop without effects. I'm not sure what gave rise to this problem, b/c my system only started demonstrating this problem recently. I checked the output of gnome-screensaver --no-daemon --debug and see the same thing as Robert.

Revision history for this message
Jason (themacster) wrote :

I am experiencing this problem on Natty. I recently re-installed, but initially didn't experience the problem. It has only been the last few days that this very annoying bug has hit me. I have tried lots of "fixes" but still have screen to black to full desktop all the time.

Revision history for this message
Robert Lange (rcl24) wrote :

Jason: Do you have a screensaver password that activates immediately when the screensaver activates? If you do, then instead of deactivating the screensaver, it will simply pop up the password dialog box.

In either case, did you apply my patch listed in the Gnome Bugzilla linked to this bug, and rebuild the screensaver?

http://bugzilla-attachments.gnome.org/attachment.cgi?id=187479

That patch *does* fix this bug. I cannot understand why the patch was not accepted, or at least, why no Gnome or Ubuntu developers even commented on it. It is a relatively simple explanation and solution that any developer should be able to confirm.

Revision history for this message
Robert Lange (rcl24) wrote :

This is the same patch as the one I submitted to the Gnome Bugzilla. Since no one ever commented on it there or here, I am explicitly submitting it here for consideration.

Revision history for this message
Ayan George (ayan) wrote :

I'll see if I can get this some attention on Tuesday.

Revision history for this message
Alex Steve Giménez (areku-the-of) wrote :

I've recently came across this problem too. I was installing some Unity quicklists using Confity 1.6 and then the problem started. Maybe God knows if Confity is the cause of my problems. Also (and please forgive me for asking), how do I apply this patch? I tried the repo posted above (posted by Shih-Yuan Lee) but that did not work for me. Thanks in advance!

Revision history for this message
Robert Lange (rcl24) wrote :

Truth be told, I never understood what Shih-Yuan Lee's patch did or how it addressed this bug. My patch is much simpler, but it only addresses a symptom of the bug (the unobscure routine deactivating the screensaver) rather than the underlying bug (why is the obscure/unobscure routine called at every invocation of the screensaver?). Of course, a patch of a particularly annoying symptom is still better than no patch for the underlying cause...

To apply the patch, you must use the Debian package building system to rebuild the gnome-screensaver package. It's very easy to apply if you are familiar with that system, but it's beyond the scope of this bug tracker to provide directions.

Revision history for this message
Robert Lange (rcl24) wrote :

Since Ubuntu 11.10 effectively eliminated gnome-screensaver, I no longer see this bug in that release.

Revision history for this message
James M. Leddy (jm-leddy) wrote :

Marking invalid since this was filed against 11.10, and 11.10 eliminated gnome-screensaver.

Revision history for this message
Chris Van Hoof (vanhoof) wrote :

While Oneiric no longer makes sense here we do have potential fix candidates for Natty. Adding a Natty task here.

Revision history for this message
Kevin Krafthefer (krafthefer) wrote :

no longer effecting hwe

Changed in oem-priority:
status: Confirmed → Won't Fix
Chris Van Hoof (vanhoof)
Changed in oem-priority:
assignee: Chris Van Hoof (vanhoof) → nobody
Changed in gnome-screensaver (Ubuntu):
assignee: Ayan George (ayan) → nobody
Revision history for this message
Robert Lange (rcl24) wrote :

I have marked this bug invalid because the bug exists (might still exist) in a package that is no longer used by default in current Ubuntu releases.

Changed in gnome-screensaver (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

Huh? gnome-screensaver is still used by default in Ubuntu.

Revision history for this message
Robert Lange (rcl24) wrote :

Let me rephrase: the mechanism by which this bug exists is no longer in current releases of Ubuntu by default (Unity does its own thing to activate screen blanking/lockout), and it is crystal clear that in older releases of Ubuntu, this is a "Won't fix".

Changed in gnome-screensaver:
status: New → 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.