Mac doesn't go into sleep mode

Sometimes my mac mini doesn't go into standby after the inactivity time specified in system settings. This happened with Yosemite, and continues to happen with El Capitan.

Quite sure, there is some application that prevents sleep, but I'm still unable to identify it. Is there a systematic way to identify the guilty application?


Solution 1:

From here: http://osxdaily.com/2012/07/11/mac-wont-sleep-heres-how-to-find-out-why-and-fix-it/

For other people who have this problem.

First, make sure that Energy Saver is set up the way you want: choose Apple () menu > System Preferences, then click Energy Saver. Make sure the sleep setting are what you want.

If they are, then the most likely cause is that a process is preventing sleep mode.

To find out which one, go to a terminal and type:

pmset -g assertions

Under the line

Listed by owning process:

you will see a list of processes which prevent entering sleep mode, it looks something like:

Listed by owning process:
pid 59696(firefox): [0x001043b4000511a0] 259:56:59 NoDisplaySleepAssertion named: "screen" 
pid 59706(plugin-container): [0x0017d5d700050d8b] 94:03:47 NoDisplaySleepAssertion named: "screen" 

In this case firefox and a plugin in firefox are preventing sleep-mode, so you can kill or restart them to solve the problem.

If you have no processes listed, another possibility is that there is network traffic which keeps the computer awake. So check if there are processes which are continuously having network traffic (in jan d's answer, that would be the process trying to print).

Solution 2:

After trying everything i could find on the web, i figured out that it was a page in the (HP) printer queue that was keeping my Mac from sleeping for days. Turned on the printer, forced the page to print and my Mac is now FINALLY going back to sleep.

There was no indication of this in the Activity Monitor nor the "pmset -g assertions" command that pointed to anything printer related. Hope this helps someone !

Solution 3:

Click CMD + OPTION + ESC and check for applications that you think my be running and refreshing itself in the background to try and pinpoint what is causing this issue. It should still be going to sleep regardless.

Im not sure what your settings are, but go and check them anyways.
- Go to System Preferences > Display

From what it sounds like, you have it set to never turn off the display, here you can tell the computer when to turn the display off which will make it go to sleep. Set this to what you want it to be by scrolling the bar to either the left or the right and you should be good to go.