
Unfortunately for those of us who were already happy with the wake on Ethernet access feature as it was in Leopard and before, they fixed what, in our case, didn't need fixing. In Snow Leopard, if you enable waking for network access, your Mac will periodically wake up every two hours (possibly sooner), no matter what. Mind you, it's a special new 'lightweight wake' with the display staying off, and it'll go right back to sleep in about 20 seconds. Still, I absolutely hated the periodic hard drive and fan noise, the apparent pointlessness and wastefulness of it all.
A comment in mDNSResponder's open source code offers some explanation:
we still want to wake up in at most 120 minutes, to see if the network environment has changed. E.g. we might wake up and find no wireless network because the base station got rebooted just at that moment, and if that happens we don't want to just give up and go back to sleep and never try again.In my case, the network environment is static and only I could change it. I don't use wireless wake, Back to My Mac, or AirPort Extreme's sleep proxy. So how do I turn off this auto-wake feature then?
The code in mDNSResponder makes only two checks on when not to schedule the maintenance wakes:
- If 'Wake for network access' is turned off
- if there are no Bonjour-advertised services on your system
Using sleepwatcher, add the following commands to your script to run when your computer is going to sleep:
/bin/sleep 1 /usr/sbin/systemsetup -setwakeonnetworkaccess on >/dev/nullAnd add this to your 'wakeup' script:
/usr/sbin/systemsetup -setwakeonnetworkaccess off >/dev/nullFinally, also execute that last command right now, or just manually turn 'Wake for network access' off in the Energy Saver preferences.
What this does is turn wake for network access on only at the very last moment when your machine is going to sleep. This way, mDNSResponder will be fooled into thinking you don't have network wakes enabled, so it won't schedule the unwanted maintenance wake. In reality, though, your sleep script will enable it anyway, but in such a way that mDNSResponder doesn't see it.