102

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?

2
  • 1
    Yes, look here: apple.stackexchange.com/q/377/14994
    – iolsmit
    Commented May 20, 2012 at 10:16
  • 4
    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.
    – bot47
    Commented May 20, 2012 at 10:20

4 Answers 4

62

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.

4
  • 4
    For the actual pmset commands, see here: superuser.com/a/630985/73619
    – laurent
    Commented Jun 22, 2014 at 20:36
  • 1
    What is the difference between 'Shutdown and restore' and 'Hibernate' option mentioned above?
    – genonymous
    Commented Mar 6, 2017 at 19:28
  • @genonymous What do you mean with "shutdown and restore"?
    – bot47
    Commented Mar 7, 2017 at 5:08
  • 2
    That makes so little sense to me. I have 100%, I put it to hibernate, in 24 hours I start it and have 99% battery. Here what? I have 100%, I put it to sleep, when battery have 10% it goes to hibernate, and then I get 10% battery?
    – St.Shadow
    Commented Nov 13, 2020 at 12:28
65

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.

5
  • 1
    Useful to have the extra note on standby mode, though sometimes I think it doesn't kick in and the Mac exhausts its battery before hibernating.
    – RichVel
    Commented Oct 6, 2015 at 9:11
  • 1
    So, to hibernate my Mac, I'd first set hibernatemode=25 and then either close my lid or give the command pmset sleepnow. And then remember to put hibernatemode back the way it was when I next wake up? Too bad there's no pmset hibernatenow command. Commented Sep 15, 2016 at 20:25
  • I also think that the "standby more" is no more a thing or it just fails to kick in.. The article linked is even archived. Commented Dec 8, 2017 at 1:44
  • 2
    If it helps anyone else: pmset has -b and -c options for battery and charger respectively, so that you can set different hibernation modes depending on whether your MacBook is on battery or is plugged in. I used it to set Hibernate mode (25) while on battery, but regular Sleep mode (3) while plugged in to power. Commented Mar 17, 2021 at 12:16
  • Thanks, @numbermaniac ! From man pmset: pmset can modify the values of any of the power management settings defined below. You may specify one or more setting & value pairs on the command-line invocation of pmset. The -a, -b, -c, -u flags determine whether the settings apply to battery ( -b ), charger (wall power) ( -c ), UPS ( -u ) or all ( -a ).
    – Ryan
    Commented Jun 18 at 13:02
8

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.

1
  • I tried it on my 2017 MacBook Pro (Catalina), it doesn't seem to work anymore.
    – Qasim
    Commented Jan 31, 2022 at 14:13
4

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
4
  • 3
    It is best to include a link to the source when quoting if possible.
    – dwightk
    Commented Mar 14, 2014 at 17:07
  • 1
    @dwightk Thanks for the edit and the constructive criticism.
    – bmike
    Commented Mar 14, 2014 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
    Commented Mar 14, 2014 at 17:21
  • The link shows that Power Nap is actually available on the MacBook Air (Late 2010) and later, given OS X Mountain Lion v10.8.2 or later.
    – nekomatic
    Commented Jun 8, 2016 at 14:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .