Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Find out what's keeping your Mac awake System 10.7
Have you ever been annoyed to find that your Mac won't got to sleep when you tell it to? It turns out that in Mac OS X 10.6 and later, there's a simple way of finding out what's keeping your Mac awake.

Run the following command in your Terminal:

pmset -g assertions

In the first section of output, you'll see the status of two kernel assertions named PreventSystemSleep and PreventUserIdleSystemSleep. An accompanying status of 1 for either of these means that it is currently triggered.

The second section of the output lists the processes which owns any enabled assertions, both by process id (pid) and bundle id. If the verbose bundle id doesn't ring a bell, you can always use ps up <pid>, or look in Activity Monitor, to find the name of the exact command associated with this process.
    •    
  • Currently 4.58 / 5
  You rated: 3 / 5 (19 votes cast)
 
[42,066 views]  

Find out what's keeping your Mac awake | 19 comments | Create New Account
Click here to return to the 'Find out what's keeping your Mac awake' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Find out what's keeping your Mac awake
Authored by: pjdraud on Jul 03, '12 08:05:12AM

Does anyone find that having a Bluetooth mouse makes the computer wake up from sleep occasionally?



[ Reply to This | # ]
Find out what's keeping your Mac awake
Authored by: cwanja on Jul 03, '12 08:54:02AM
Command to run to get the specifics that this post is talking about is:

pmset -g assertions | egrep '(PreventUserIdleSystemSleep|PreventUserIdleDisplaySleep)'
---
Chris W


[ Reply to This | # ]
Find out what's keeping your Mac awake
Authored by: mike cupcake on Jul 03, '12 10:10:23AM
I just get:
/Users/mikeytime: pmset -g assertions
03/07/2012 18:03:39 GMT+01:00 
Assertion status system-wide:
ChargeInhibit                           0
NoDisplaySleepAssertion                 0
CPUBoundAssertion                       0
EnableIdleSleep                         1
NoIdleSleepAssertion                    0
DisableInflow                           0
DisableLowPowerBatteryWarnings          0
ExternalMedia                           0
No Assertions.


[ Reply to This | # ]
Find out what's keeping your Mac awake
Authored by: mike cupcake on Jul 04, '12 06:55:59AM

In 10.6 that is.



[ Reply to This | # ]
Find out what's keeping your Mac awake
Authored by: gpc on Jul 04, '12 02:26:52PM

That's all that I get as well.

10.6.8 on a MacBookPro6,2



[ Reply to This | # ]
Find out what's keeping your Mac awake
Authored by: wjv on Jul 05, '12 12:52:20AM
Very interesting — It's an entirely different list of assertions compared to the one I get!

So it appears that the available assertions may depend on the model of Mac you have…? The only two Macs I have access to right at this moment are a MacBookPro4,1 and a MacBookPro6,2… and they both give me identical lists of assertions, including the two I mention in the hint above.

In short, I have no clue. But it would be interesting to investigate this further.

[ Reply to This | # ]

Find out what's keeping your Mac awake
Authored by: mike cupcake on Jul 05, '12 03:37:29AM
MacBookPro8,1 with 10.6.8 here.

On a Macmini4,1 running 10.6.8 server:
thebank:~ administrator$ pmset -g assertions
05/07/2012 11:35:04 GMT+01:00 
Assertion status system-wide:
ChargeInhibit                           0
NoDisplaySleepAssertion                 0
CPUBoundAssertion                       0
EnableIdleSleep                         1
NoIdleSleepAssertion                    1
DisableInflow                           0
DisableLowPowerBatteryWarnings          0
ExternalMedia                           0

Listed by owning process:
  16446: NoIdleSleepAssertion value=255 named: "Time Machine backup"


[ Reply to This | # ]
Find out what's keeping your Mac awake
Authored by: gpc on Jul 05, '12 09:21:42AM
Ah! I generally don't have my time-machine drive connected. When I plug it in to the USB port, I get this list:
gpc$ pmset -g assertions
7/5/12 11:43:48 AM EDT 
Assertion status system-wide:
ChargeInhibit                           0
NoDisplaySleepAssertion                 0
CPUBoundAssertion                       0
EnableIdleSleep                         1
NoIdleSleepAssertion                    0
DisableInflow                           0
DisableLowPowerBatteryWarnings          0
ExternalMedia                           1

Listed by owning process:
  15: ExternalMedia value=255 named: "com.apple.powermanagement.externalmediamounted" 
So, the same list of assertions, and now one of them is owned by a process (instead of "No Assertions."). When a backup is running:
gpc$ pmset -g assertions
7/5/12 12:02:43 PM EDT 
Assertion status system-wide:
ChargeInhibit                           0
NoDisplaySleepAssertion                 0
CPUBoundAssertion                       0
EnableIdleSleep                         1
NoIdleSleepAssertion                    1
DisableInflow                           0
DisableLowPowerBatteryWarnings          0
ExternalMedia                           1

Listed by owning process:
  15: ExternalMedia value=255 named: "com.apple.powermanagement.externalmediamounted" 
  692: NoIdleSleepAssertion value=255 named: "Time Machine backup" 
So perhaps on this MBP6,2 in 10.6.8 it is NoIdleSleepAssertion that plays the role of the ones mentioned in the hint.

It may be the SMC Version or the Boot ROM that's relevant, rather than the model.

[ Reply to This | # ]
Find out what's keeping your Mac awake
Authored by: gpc on Jul 05, '12 08:50:52AM

I have no idea if the model makes a difference. I just included it because it seemed like another variable that could be relevant.



[ Reply to This | # ]
Find out what's keeping your Mac awake
Authored by: wfolta on Jul 03, '12 12:56:19PM

I wish I'd known about this years ago. My last two MBP's never seemed to go to sleep consistently and I could never figure out why. I blamed Time Capsule, but never knew.



[ Reply to This | # ]
Find out what's keeping your Mac awake
Authored by: wjv on Jul 05, '12 12:46:10AM
I wish I'd known about this years ago.

You and me both, my friend. You and me both.

[ Reply to This | # ]

Find out what's keeping your Mac awake
Authored by: StrawHousePig on Jul 03, '12 07:55:56PM

So wait, this is under "10.7" but states it works in 10.6. It runs for me in 10.6. A little confusing using a specific version as the category.

Great hint, btw.



[ Reply to This | # ]
Find out what's keeping your Mac awake
Authored by: wjv on Jul 05, '12 12:43:36AM
I'm damned near convinced I submitted it under 10.6. At the very least I certainly intended to, because (as I stated in the text) it does appear to work in 10.6+. The text of my submission was altered somewhat, so it might be that the site admins changed the category as well.

Sorry for any confusion. (And thanks!)

[ Reply to This | # ]

Find out what's keeping your Mac awake
Authored by: kirkmc on Jul 05, '12 02:06:28AM
I put it under 10.7 because it works in Lion, and because most users who read the site run Lion. I was afraid that if I put 10.6, people wouldn't think it works in. But the text of the hint does say 10.6 and later.
---
Mac OS X Hints editor - Macworld senior contributor
http://www.mcelhearn.com
Edited on Jul 05, '12 02:06:59AM by kirkmc


[ Reply to This | # ]
Find out what's keeping your Mac awake
Authored by: DamnItsHot on Jul 09, '12 06:22:59AM
Yet another reason to look further into a tagging system for the hints so that you can further qualify it. BTW: if it says 10.6 even though I run 10.7 or later I typically look at it to see if it is something that might apply to later versions also. I do not assume however that if it says 10.7 that it will work in earlier because to me the specific later version typically implies that the later version is what is required.

[ Reply to This | # ]
Find out what's keeping your Mac awake
Authored by: joelseph on Jul 04, '12 10:10:40PM

....

.........oooh.... that explains some things......



where have you been all my life?!?!?!?

I think CUPS has been giving me trouble all this time.



[ Reply to This | # ]
Find out what's keeping your Mac awake
Authored by: cmfalcon on Jul 05, '12 07:10:17PM

Can someone explain this in simple terms - not a programming type of guy. My Mac just started delaying when I ask it to sleep

Thanks



[ Reply to This | # ]
Find out what's keeping your Mac awake
Authored by: Notch Johnson on Jul 14, '12 08:33:03AM

If your Mac is simply delaying before sleep, you're ok. The computer is probably doing some clean up or set up prior to sleeping.

On the other hand, if your Mac is not sleeping at all after you either tell it to sleep or have it set in the Energy Saver System Preferences, this hint is for you.

For example, last week my Mac started to not sleep anymore. I came across this hint and it showed me out to figure out that it was because I turned on Internet Sharing (from the Sharing System Preferences) and that prevented system sleep.



[ Reply to This | # ]
Find out what's keeping your Mac awake
Authored by: bjmac on Jul 17, '12 06:06:26AM

Thanks for this helpful hint. I was hoping it would get me to the bottom of what's been consistently happening with my MacBook Pro - even two calls to Apple Tech has not solved it. Simply put, my MacBook (running Lion 10.7.4) will not go to sleep by itself, no matter what we've tried. It will go to sleep when you tell it to go to sleep, but no matter what the Energy Savings setting are set to, it will never goes to sleep on it's own.

Running the script you suggested returned the following, so I'm not sure this script helps my issue.

Anything further I can try?

Thanks

Assertion status system-wide:
PreventUserIdleDisplaySleep 0
CPUBoundAssertion 0
DisableInflow 0
ChargeInhibit 0
PreventSystemSleep 0
PreventUserIdleSystemSleep 0
ExternalMedia 0
DisableLowPowerBatteryWarnings 0
EnableIdleSleep 1
NoRealPowerSources_debug 0
UserIsActive 0
ApplePushServiceTask 0



[ Reply to This | # ]