I have a MacBook Air and I have noticed that even though I have configured it to put itself into sleep mode after being inactive for 5 minutes it sometimes stays awake.

I've usually got a bunch of programs open (Tweetie, iTunes, Safari, iChat etc) but it there some way I can find out which program/process that is preventing the MacBook from sleeping? (Yes, I know that I could probably reboot the MacBook and try one program at a time but that is pretty tedious)

link|improve this question
2  
Why, it must be Java or Espresso.... Just kidding. – Mussnoon Nov 25 '10 at 9:30
feedback

3 Answers

"Inactive" is hard to determine from looking at your system. You should use a process monitor, like "top" or "Activity Monitor" and see what is going on. You can quit apps to isolate the problem.

For browsers, flash or other plugins are often the cause. Your average web page is much more CPU intensive than it was a couple years ago. Also, background downloads probably also keep it from sleeping.

link|improve this answer
can a CPU-hogging browser prevent the MacBook from sleeping? – jimr Dec 19 '10 at 22:30
I have seen flash-ads on the current page of the current browser cause a system to refuse to sleep-and-stay-asleep. – benc Dec 22 '10 at 5:52
feedback

Try to use the command:

pmset -g

It will sometimes display the processes preventing your mac from sleeping.

Source: http://www.macobserver.com/tmo/article/osx_lion_pmset_shows_app_imposed_sleep/

link|improve this answer
feedback

Try this. It might work for you.

  1. Go to Utilities in the Applications folder and open the "Terminal" app.

  2. Type "pmset -g" without the quotes and hit enter.

  3. If "sleep" has 0 next to it and the words "imposed by" ; The number next to the imposed by is the process ID causing the problem. Write that number down.

  4. Type "ps -e" and hit enter. This will list all running processes.

  5. Find the process imposing on the sleep mode and take appropriate action.

In my case it was process id 19 which turned out in this instance to be a print server process. I went to "Print & Scan" in System Preferences and reset deleting all installed printers from there. . . Problem solved. I added the one printer that I needed and sleep still works. I don't yet understand quite how printing can get this way with the sleep mode.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.