Do MacBooks have a true "Hibernate" option?
Solution 1:
Yes, it has a hibernate option. Apple calls it Safe Sleep
. When you put the Mac to sleep, OS X dumps the RAM onto the disk and goes to normal sleep (like Windows's Standby). When the battery is too weak to hold the RAM in standby, the computer is turned off. Then it's in the mode you call hibernation which is technically called "ACPI mode S4" or "Suspend-To-Disk".
You can force "Suspend-To-Disk" by disabling the standard sleep via SmartSleep or via pmset
on the command line. Its man page has a lot of information on Safe Sleep
.
Solution 2:
When newer laptops are put to sleep, they should save the contents of the RAM to /var/vm/sleepimage
but keep the RAM powered as well. Desktop Macs should just use normal sleep mode by default.
man pmset
:
hibernatemode = 0 (binary 0000) by default on supported desktops. The
system will not back memory up to persistent storage. The system must
wake from the contents of memory; the system will lose context on power
loss. This is, historically, plain old sleep.
hibernatemode = 3 (binary 0011) by default on supported portables. The
system will store a copy of memory to persistent storage (the disk), and
will power memory during sleep. The system will wake from memory, unless
a power loss forces it to restore from disk image.
hibernatemode = 25 (binary 0001 1001) is only settable via pmset. The
system will store a copy of memory to persistent storage (the disk), and
will remove power to memory. The system will restore from disk image. If
you want "hibernation" - slower sleeps, slower wakes, and better battery
life, you should use this setting.
- 0 (traditional sleep mode): fast wake up and sleep, saves disk space
- 3 (default safe sleep mode): fast wake up and sleep, state is kept when losing power
- 25 (hibernation): saves energy, state is kept when losing power
You can see which mode your Mac uses with pmset -g | grep hibernatemode
and change it with sudo pmset -a hibernatemode $mode
.
Some newer Macs support a standby mode on 10.8 and later. Even if hibernatemode
was set to 3, they power off memory after a bit over an hour of sleep.