How do I prevent my iMac from sleeping while media is being played or streamed?
I know this problem has been around for a while. With the release of Mountain Lion Macs got the bad habit of falling to sleep when they are not used by a human.
My iMac falls to sleep when I walk away for a while. Even when the system should be busy with downloading files and converting videos. It just goes to sleep no matter what.
With an Apple TV its even worse. I got used to restarting iTunes before I started watching a movie to reset the connection but with the release of iTunes 11 the Mac even falls to sleep while I am already watching the movie! I have wake on lan activated like the Apple support side say but it just doesn't matter.
Sometimes I use the Caffein App to keep my Mac awake but most of the time I forget to do so and Apple TV just cuts the connection when the Mac went to sleep again.
Is there any permanent solution for the kind of bad behavior?
Solution 1:
For the general case, the easiest thing to do is not let your computer sleep. Go to Energy Saver in System Preferences and move the "Computer sleep" slider to "Never". If that's too extreme, you could move the slider to 3 hours which will keep your computer doing whatever it's doing for at least 3 hours after you leave it.
Either way, you can still let the display sleep to save power and the computer will look like it's sleeping.
Specific to AppleTV streaming, there appears to be a bug in iTunes 11. Here's an Open Radar bug report: http://openradar.appspot.com/12791690.
Update 2012-12-13: iTunes 11.0.1 just came out and the missing power assertion has returned. This should fix the AppleTV streaming problem.
Solution 2:
I experienced exactly the same issue. The steps to resolve the issue were the following:
- delete /Library/Preferences/SystemConfiguration/com.apple.PowerManagement.plist
- reboot
If it won't solve it another helpful step could be resetting the SMC: http://support.apple.com/kb/HT3964?viewlocale=en_US
Solution 3:
Set your Mac's 'Energy Saver' Preferences setting to 'Wake on Network Access'.
Read about it here:
http://support.apple.com/en-us/HT201960