Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Mac Mini Server (2011) won't go to sleep anymore

I updated from Lion to Mountain Lion yesterday. Since then I am totally unable to bring my Mini to sleep. Does anyone has a similar problem ?

Mac mini, OS X Mountain Lion, i5 + i7, @TV 3, iPhone 4S, iPad2

Posted on Jul 26, 2012 1:37 AM

Reply
61 replies

Aug 13, 2012 2:58 AM in response to jas1

To stop the BIND server, you will need to use the Terminal and check if it was started by launchd as it should have been. In Terminal, try:


launchctl list | grep isc


In the resulting list of files should be 'org.isc.named'; if not, then the BIND server was started in some other way and I cannot help with that (although someone else will probably have more knowledge).


If successfully listed as running, insert the command (in Terminal):


sudo launchctl unload -w \

/System/Library/LaunchDaemons/org.isc.named.plist


You will be asked for YOUR password in order to run the command as root; if no error is reported on completion, try the check above again, when you should find nothing in the resulting list.


This advice was given earlier in this thread by people far more knowledgeable than I!!


Message was edited by: Jan C

Aug 13, 2012 3:38 AM in response to Jan C

Apologies for getting you to repeat yourself Jan - I didn't realise that was how to stop the bind server. I did previously try


sudo launchctl unload -w \

/System/Library/LaunchDaemons/org.isc.named.plist


But unfortunately I got the error


launchctl: Error unloading: org.isc.named


I just tried grepping for it with lauchctl list and the process does not show up.


Yet I cannot sleep the computer. I get the following message in the console:


handle_will_sleep_auth_and_shield_windows: no lock state data


I'm on OSX 10.8 (previously Lion Server)

Aug 19, 2012 2:40 AM in response to otmarj

The setting "PreventSleep" to "false" for filesharing helped me in some way, but I still have another process running that prevents sleep mode with my mac mini 2011 running Mountain Lion Server (updated from Lion server):


pmset -g assertions

Assertion status system-wide:

PreventUserIdleDisplaySleep 0

PreventSystemSleep 1

[...]

Listed by owning process:

pid 64398(httpd): [0x0000000800001985] 00:18:15 DenySystemSleep named: "com.apple.apache.denysystemsleep"


Does anybody know why and what for the httpd/apache process is running? At the moment my server.app is running with the minimum of services for me: just Filesharing and Time Maschine are enabled (no Websites or Wiki services running).


Is it possible to disable the httpd/apache process or, even better, configure it in a way like the filesharing service, so it is running but doesn't prevent the sleep mode?

Aug 20, 2012 3:35 PM in response to Jan C

Jan C wrote:


sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist


Thanks - I almost assumed that... though I still don't quite get why it is org.apache.httpd.plist, as opposed to com.apple.apache - or rather vice versa.


Anyway, this finally allows me to (manually) send my Mac mini to sleep.

it is, however, not persistent across restarts.

httpd is again active after restart as well...


(I did, by the way, disable "PreventFromSleep" for calendarserver as well)

Sep 11, 2012 9:47 AM in response to jbjoret

Also upgraded from Lion Server to vanilla Mountain Lion - Will not enter sleep state. Did sleep in Lion Server.

What is making me believe it is missed code, the Mac mini sleeps just fine in my windows partition.

I do not know if adding the server back into Mountain lion will help, but I believe Apple needs to fix some coding.. and promptly.

Sep 11, 2012 12:38 PM in response to alan2109

I have a feeling that an assumption has been made by Apple, in that the various daemons that would run on a Server (BIND, Apache, etc) wouldn't need to run on a client machine, so the facility to prevent such daemons succumbing to the host computer going to sleep has been 'hard-wired' into the code prior to compilation. It is, I feel, absolutely deliberate on the part of Apple and the only way around it is to take the source code, remove the bits that are affected and recompile.

Sep 30, 2012 5:10 AM in response to jbjoret

Hi there folks


I just recently got my Mac Mini server. I have had similar problems as mentioned in this thread. Screen would go blank, but the fans and harddrive would continue to run. My system is an i7 MacMini w/OS X Server 10.7.5. I use it to store my media files and use Ipad/Iphones/AppleTV 3 for streaming. My intention was to have the Mac Mini go to sleep, when it wasn't being used, but have had a hard time achieving this.


I have used pmset -g assertions to figure out why my system wouldn't sleep and with the help from this thread I got rid of named (in terminal: sudo launchctl unload -w /System/Library/LaunchDaemons/org.isc.named.plist).


Further googling the problem led me to information that the problem could be related to the use of darkwake in com.apple.boot.plist.


I have added darkwake=No to that file.


<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">

<dict>

<key>Kernel Flags</key>

<string>darkwake=No</string>

</dict>

</plist>


Early testing now shows my system will sleep properly when not used.


I hope this information can help some of you out there.


Best regards

Nov 15, 2012 4:29 AM in response to Applied

If you want to stop httpd (apache) from preventing sleep, I worked out that one of the custom apple modules prevents sleep (if you don't use the apple supplied apache config, it doesn't prevent sleep).


The module is "mod_status_apple.so" which appears to be an apple specific version of "mod_status",

Mod_status provides apache server performance information: http://httpd.apache.org/docs/2.4/mod/mod_status.html


I'm not sure what other customisations apple may have done and what disabling this module may do.


To disable the module, edit the file:

/Library/Server/Web/Config/apache2/httpd_server_app.conf


comment out the line:

LoadModule apple_status_module ${SERVER_INSTALL_PATH_PREFIX}/usr/libexec/apache2/mod_status_apple.so

I then uncommented the following line:

#LoadModule status_module libexec/apache2/mod_status.so


Happy sleeping!

Mac Mini Server (2011) won't go to sleep anymore

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.