Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Keep your Mac from sleeping in Mountain Lion System 10.8
Since Mountain Lion was released, I find that my Macs go to sleep when I don't want them to. I had my Energy Saver preferences set to 15 minutes, but I've noticed that when something is active, such as a download, they got to sleep after 15 minutes, rather than continue with the download. This is not only incorrect behavior, but it's very annoying. What's worse, when I changed the setting to Never, they would still go to sleep during long downloads.

The Ask Different blog pointed out that there is a new command in Mountain Lion called caffeinate. This keeps the system awake, or, as the man page says, "prevent the system from sleeping on behalf of a utility."

Run it as follows in Terminal:
caffeinate -u -t 3600
3600 in the above command is the number of seconds to keep the system awake. What's interesting is that you can effectively set your Mac to shut down at a specific time (that is, the built-in sleep mechanism will start counting when that time runs out). You can also run the command alone to keep your Mac awake until you stop it by pressing Control-C.
    •    
  • Currently 3.86 / 5
  You rated: 4 / 5 (7 votes cast)
 
[30,035 views]  

Keep your Mac from sleeping in Mountain Lion | 4 comments | Create New Account
Click here to return to the 'Keep your Mac from sleeping in Mountain Lion ' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Keep your Mac from sleeping in Mountain Lion
Authored by: klcheshire on Aug 01, '12 08:04:36AM

You can also use this great little free app called Caffeine (http://lightheadsw.com/caffeine).



[ Reply to This | # ]
Keep your Mac from sleeping in Mountain Lion
Authored by: kirkmc on Aug 01, '12 12:26:15PM

I tried it the other day, and my Mac still went to sleep.

---
Mac OS X Hints editor - Macworld senior contributor
http://www.mcelhearn.com



[ Reply to This | # ]
Keep your Mac from sleeping in Mountain Lion
Authored by: n8inup on Aug 01, '12 08:58:10AM

This can also be tied to another command in terminal:
caffeinate longrunningcommand -x -y --zed
http://onethingwell.org/post/28407926729/caffeinate

For example, I ran this yesterday:
caffeinate diskutil repairpermissions /



[ Reply to This | # ]
Keep your Mac from sleeping in Mountain Lion
Authored by: sojourner on Aug 13, '12 05:53:04PM

This is also available in 10.7.4. Yay!



[ Reply to This | # ]