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

 

No comments

Leave your comment

In reply to Some User
Captcha Image