Apple - Do MacBooks have a true "Hibernate" option?
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
.
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.
Expanding on Max Ried's answer above, I've been using this free app to enable hibernation on my macs for at least the last 5 years: Hibernate by Patrick Stein. I set it to "hibernate only" mode, and every time I put my mac to "Sleep," it instead skips straight to SafeSleep.
So far I haven't had any issues that I can prove were caused directly by this app; that is to say my computer rarely crashes or hangs, and I repeatedly "Hibernate" it when I need to take my laptop someplace with me (rather than shutting it down) often for weeks at a time without issue.
I should mention that my newest mac is a 4-5 year old MacBook Pro, so I have not tested this app on newer machines.