Bug 207966 - gnome-screensaver does not activate during a typing break
gnome-screensaver does not activate during a typing break
Status: CLOSED CANTFIX
Product: Fedora
Classification: Fedora
Component: gnome-screensaver (Show other bugs)
11
All Linux
urgent Severity urgent
: ---
: ---
Assigned To: jmccann
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-09-25 12:01 EDT by Jeffrey Moyer
Modified: 2015-01-14 18:19 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-11-01 18:35:32 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
debug log (22.40 KB, text/plain)
2009-07-01 12:14 EDT, udo
no flags Details

  None (edit)
Description Jeffrey Moyer 2006-09-25 12:01:49 EDT
Description of problem:

When the typing monitor forces a typing break, the screensaver cannot lock the
screen.

Version-Release number of selected component (if applicable):

gnome-screensaver-2.16.0-6.el5
control-center-2.16.0-5.fc6

How reproducible:
100%

Steps to Reproduce:
1.  configure smart card to lock when it is removed
2.  configure typing break for some interval
3.  when typing monitor forces a break, remove smart card

Actual results:
screensaver does not activate.  when the typing break is over, only the
application with focus is usable.


Expected results:
screensaver should activate.
Comment 1 Bug Zapper 2008-05-13 22:22:32 EDT
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 2 Jonathan Smith 2009-05-04 14:45:38 EDT
This is still a problem on Fedora 11 Beta / Rawhide 2009-05-04.

There should be a way to lock the screen automatically when a typing break is enforced. After all, the point is that you should walk away from your computer, and walking away from an unlocked computer isn't a great security practice.
Comment 3 Bug Zapper 2009-06-09 18:17:57 EDT
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  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 '9'.

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 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 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 please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

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.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 4 Jonathan Smith 2009-06-09 18:29:56 EDT
This is still a problem on fedora 11. Someone with permissions: please update the version affected so this isn't automatically closed.
Comment 5 udo 2009-07-01 10:56:29 EDT
I see this issue as well.
See https://bugzilla.redhat.com/show_bug.cgi?id=505915
Same issue?

ctrl-alt-L does work OK.
but inactivity does not activate the screensaver after one minute as I set stuff.
Comment 6 udo 2009-07-01 12:14:25 EDT
Created attachment 350141 [details]
debug log
Comment 7 udo 2009-07-01 12:14:43 EDT
Anything wrong in the log?
Comment 8 udo 2009-07-22 23:12:04 EDT
gnome-screensaver-2.26.1-3.fc11.x86_64 now, no change
Comment 9 Tim Taiwanese Liim 2009-08-13 15:27:17 EDT
Re: Comment #4, Comment #5, Comment #0
Jonathan,
Udo,
Do you need the "smart card" mentioned in Comment #0 to reproduce this
issue?  Comment #0 has
> Steps to Reproduce:
> 1.  configure smart card to lock when it is removed
> 2.  configure typing break for some interval
> 3.  when typing monitor forces a break, remove smart card
If not, what is the procedure you used to reproduce this issue in F11?
Comment 10 Jonathan Smith 2009-08-13 15:37:03 EDT
No, I do not need the smart card.

(simplified) Procedure to reproduce in f11:

1) In GNOME, click preferences, then keyboard
2) click typing break tab
3) Enable, set typing break to 1 minute
4) wait 1 minute
5) observe that the screensaver is not activated, nor is a password required upon end-of-tpyingbreak

Also, it only greys out the first (in my case, of two) monitors. You can still use the second monitor. This is filed separately as bug 448077, but I believe it would also be fixed if the typing break simply activated gnome-screensaver (which works properly on multi-head setups).
Comment 11 udo 2009-08-17 11:41:39 EDT
I am not using a smartcard. Just plain keyboard and mouse.
Comment 12 udo 2009-11-01 05:05:35 EST
if nothing happens with this bugreport, can we please at least somehow confirm that the root cause is NOT gnome screensaver?
Comment 13 Ray Strode [halfline] 2009-11-01 18:35:32 EST
Definitely not gnome-screensaver.  It's an inherent bug in the way X works.  Two apps can't have a grab at the same time.  typing break takes a grab, gnome-screensaver needs a grab to work.

Hard to solve problem without some infrastructural changes that aren't likely to happen for some time (One idea we've thrown around is moving lock screen to a different X server [gdm in "factory" mode]).

I'm going to close this CANTFIX right now, because it's going to be a while before a viable solution is implemented.
Comment 14 udo 2009-11-02 02:21:48 EST
Please suggest working alternative screensaver as this situation is a gaping security hole.
Please describe non-gnome-screensaver parts that need fixing.
Please describe with enough detail what needs fixing and why so that it can be fixed indeed.

Optionally: Please explain why it doesn't work on my system yet it apparently does on other peoples' systems.
Comment 15 Ray Strode [halfline] 2009-11-02 08:06:18 EST
Hi,

I don't think there are currently any screensaver implementtations that can work this way.  If a screensaver did work, then it would be working without taking a grab, so it wouldn't be securely locked.

I guess a screensaver could be written that takes a "server" grab instead of a mouse and keyboard grab, but then your network connections would get cut while the screen is locked because single threaded apps would be blocked on the first X call they do until ungrab.

One way to fix this issue is to integrate typing break and gnome-screensaver.  That way they aren't both competing for the same grab.  Instead, the screensaver would come on and not let you unlock until typing break is over.  That kind of integration would need to be filed as an upstream bug report at bugzilla.gnome.org

Another way to fix this issue, I metnioned in comment 13.  GDM (the login screen) has this concept of "factory" mode that we don't enable by default.  If we did enable it by default, then gnome screesaver could defer to it for the lock screen dialog.

Another option would be for X to provide an extension that lets one client forcefully take grabs from another client.

Another option would be for X to provide a different mechanism for securing the keyboard, mouse, and screen specifically for screensaver applications that didn't involve grabs.

This issue will be eventually fixed, but it's not going to get fixed in the near term.
Comment 16 udo 2009-11-02 09:42:45 EST
a) it worked
b) it ships as a default for gnome installs
c) now all of a sudden it is a problem
d) assuming proper management
e) how come?


ps: *what* way? why is this way necessary? do we need http://ubuntuforums.org/showthread.php?t=195557 ? do we understand the gaping security issues because of this? do we understand the picture that gnome reaffirms this way? See https://bugzilla.gnome.org/show_bug.cgi?id=47948 .
i would like this bug to block fedora 12.
yes. I mean this. even the most basic things go wrong.
Comment 17 udo 2009-11-02 09:58:28 EST
btw: description of 'gnome-screensaver does not activate during a typing break' does not properly describe the situation you try to explain.
Comment 18 Ray Strode [halfline] 2009-11-02 16:11:19 EST
Hi,

I don't see how this could have ever worked for gnome-screensaver or xscreensaver modulo security bugs in those programs.  For the same reason the screen doesn't lock when a menu is sitting open.

X has this concept called "grabs".  There are three types of grabs:

1) Keyboard Grabs
2) Pointer Grabs
3) Server Grabs

A "grab" means that all events on the display go to one program.  So if a program has a pointer grab, then it will get mouse events even if the mouse is used on a part of the screen that the program isn't covering.

Likewise, if a program has a keyboard grab, then it will get all key presses even if the program doesn't have focus.

If a program has a server grab, then all programs but that program are frozen until that program with the server grab ungrabs.

Typing break takes a keyboard grab (and maybe a pointer grab, not sure) so when you type the key presses get ignored.

Screensaver takes a keyboard and pointer grab for security reasons. Those grabs are what effectively make the screen "lock".  Without them you could hit alt-tab while the screen was locked and change focus to another application and start using it.

Since both apps want grabs, if one is running the other won't be able to get grabs.  Screensaver refuses to lock if it can't get grabs because showing a locked screen that you can alt-tab out of is irresponsible.  This is a long standing issue and it won't get fixed for F12.

It is a known issue that will eventually be addressed, though.
Comment 19 Ray Strode [halfline] 2009-11-02 16:22:01 EST
Note, as soon as the typing break is over the screensaver should immediately lock because it will keep retrying to lock until the pointer and keyboard are available to grab.
Comment 20 Tim Taiwanese Liim 2009-11-03 12:21:57 EST
Ray,
Appreciate your super clear explanation!  Now it made sense to me. 

Re: Comment #15
> One way ... is to integrate typing break and gnome-screensaver. 
This makes a lot of sense to me.

Note You need to log in before you can comment on or make changes to this bug.