How to enable hibernate mode on a Mac

SmartSleep.prefPaneUnlike Windows, Mac OS doesn’t offer a hibernate or deep sleep mode – selecting Sleep from the Apple menu just puts a Mac into a low-power state (suspend to RAM) that, while quick to resume, still keeps the contents of memory in memory.

This isn’t much of a problem on a desktop Mac that’s plugged into the mains, but it is a problem for MacBooks that are being used on battery power.

A MacBook in sleep mode still draws power, which means if you close the lid (the standard way to trigger sleep mode on a MacBook) and put an unplugged MacBook aside for a few days, you may come back to a flat battery.

As it turns out, more recent MacBooks do actually enter a hybrid sleep mode when you close the lid. Apple calls it Safe Sleep (much like that used in Windows Vista) and the contents of memory are written to disk before the MacBook enters its low-power sleep state. This is an insurance policy for those times when leave a MacBook in sleep mode away from the mains until the battery runs flat. When you power on, the MacBook will still resume to where you left it, but it will take a little longer as it’s restoring data from disk rather than RAM.

So, if Mac OS already has a hibernate mode, why can’t it be activated manually? Well, it can…

There various ways to crack open the Mac OS hibernate mode so that it can be activated on demand, but as far as I can determine, none are officially sanctioned. The most basic is to hack a few files so that hibernate mode can be triggered from the command line, but this isn’t for anyone unfamiliar the Terminal app, or uncomfortable editing system config files.

Owners of MacBooks with removable batteries (all but the MacBook Air and new 17in MacBook Pro, in other words) have an easier option. Once the MacBook is in sleep mode (once you’ve closed the lid and the power light has stopped pulsing – a sign that it’s still writing data to disk for Safe Sleep), you can simply pop the battery to terminate hybrid sleep mode and power-off the MacBook. When you power it on again, it will then resume from disk.

Fortunately, what can be done from Terminal can also be done with an application, and there are a few hacked-together utilities that give user access to Mac OS hibernate mode. The simplest is Deep Sleep, which adds a widget to the Dashboard that, when enabled, puts the Mac into hibernate mode.

Actually, Deep Sleep lets you pick different sleep modes for when close the MacBook’s lid andĀ  activate the widget: standard (suspend-to-RAM only) sleep, hybrid sleep and hibernate. Deep Sleep only works with Mac OS X Tiger 10.4.3 to 10.4.10 and Mac OS X Leopard 10.5.0 (or later, presumably).

SmartSleep.prefPane does essentially the same thing via a Preferences plug-in, but offers an interesting twist. As well as offering the same set of sleep options as Deep Sleep (as a Preferences Pane, natch), it also lets you override the default hybrid sleep mode settings by specifying a custom battery power percentage or estimated time remaining at which the MacBook goes from hybrid sleep to hibernate. There are a few gotchas with SmartSleep.prefPane, but its author offers some solutions, too.

Hibernate Hibernation Tool for Mac OS (sorry Sveenie!) is less elegant, but it’s a pretty simple solution. It’s just an AppleScript that, when activated, puts the MacBook directly into hibernate mode.

Finally, remember that since hibernate copies the contents of RAM to the hard disk on a Mac, you need as much free hard disk space as you do memory, else hibernate won’t work.

8 Comments

  1. [...] are several software solutions that will also do the job, and there’s a good guide to themĀ over at Geek Guides. Tags: battery drain, deep sleep, hibernate, hibernation, Mac OS X, macbook, macbook pro, sleep [...]

  2. Sveenie says:

    Thanks for mentioning my tool. But it is just called “Hibernate”, still not really catchy but very descriptive. ;-)

  3. Quotes says:

    This is what I like about my mac book. thanks for the post.

  4. Tobias says:

    Hi, is there a way to unmount usb drives before hibernating and mounting them again afterwards? Thanks a lot!

  5. nice article thanks a lot :)

  6. dj__jg says:

    I’m using the Deep Sleep widget on my 2009 Imac, and it works great!

  7. James Smith says:

    But what about an iMac. If you’re in normal sleep mode and you have a power failure, you lose what’s in RAM, meaning where you were and want to be again.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>