{"id":19,"date":"2013-07-29T12:13:00","date_gmt":"2013-07-29T12:13:00","guid":{"rendered":"http:\/\/www.hauweele.net\/~gawen\/blog\/?p=19"},"modified":"2014-05-12T19:37:03","modified_gmt":"2014-05-12T17:37:03","slug":"xscreensaver-slow-to-lock","status":"publish","type":"post","link":"https:\/\/hauweele.net\/~gawen\/blog\/?p=19","title":{"rendered":"XScreenSaver slow to lock"},"content":{"rendered":"<p>I already posted an article about the impact of a slow XScreenSaver when you suspend your machine. However if you wait for the screen to be effectively locked then a slow XScreenSaver will annoyingly delay going into sleep. The same apply if you often use your keyboard to lock your screen. And when I say slow I mean you can wait up to 6 entire seconds or more before you screen is effectively locked.<\/p>\n<p>The reason behind this may be that some other program is grabbing the mouse or keyboard. If you want to investigate you may turn on XScreenSaver&#8217;s verbose mode and start it manually. Modify these two lines in <i>~\/.xscreensaver <\/i>:<\/p>\n<pre>verbose: False\r\ncaptureStderr: False<\/pre>\n<div>And now start <i>xscreensaver <\/i>in a terminal and issue a lock with <i>xscreensaver-command<\/i>. You may see something like this :<\/p>\n<pre>xscreensaver: 20:10:22: LOCK ClientMessage received; activating and locking.\r\nxscreensaver: 20:10:22: 0: locked mode switching.\r\nxscreensaver: 20:10:22: user is idle (ClientMessage)\r\nxscreensaver: 20:10:22: blanking screen at Mon Jul 29 20:10:22 2013.\r\nxscreensaver: 20:10:22: 0: grabbing keyboard on 0x81... GrabSuccess.\r\nxscreensaver: 20:10:22: 0: grabbing mouse on 0x81... AlreadyGrabbed.\r\nxscreensaver: 20:10:23: 0: grabbing mouse on 0x81... AlreadyGrabbed.\r\nxscreensaver: 20:10:24: 0: grabbing mouse on 0x81... AlreadyGrabbed.\r\nxscreensaver: 20:10:25: 0: grabbing mouse on 0x81... AlreadyGrabbed.\r\nxscreensaver: 20:10:26: couldn't grab pointer!  (AlreadyGrabbed)<\/pre>\n<p>As you can see, XScreenSaver desperately tries to grab the mouse and refuses to lock until it finally gives up four seconds later. In my case it was <i>unclutter<\/i>\u00a0which was grabbing it. Moreover I was using the <i>-grab<\/i>\u00a0option and I guess this was causing the problem so you may just start the command this way instead :<\/p>\n<pre>unclutter -idle 5 -root &amp;<\/pre>\n<p>&nbsp;<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>I already posted an article about the impact of a slow XScreenSaver when you suspend your machine. However if you wait for the screen to be effectively locked then a slow XScreenSaver will annoyingly delay going into sleep. The same &hellip; <a href=\"https:\/\/hauweele.net\/~gawen\/blog\/?p=19\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[57,59,56,63,62,61,58,64,60,55],"class_list":["post-19","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-alreadygrabbed","tag-debug","tag-grab","tag-lock","tag-mouse","tag-slow","tag-unclutter","tag-verbose","tag-xscreensaver","tag-xscreensaver-command"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=\/wp\/v2\/posts\/19","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=19"}],"version-history":[{"count":0,"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=\/wp\/v2\/posts\/19\/revisions"}],"wp:attachment":[{"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=19"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=19"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=19"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}