"Sleep Screen" Action Not Working on M1 Mac

It appears that the "sleep screen" action no longer works in new macs.

No matter how I construct the Macro, I can't get Keyboard Maestro to perform this action.

Has anyone else experienced this?

I know that the new Macs have had some display issues.

It would be great if this could be fixed. I really like the action!

I'm running
MacBook Pro (13-inch, M1, 2020);
MacOs 11.2
KeyBoard Maestro: 9.2

Curious. I tried using an old-faithful Terminal command for this

	/usr/bin/pmset displaysleepnow

and received two similar errors:

"pmset: Failed to put the display to sleep, error 1006”

"pmset: Failed to put the display to sleep, error 1004”

I wonder if the Keyboard Maestro action not working is related to pmset not working.

MacBook Air (M1, 2020)
Keyboard Maestro 9.2
macOS version 11.2 (20D64)

Hailing @peternlewis who can probably shed some more light on this.

1 Like

Could be because the sleep action works by talking to the IO registry.

There are a few hardware related things that don't seem overly happy to be controlled in Big Sur.

I'm probably going to bite the bullet and update my dev Mac to Big Sur shortly which will make debugging these things a bit easier, though whether there is any solution is an open question.


Poor man's solution - I was having the same issue, where IF I could get a macro to get it to sleep, it was popping back on again. I tried running a macro to manually hit a hot corner, but the only one that seemed to work was the upper left, which I kept activating by accident with my cursor. So:

I just recorded the screen actions of going to the Apple menu then down arrow & select Sleep - it ain't pretty but it works perfectly!

1 Like


/usr/bin/pmset displaysleepnow

Now works on the latest Monterey Beta -- #9, I think: macOS version 12.0 (21A5543b) but Keyboard Maestro's "Sleep Screen" still does not work.

So if you want to sleep the screen, you can use a shell script like this:

There should be no results to display in a window, but if there is an error, that should appear in the window… which is why I chose "Display Results in a Window"

UPDATE 2021-11-03

In Monterey, pmset displaysleepnow works.

In Keyboard Maestro 10, "Sleep Screen" now works.


I am working on a 2021 M1 Mac. pmset displaysleepnow works from the Terminal, but not from icanHazShortcut.

I used AppleScript to do the same:

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

1 Like

Not that it matters much anymore, now that Apple seems to not care about the problems M1 Macs are having with sleep issues.

All sleep tweaks are not working for me on my M1 Mac mini, and they do on my 2017 Intel 27" iMac. And what is worse for me, I cannot WAKE UP my M1 Mac mini most of the time, except by pressing the on/off button slightly. This with my Monitor connected via USB-C connection.

But neither Apple Support, nor the very active Podcasters have ever taken up this issue, which is known: sleep macro/tweaks not working and impossibility to wake up the M1 Macs.

You've caused me to reconsider something. Up until very recently I was using a 2013 Mac Pro. Running Monterey, it was demonstrating all kinds of issues near the end there. One such issue was it would occasionally fail to wake from or the screensaver. As I say, this was just one of any issues my trusty old friend began to exhibit.

Last week I switched up to a Mac Studio. All those pesky issues went away..except one time when it wouldn't wake. It was an isolated event, but…

I wonder if this could be an issue with Monterey rather than the M1? I just put it out there for consideration.

Hi Devoy,

I have been complaining about this issue of M1 Mac not waking up easily. I have heard of two possible causes:

1.- Bluetooth in the M1 Mac mini specific model. My take is that while it being possible, it is not only that, since my Mac mini has the same problem with my Mac keyboard plugged in via Lightning.
2.- Software in Monterrey. If this is the case, it only affects my M1 Mac mini. The other two Macs I use, both Intels ( 2017 27" iMac and 2015 MBP 13") are running exactly the same version of Monterey.

I will narrow it down though. This only happens when my Display is connected via USB-C. It is much quicker to wake up when it is connected via HDMI.

Your shell script works perfectly for me and it's really helpful. For some reason, my Mac's screens were staying on all night and I wanted to save the screens and also the electricity. I figured Keyboard Maestro could do it, and at first I did "Decrease Screen Brightness" several times but my two external monitors would not go all the way black. With your script, which I have set up to trigger at 1:30 a.m., they go black instantly. Thank you so much!

1 Like