Find what's preventing Mac from sleeping

If Mac is failing to go to sleep or is waking up unexpectedly, you can run pmset -g log | egrep '\b(Sleep|Wake|Start)\s{2,}' in terminal to inspect last sleep/wake events

pmset -g log | egrep '\b(Sleep|Wake|Start)\s{2,}'

In the example above there are two wake events:

  • due to HID Activity - most likely user pressed a keyboard key or moved the mouse

  • due to EC.LidOpen/UserActivity - This one is pretty obvious: the laptop lid was opened

 To see what's currently preventing laptop for sleeping you can run pmset -g

pmset -g

The above screenshot shows three processes/components preventing sleep (addressbooksourcesync, sharingd, UserEventAgent). In practice, sleep may still be possible, but it's a good starting point troubleshooting sleep, or waking up issues.

Another useful command which shows more detailed info on processes preventing sleep is: pmset -g assertions

April 2020
macOS Catalina

 

Newsletter

Subscribe to receive occasional updates on new posts.
Your email will not be used for any other purpose and you can unsubscribe at any time.
Please wait