ingenol Posted November 17, 2021 Share Posted November 17, 2021 Steps to replicate: 1. Launch alfred 2. Select "Sleep" 3. Expected: machine sleeps 4. Actual: screen goes black as if to sleep but immediately "unsleeps". This happens consistently every time. Alfred version: 4.6 [1266] MacOS version: 12.0.1 (16" MBP Pro M1 Max) It appears that others on Reddit are having this issue as well. Choosing sleep from the Apple menu works properly, just not when using Alfred. Link to comment Share on other sites More sharing options...
vitor Posted November 17, 2021 Share Posted November 17, 2021 (edited) Does this Workflow work for you? It also uses sleep as a Keyword, though it has no icon. Edited February 24, 2022 by vitor Updated Workflow link Link to comment Share on other sites More sharing options...
ingenol Posted November 20, 2021 Author Share Posted November 20, 2021 On 11/17/2021 at 6:07 PM, vitor said: Does this Workflow work for you? It also uses sleep as a Keyword, though it has no icon. Yes, the workflow works properly. It is just the built-in system command that does not. Link to comment Share on other sites More sharing options...
Andrew Posted November 21, 2021 Share Posted November 21, 2021 @ingenol this should now be fixed in b1271 pre-release, could you please update and try Alfred's built-in sleep command? Link to comment Share on other sites More sharing options...
ingenol Posted November 21, 2021 Author Share Posted November 21, 2021 1 hour ago, Andrew said: @ingenol this should now be fixed in b1271 pre-release, could you please update and try Alfred's built-in sleep command? Thank you, this appears to be working now! Link to comment Share on other sites More sharing options...
burtyish Posted January 12, 2022 Share Posted January 12, 2022 (edited) @Andrew, the sleep command has stopped working for me. I'm on version 4.6.1 [1274]. I'm not sure whether the issue started before or after upgrading to this version. Selecting "Sleep" from the native Mac (apple) menu works OK. I thought I'd try out the workflow shared here above, but the link is no longer active (https://transfer.sh/h8mSo7/Sleep.alfredworkflow). Any idea what I can do?edit: OS version is macOS Big Sur 11.6 (20G165) Edited January 13, 2022 by burtyish Link to comment Share on other sites More sharing options...
Vero Posted January 12, 2022 Share Posted January 12, 2022 @burtyish Welcome to the forum. You need to ensure you've granted Alfred Automation access to System Events for this. Open your macOS Security & Privacy preferences > Privacy > Automation, and check that under Alfred 4 "System Events" is ticked. If this box is already checked: - Quit Alfred - uncheck the box and re-check it in case macOS has lost resolution of the existing permissions - Restart Alfred Let me know how you get on Link to comment Share on other sites More sharing options...
burtyish Posted January 13, 2022 Share Posted January 13, 2022 @Vero YES! That did the trick, thank you so much! Totally worth joining the forum I had no idea this was the problem since I'd been using this function on Alfred successfully for years now. Guess the latest version update changed things. Link to comment Share on other sites More sharing options...
remi_freamon Posted February 23, 2022 Share Posted February 23, 2022 (edited) Hello! First time poster but a long-term Alfred user/fan here. I must say that I can't get the sleep command to work. Steps to replicate: 1. Launch alfred 2. Select "Sleep" 3. Expected: machine sleeps 4. Actual: Alfred's UI disappears but nothing else happens Alfred version: 4.6.3 [1285] MacOS version: 12.2.1 (MacBook Air M1) Troubleshooting steps attempted: * disabling/enabling permissions (Accessibility and System Events) * restarting the machine * testing other system comments, e.g., Lock and Sleep displays work as expected * creating a workflow with a sleep system command (no luck) * checking system console for error entries and I consistently see 2 entries appearing Launchd didn't have information for pid 2030, reason: Error Domain=NSPOSIXErrorDomain Code=113 "Unknown error: 113" (the pid changes each time and when I try to find it in Activity Monitor, I can't find it) followed by Error reading receipt: Error Domain=NSCocoaErrorDomain Code=256 "The file “receipt” couldn’t be opened." UserInfo={NSFilePath=/usr/bin/osascript/Contents/_MASReceipt/receipt, NSUnderlyingError=0x12e623420 {Error Domain=NSPOSIXErrorDomain Code=20 "Not a directory"}} The last thing I want to add is that although I can't reproduce it, the first time I was troubleshooting permissions and checking the Activity Monitor I saw multiple instances of a process called sleep and for all those instances it was an Intel process running via Roseta2. Alfred is an Apple (arm) process. Edited February 23, 2022 by remi_freamon Link to comment Share on other sites More sharing options...
vitor Posted February 23, 2022 Share Posted February 23, 2022 What about this Workflow, does it work for you? Link to comment Share on other sites More sharing options...
remi_freamon Posted February 23, 2022 Share Posted February 23, 2022 16 minutes ago, vitor said: What about this Workflow, does it work for you? No, it doesn't. However, I've just realized this may have nothing to do with Alfred. For some reason, the Sleep command is disabled by macOS. The option is greyed out in the menu (see screenshot). Judging by this reddit thread, I'm not the only facing this problem. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now