After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 316558 - gnome-screensaver drops first keys pressed
gnome-screensaver drops first keys pressed
Status: RESOLVED FIXED
Product: gnome-screensaver
Classification: Deprecated
Component: dialog
0.0.x
Other Linux
: High normal
: ---
Assigned To: gnome-screensaver maintainers
gnome-screensaver maintainers
Depends on:
Blocks:
 
 
Reported: 2005-09-17 10:32 UTC by Ruben Vermeersch
Modified: 2005-09-22 13:46 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ruben Vermeersch 2005-09-17 10:32:03 UTC
Version details: 0.0.13-0ubuntu3
Distribution/Version: Ubuntu Breezy

(This bug has also been submitted in the ubuntu bugzilla as #15615:
http://bugzilla.ubuntu.com/show_bug.cgi?id=15616 )

When switching breezy from xscreensaver to gnome-screensaver, there was a
usability regression:

With xscreensaver, you could instantly type your password & have your screen
unlocked,
with gnome-screensaver, you first have to press a key, or move the mouse, wait
until the password screen appears, and only then, you can enter your password.
Keys pressed before the window pops up are dropped.

Now I'm not sure whether this is a security measure of some kind, but it's
rather annoying if you can't enter your password immediately, something that has
been possible (and handy) since the first version of Ubuntu.

Is this old functionality possible?
Comment 1 Brent Smith (smitten) 2005-09-18 01:45:53 UTC
I can confirm this behavior.  Marking as NEW.
Comment 2 William Jon McCann 2005-09-19 14:15:26 UTC
This is related to the problem of there being a delay between the activity and
the dialog appearing.

Part of the problem is that Ubuntu doesn't use PAM authentication for the
screensaver.  So, every time the dialog pops up the setuid dialog process must
initialize the password authentication mechanism before dropping the root
privileges.
Comment 3 Oliver Grawert 2005-09-20 14:50:38 UTC
note that g-s-s in ubuntu is compiled with pam support. xscreensaver uses a
typeahead capture function for this issue, regardless if used with or without pam.
Comment 4 William Jon McCann 2005-09-20 14:58:07 UTC
Excellent.  Does it still use setuid root for the gnome-screensaver-dialog
process?  Turning that off will force the init functions to return faster.

Could you #define the PROFILE_LOCK_DIALOG in gs-lock-plug.c and
gnome-screensaver-dialog.c, rebuild, and run gnome-screensaver-dialog from a
commandline and post the output here?
Comment 5 Oliver Grawert 2005-09-20 16:00:52 UTC
voila
----------------------------

MARK 1127232000.801392: gnome-screensaver-dialog.c:76: main start
MARK 1127232000.801671: gnome-screensaver-dialog.c:78:    
privileged_initialization start
MARK 1127232000.876717: gnome-screensaver-dialog.c:78:    
privileged_initialization end
MARK 1127232000.973758: gnome-screensaver-dialog.c:78:     lock_initialization start
MARK 1127232000.973914: gnome-screensaver-dialog.c:78:     lock_initialization end
MARK 1127232001.062495: gnome-screensaver-dialog.c:78:     popup_dialog_idle start
MARK 1127232001.150954: gs-lock-plug.c:74: gs_lock_plug_init start
MARK 1127232001.152483: gs-lock-plug.c:76:     gs_lock_plug_init start page one
MARK 1127232001.233877: gs-lock-plug.c:76:     gs_lock_plug_init end page one
MARK 1127232001.233993: gs-lock-plug.c:76:     gs_lock_plug_init start page two
MARK 1127232001.315871: gs-lock-plug.c:76:     gs_lock_plug_init end page two
MARK 1127232001.316603: gs-lock-plug.c:76:     gs_lock_plug_init start buttons
MARK 1127232001.400905: gs-lock-plug.c:76:     gs_lock_plug_init end buttons
MARK 1127232001.401251: gs-lock-plug.c:74: gs_lock_plug_init end
MARK 1127232001.401476: gs-lock-plug.c:74: gs_lock_plug_show start
MARK 1127232001.401553: gs-lock-plug.c:76:     gs_lock_plug_show start parent
MARK 1127232001.858299: gs-lock-plug.c:76:     gs_lock_plug_show end parent
MARK 1127232001.939628: gs-lock-plug.c:74: gs_lock_plug_show end
MARK 1127232001.939739: gnome-screensaver-dialog.c:78:         print_id start
WINDOW ID=0x3800003
MARK 1127232001.939981: gnome-screensaver-dialog.c:78:         print_id end
MARK 1127232001.940043: gnome-screensaver-dialog.c:78:     popup_dialog_idle end
MARK 1127232002.026297: gs-lock-plug.c:74: setup_treeview start
MARK 1127232002.110398: gs-lock-plug.c:76:     populate_model start
MARK 1127232002.197944: gs-lock-plug.c:76:         populate_model start FUSA
list users
MARK 1127232002.284709: gs-lock-plug.c:76:         populate_model end FUSA list
users
MARK 1127232002.369478: gs-lock-plug.c:76:     populate_model end
MARK 1127232002.454979: gs-lock-plug.c:74: setup_treeview end
Comment 6 William Jon McCann 2005-09-22 13:46:53 UTC
Looks like startup time is now limited by GTK+ showing the widget so there are
only minimal gains to be had there.  The other part of the problem should now be
fixed in CVS.

2005-09-22  William Jon McCann  <mccann@jhu.edu>

	* src/gs-window-x11.c (forward_key_events, remove_key_events) 
	(socket_show, gs_window_dialog_finish, queue_key_event) 
	(gs_window_real_key_press_event, gs_window_finalize):
	Queue up key press events before the unlock dialog
	is shown and replay them as soon as it is visible.
	Fixes #316558.
	(gs_window_real_key_press_event) 
	(gs_window_real_motion_notify_event): Don't try to
	request an unlock if there is already a socket since
	this means that a dialog has already been requested.