Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I've recently switched from Windows to a MacBook pro. In Windows, there are the following shutdown options:

  • Standby - the machine goes into a "light sleep" from which it can awaken very quickly (like, in a few seconds), but plenty of energy is consumed.

  • Hibernate - the OS dumps the current system state (including the contents of the RAM) to a file, then turns the machine off. Wakeup takes longer than from standby, but there is no latent energy consumption.

  • Shut down - the OS shuts down, and the machine is turned off.

In OS X, what I can see is

  • Sleep - seems equivalent to standby, or an even lighter form of sleep as Mail seems to even continue to poll for new email?

  • Shutdown and restore all apps on next start - turns off machine, seems to start the OS from scratch and restart alls apps - from what I can tell, it's not hibernation

  • Shutdown and don't restore apps - shut down

is this correct, and does OS X not have a true "hibernate" mode that can write its state to disk? Because that's what I'm looking for really. There's talk of a "Safe Sleep" mode on the Internets, but I can't see it in my OS X menu. Is it hidden in 10.7?

share|improve this question
    
Yes, look here: apple.stackexchange.com/q/377/14994 –  iolsmit May 20 '12 at 10:16
2  
Actually, it's not that much battery drained while in Sleep mode neither on MacBooks or other laptops. Additionally starting with Windows Vista the OS dumps the memory content onto the disk even if you go to standard standby so you can remove the battery of cut off the power adapter. Of course only unless you disable it. –  Max Ried May 20 '12 at 10:20

4 Answers 4

up vote 14 down vote accepted

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.

share|improve this answer
    
For the actual pmset commands, see here: superuser.com/a/630985/73619 –  this.lau_ Jun 22 at 20:36

Also, the original poster notes that sleeping OS X machines continue to periodically check mail, etc. This is a feature on new-ish machines (it debuted in the 2011 MacBook Air) called PowerNap. In effect, the computer wakes periodically and briefly from sleep in order to handle recurring tasks.

A summary from Apple's http://support.apple.com/kb/HT5394:

While sleeping, Power Nap allows your Mac to do things like periodically check for new mail, calendar, and other iCloud updates. When plugged into AC power, Power Nap can also perform things like Time Machine backups to an AirPort Time Capsule and download OS X software updates while your Mac sleeps.

When your compatible Mac goes to sleep, Power Nap still works to do the following:

Mail - Receive new messages. Contacts - Your Contacts update with any changes you may have made on another device. Calendar - Receive new invitations and calendar updates. Reminders - Reminders updates with any changes you may have made on another device. Notes - Notes updates with any changes you may have made on another device. Documents in your iCloud account - iCloud pushes any edits you made to a document to your Mac notebook. Photo Stream - Your Photo Stream updates with new photos from your iPhone, iPad, or iPod touch. Find My Mac - Locate a lost Mac notebook even when it’s sleeping. VPN on demand - Corporate email updates securely. Mobile Device Management - Remotely lock and wipe the computer.

Power Nap does more when your Mac is plugged in to an AC outlet:

Downloads software updates Backs up with Time Machine Performs Spotlight indexing Continues background downloads of Mac App Store items, including software updates Updates Help Center content Wake on Wireless support for Apple and third party wireless base stations

share|improve this answer
2  
It is best to include a link to the source when quoting if possible. –  dwightk Mar 14 at 17:07
    
@dwightk Thanks for the edit and the constructive criticism. –  bmike Mar 14 at 17:07
    
This is very interesting (I've been wondering about why my Macbook always has the latest E-Mails even though it was supposed to be sleeping), but I don't really see how it is related to this specific question? –  Pekka 웃 Mar 14 at 17:21

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.

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.