"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, even on the current beta 10.0d4

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"

1 Like