MacBook – Switch from sleep to hibernate after set time

filevaulthibernatemacbook prosleep-wake

Is there a way to set a MacBook Pro (10.8.2) to go into normal sleep when I close the case but then switch to hibernation after, say, 15 minutes? It's clearly capable of going from sleep to hibernate when the battery runs low, but I haven't been able to find out if that behavior can be triggered by anything else.

Background: I need to use Filevault encryption, and my understanding is that it doesn't provide much protection if the computer is stolen while in normal sleep mode. To remedy this I've set it to hibernate instead of sleeping and enabled the DestroyFVKeyOnStandby option. But this is very inconvenient when I just want to put it on standby for a few minutes (e.g., put it in my bag, walk to a meeting upstairs, open it back up).

Best Answer

Retina MacBook Pros and newer MacBook Airs actually do that by default under certain conditions. If Power Nap is disabled, the computer is on battery power, not connected to USB devices and not paired with Bluetooth devices, it enters standby mode (hibernation) after about 70 minutes of normal sleep.

If pmset -g | grep standby looks like this, your computer supports standby mode:

 standby              1
 standbydelay         4200

You can change the delay to 15 minutes with sudo pmset -b standbydelay 900.