Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

hyperknot

macrumors member
Original poster
Dec 22, 2018
33
6
Hi, how can I debug why doesn't my Macbook go to sleep? Usually it works, but sometimes it doesn't.

When it doesn't work:
- the external display stays on forever
- clicking the Sleep button in the Apple menu doesn't do anything

macOS is 14.7

I tried this command while clicking sleep:

Code:
pmset -g assertionslog|grep -i sleep
   PreventUserIdleDisplaySleep    0
   PreventSystemSleep             1
   PreventUserIdleSystemSleep     1
   InternalPreventSleep           1
   pid 398(WindowServer): [0x0000947b000782f8] 00:00:42 PreventSystemSleep named: "com.apple.WindowServer.DMGrace"
   pid 391(bluetoothd): [0x000094a40001835f] 00:00:01 PreventUserIdleSystemSleep named: "com.apple.BTStack"
   pid 344(powerd): [0x0000947b000d82f7] 00:00:42 InternalPreventSleep named: "com.apple.powermanagement.acwakelinger"
10/07 23:54:03   Released    00:00:03  PreventUserIdleSystemSleep    391                 0x94a40001835f      com.apple.BTStack
10/07 23:54:03   System wide status: PreventUserIdleSystemSleep: 0
10/07 23:54:04   TimedOut    00:00:45  InternalPreventSleep          344                 0x947b000d82f7      com.apple.powermanagement.acwakelinger
10/07 23:54:07   Created     00:00:00  PreventUserIdleSystemSleep    433                 0x94ac00018367      Mutexed Backup Block
10/07 23:54:07   System wide status: PreventUserIdleSystemSleep: 1
10/07 23:54:08   Released    00:00:00  PreventUserIdleSystemSleep    433                 0x94ac00018367      Mutexed Backup Block
10/07 23:54:08   System wide status: PreventUserIdleSystemSleep: 0
10/07 23:54:10   Created     00:00:00  PreventUserIdleSystemSleep    433                 0x94af0001836c      Mutexed Backup Block
10/07 23:54:10   System wide status: PreventUserIdleSystemSleep: 1
10/07 23:54:10   Released    00:00:00  PreventUserIdleSystemSleep    433                 0x94af0001836c      Mutexed Backup Block
10/07 23:54:10   System wide status: PreventUserIdleSystemSleep: 0
10/07 23:54:13   Created     00:00:00  PreventUserIdleSystemSleep    391                 0x94b20001836d      com.apple.BTStack
10/07 23:54:13   System wide status: PreventUserIdleSystemSleep: 1
10/07 23:54:15   Released    10:58:01  PreventUserIdleDisplaySleep   443(2285)           0x10c600058ad1      com.apple.audio.context616.preventuseridledisplaysleep
10/07 23:54:15   Released    10:58:01  PreventUserIdleSystemSleep    443(2285)           0x10c600018ad0      com.apple.audio.context616.preventuseridlesleep
10/07 23:54:15   Released    10:58:01  PreventUserIdleDisplaySleep   443(2285)           0x10c600058ad5      com.apple.audio.context617.preventuseridledisplaysleep
10/07 23:54:15   Released    10:58:01  PreventUserIdleSystemSleep    443(2285)           0x10c600018ad4      com.apple.audio.context617.preventuseridlesleep
 
Last edited:
I shut down the computer, plugged it out, in, started again and now with working sleep this is what it says:

Code:
PreventUserIdleDisplaySleep    0
   PreventSystemSleep             0
   PreventUserIdleSystemSleep     1
   pid 345(powerd): [0x000002b400018700] 00:00:54 PreventUserIdleSystemSleep named: "Powerd - Prevent sleep while display is on"
   pid 392(bluetoothd): [0x000002e600018787] 00:00:04 PreventUserIdleSystemSleep named: "com.apple.BTStack"

Most notably is the missing WindowServer line: PreventSystemSleep named: "com.apple.WindowServer.DMGrace"

I guess it'll come back in a few hours/days.
 
how can I debug why doesn't my Macbook go to sleep?
You can install Sleep Aid. Will help you diagnose issue
 
You can install Sleep Aid. Will help you diagnose issue
Thanks a lot, I didn't know this app existed!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.