Jump to content
sid

Since upgrading to High-Sierra "lock" takes 5-10 seconds to lock the screen [Fixed 3.6 b893 pre-release]

Recommended Posts

Since upgrading to High-Sierra "lock" takes 5-10 seconds to lock the screen.

 

I'm sure this wasn't the case prior to the upgrade.

 

Share this post


Link to post
Share on other sites

Hi @sid and welcome to the forum!

 

We recommend setting "Require password after sleep" and using the "sleepdisplays" keyword instead, which is much more reliable. 

 

You can even disable the "lock" action and rename "sleepdisplays" to it instead, if it helps with your habits :)

 

Cheers,
Vero

Share this post


Link to post
Share on other sites
1 hour ago, Vero said:

We recommend setting "Require password after sleep" and using the "sleepdisplays" keyword instead, which is much more reliable. 

 

Unfortunately that has a fundamental difference, and I predict many people won’t like the alternative (me included). I never forget to Lock when I go away and never want my screen to lock when I’m close and it turns off (more often than not it’s because I stopped to talk and am still in front of my machine; I don’t want to reenter my password).

 

It was suggested in another thread that even the macOS CLI command for locking ("/System/Library/CoreServices/Menu Extras/User.menu/Contents/Resources/CGSession" -suspend) may be slow. Can you confirm that, @sid? If it is still slow, then this is a macOS issue (not an Alfred one) and you should instead open a bug report with Apple.

Edited by vitor

Share this post


Link to post
Share on other sites

thank you vero and vitor.

 

I'll use sleepdisplays, bug logged, I'll update if I get any feedback

Edited by sid

Share this post


Link to post
Share on other sites

Hi all - I'm getting the same issue, I use the function every day when I step up from my mac and it's become ingrained in me to lock the machine when I am at work.

@Sid , i you get any more info would you mind updating here?

Share this post


Link to post
Share on other sites

I'm going to make do with the sleepdisplays until I hear back from Apple.  

 

One gotcha with this solution is some displays  ( mine included ) don't reliably wake after being put to sleep and a reboot is necessary. :unsure: 

Edited by sid
spelling

Share this post


Link to post
Share on other sites

I think I'd rather stick to Lock than to use something that could screw any displays up, it's worth noting that the Lock function does work, it locks the screen right away it just takes 10-15 seconds to update the screen toothed locked state.

I wouldn't rely on Apple getting back to you any time soon!

Share this post


Link to post
Share on other sites

Is there no way of triggering the native "Lock Screen" function? This is now in the Mac Menu in High Sierra, and available with the (awkward) shortcut of Ctrl-Cmd-Q. It's also available to map to the Control Strip on the Touch Bar, and definitely the quickest of the three options.

 

I think Sleep Displays works best for me at the moment, I can confirm that the issue with the existing "lock" command in Alfred is that now "/System/Library/CoreServices/Menu Extras/User.menu/Contents/Resources/CGSession" -suspend takes a long time.

Share this post


Link to post
Share on other sites

Here is a super simple workflow which uses keyword ('simlock' by default) and simulates ctrl-cmd-q.

 

---- LINK REMOVED ---

Note: this is now fixed in 3.6 b893 pre-release, so workflow is no longer needed

 

Note @Tetsugaku you'll need the Powerpack for this - if you already have this, could you please fill in your registered PP address in the forum profile, this is only visible to admins.

 

Cheers,

Andrew

Share this post


Link to post
Share on other sites

Hello and thanks for that (PP email updated). I disabled the system command lock in Alfred, renamed the WF to Lock and it seems to be working great at this stage - thanks for the input. Not sure if its worth updating core Alfred to work in  a similar way. thanks again

Share this post


Link to post
Share on other sites

Great workflow. Thanks for that. If anybody could update on the status of fixing the "lock" native command, that would be great. Call me OCD, but I'd prefer to use that as opposed to a workflow. Great stuff either way, thanks guys, for all the hard work! 

Share this post


Link to post
Share on other sites

Just saw this, was suffering from slow locks for a while and only now when somebody else upgraded to High Sierra was I led to a search and a fix!

+1 on adding this to the default behavior if it's "allowed" by apple.

Share this post


Link to post
Share on other sites

@jerman885 @altryne In case you hadn't noticed, the solution provided as a workflow here is by @Andrew (the creator of Alfred).

 

As such, if the "lock" command is fixed in Alfred itself - which is likely to be the case - it would be identical to the workflow (but built into Alfred behind the scenes), so the most expedient way to resolve this for now is to replace the default "lock" keyword with Andrew's workflow :)

 

Cheers,
Vero

Share this post


Link to post
Share on other sites

Note that this is now part of the Fixed 3.6 b893 pre-release, so no need to download the workflow. If you are already using the workflow, you can revert to using the built-in lock command :)

Share this post


Link to post
Share on other sites

Thanks Andrew. I look forward to testing this as well....

 

If only it was so easy to get apple to fix their slept display, not waking bug ;)

 

 

Share this post


Link to post
Share on other sites

It would be great if you could still supply the link to the workaround script here for people still using Alfred 2 (like myself).

Share this post


Link to post
Share on other sites
23 minutes ago, Olaf said:

It would be great if you could still supply the link to the workaround script here for people still using Alfred 2 (like myself).

 

I think the workaround Workflow used an Alfred 3-only feature (simulating keypresses), so it wouldn’t be useful for people on Alfred 2.


The following should work for you (untested, as I’m not yet on High Sierra). Connect a Keyword to a Run Script with Language /usr/bin/osascript (AS) and code:

tell application "System Events" to keystroke "w" using {control down, command down}

Share this post


Link to post
Share on other sites

Thanks vitor,

 

I am now using a "Run NSAppleScript" workflow command with the following content and it works fine:

 

on alfred_script(q)
  tell application "System Events"
    keystroke "q" using {control down, command down}
  end tell
end alfred_script

Share this post


Link to post
Share on other sites

×
×
  • Create New...