I've been fiddling with my new Haswell macbook air (with Mountain Lion), and there's a difference between the "energy saver" settings on my macbook vs my 2011 iMac. On my iMac, there's a "Computer Sleep" as well as a "Display Sleep" setting, but the macbook air only has "Display sleep":
When I don't use the computer for an hour or so, I want the display to go to sleep, but the computer should still be on, and shouldn't e.g. disconnect me from my chat sessions. How can I do this?
Thanks for your help.
Best Answer
knodi was close, but
pmset sleep 180
does not mean "180 x display sleep time" it simply means 180 minutes.Before you change any of your
pmset
settings, I would take note of your current settings. If you enter this line in Terminal.app:sudo pmset -g live | tee -a ~/Desktop/original-pmset.txt
it will show you the current
pmset
settings and it will also save a copy to ~/Desktop/original-pmset.txt so you can keep it as a reference.Manipulating computer sleep time with
pmset
If I want my MacBook Air to go to skeep after 60 minutes of idle time when it is plugged into wall/AC power, I can set that using:
sudo pmset -c sleep 60
Similarly,
sudo pmset -c sleep 0
tells my MacBook Air not to put the computer to sleep, even if the display goes to sleep.
If I wanted that same setting for when the MacBook is on battery power (not AC/wall power), then I would use
sudo pmset -b sleep 0
I can also set different sleep times for
disksleep
anddisplaysleep
(You can read more about pmset at https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/pmset.1.html or
man pmset
in Terminal.)I would be very interested to know if
sudo pmset -c sleep 60
(or whatever value you choose) actually works for a Haswell-based MacBook Air.