Mac Won’t Sleep? Here’s How to Find Out Why And Fix It

Jul 11, 2012 - 6 Comments

Find why a Mac won't go to sleep

On the rare occasion that you go to put a Mac to sleep and, well, it won’t sleep, there’s an easy to way to find out what the holdup is. Though this is a somewhat technical approach, it should give a good starting point to anyone who’s confused as to why something like automatic sleep isn’t taking effect, and hopefully provide a quick resolution to the problem.

  • Launch Terminal from /Applications/Utilities/ and type the following command:
  • pmset -g assertions

  • Look through the reported assertion list for items with a “1” next to their name to find what’s keeping the Mac awake

For example, if you see something like the following:

$ pmset -g assertions
7/11/12 10:45:33 PM PDT
Assertion status system-wide:
PreventUserIdleDisplaySleep 0
CPUBoundAssertion 0
DisableInflow 0
ChargeInhibit 0
PreventSystemSleep 0
PreventUserIdleSystemSleep 1
NoIdleSleepAssertion 1
ExternalMedia 0
DisableLowPowerBatteryWarnings 0
EnableIdleSleep 1
NoRealPowerSources_debug 0
UserIsActive 0
ApplePushServiceTask 0

Listed by owning process:
pid 1827: [0x000000bb012c01f1] PreventUserIdleSystemSleep named: "com.apple.audio.'AppleHDAEngineOutput:1B,0,1,1:0'.noidlesleep"

You’ll notice the “sleep when idle” feature is disabled, but what you really want to pay attention to is the lower portion of the list where the “Listed by owning process” report shows com.apple.audio as the reason that PreventUserIdleSystemSleep is enabled. Why is that? Because iTunes is running and playing music, meaning the computer isn’t idle.

If you’re having persistent problems with sleep and the above tip doesn’t give you any clue as to where to begin, sleep issues relating to hardware and power management quirks can often be fixed with an SMC reset. On the other side of the fence, another command line tip shows us how to find out why a Mac woke up from sleep. Sometimes the same thing preventing a Mac from sleeping is responsible from waking it up too, like Time Machine and schedule backups.

This is a handy tip from Lifehacker who also provides a similar tip for Windows computers. Don’t miss Apple’s article on the topic too for some additional help.

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

Related articles:

Posted by: William Pearson in Mac OS X, Tips & Tricks, Troubleshooting

6 Comments

» Comments RSS Feed

  1. Dave says:

    I’ve found a little over a year ago that the voice commands / speech recognition prevents my iMac and macbook from going to sleep if it’s used even once. I opened a ticket with Mac who acknowledged the problem but wouldn’t commit to a fix. I have to recycle speakable items.

    Plus speech recognition has a huge memory leak, about 750m / day.

    This is a pretty interesting find.

  2. Bruno Pascoal says:

    I was having issues with my Macbook Pro not sleeping at all (not with the lid closed nor by selecting “Sleep” in the Apple menu) and resetting the SMC didn’t help. The above tip didn’t show me what was cauing it.

    After some internet searching I learned that pending printing jobs are commonly the cause. Especially when you have added online printers (in my case it was a wireless HP printer AND a Xerox network printer). If you go to your printer list you’ll eventually find one that is “in use” even if it was the shared wireless printer in the hotel lobby on your last vacation. Simply delete any pending jobs or erase the printer altogether.

    Worked for me!

  3. Somian says:

    Ok, now I know that ExternalMedia is preventing sleep but how can I fix it? Shouldn’t it be possible to put a mac to sleep a mac with a HDD connected?

  4. Max says:

    Hi!
    This one is the hero of the day, thanx a lot!
    internet sharing was my problem. Disabled it from preferences and voilá no problems to sleep. I think it was related to i share my printer by wifi, but at least now i know what to do.
    Happy new year and thanx a lot for this article!
    /Max

  5. jfsjfs says:

    New iMac 2012 would not stay asleep. Found out it was the HP USB keyboard keeping it awake. Switched keyboard and the problem went away. Hope this helps someone.

    jfsjfs

  6. Raj says:

    i discovered it was my internet connection sharing that was preventing sleep mode.

Leave a Reply

 

Shop for Apple & Mac Deals on Amazon.com

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates