up vote 14 down vote favorite
6
share [g+] share [fb]

On Windows, you can hibernate your computer, so that it starts a lot faster while consuming zero energy while "hibernating".

I see an option to Sleep on my Mac mini but not hibernate. Does Mac support hibernation?

I am on Leopard.

link|improve this question

feedback

5 Answers

up vote 17 down vote accepted

OS X only has only one "sleep" option. You cannot change its name, but to change its behaviour, I use SmartSleep on a Mac mini (though in the MacBook-like "sleep & hibernate" mode). It works for a mini, though the website only refers to MacBooks.

Sometimes I get complaints about hardware not having been removed properly (but OS X never tells me what hardware, and my Time Machine USB disks seem fine — I should peek into the logs one day, and I assume this is related to OS X, not to SmartSleep).

I've quickly tested SmartSleep's "hibernate only" on that mini (Intel; running 10.5), and it seems to work as well. Doing these tests, I noticed that after the display goes black the power light starts pulsing (like to indicate sleep rather than hibernate) for a few seconds. Maybe it's still writing RAM to disk then. (Until now, I always thought that on my MacBook the pulsing indicated that all was done. But now I think that, whichever sleep mode one is using, one should probably not unplug the power too soon). After a short while, it powers down completely.

Macworld explains how to achieve the same without that SmartSleep preference pane. To check the current setup:

pmset -g | grep hibernatemode

This yields one of:

  • 0 — Old style sleep mode, with RAM powered on while sleeping, safe sleep disabled, and super-fast wake.
  • 1 — Hibernation mode, with RAM contents written to disk, system totally shut down while “sleeping,” and slower wake up, due to reading the contents of RAM off the hard drive.
  • 3 — The default mode on machines introduced since about fall 2005. RAM is powered on while sleeping, but RAM contents are also written to disk before sleeping. In the event of total power loss, the system enters hibernation mode automatically.
  • 5 — This is the same as mode 1, but it’s for those using secure virtual memory (in System Preferences » Security).
  • 7 — This is the same as mode 3, but it’s for those using secure virtual memory.

And the same numbers can be used to change the sleep mode setting:

sudo pmset -a hibernatemode 1
link|improve this answer
Excellent Answer! – Chealion Oct 29 '09 at 23:44
feedback

yup. it's called safe sleep. easiest way to get it is to use the deep sleep widget.

link|improve this answer
I hate widgets with a passion. Is there something non-widgety? – AngryHacker Oct 23 '09 at 5:07
1  
For laptop owners the easiest way is to close the lid. Apple menu in the upper left corner also has ,,sleep'' option (at least on my Tiger). – Tadeusz A. Kadłubowski Oct 29 '09 at 18:03
feedback

Hibernation will also be triggered automatically if your laptop battery runs down completely.

link|improve this answer
A Mac mini has no battery... – Arjan Oct 29 '09 at 17:00
feedback

I have read that "Safe Sleep" is on by default on all Intel Macs and some late model PowerPC machines (I think the Intel mini's have this support, but the PPC ones probably do not—without unsupported hacks).

But "Safe Sleep" by itself is not exactly the same as "hibernation". It is a combination of saving RAM to disk but also doing a normal sleep. This allows for a fast wake, and also preserves the system state if the power happens to fail completely while the machine is sleeping.

You can tell if a system is using Safe Sleep by (after at least one sleep) checking for a file /var/vm/sleepimage that is the same size as the installed RAM. Also when Safe Sleep is active there will be a longer delay between clicking the Sleep menu item (or button, or holding Command-Option-Eject) before the machine's status light starts its normal fade-up/fade-down loop.

The final bit of the solution is to get the machine to fully power off after saving RAM the sleepimage. It seems like it is possible to configure this using the command-line program pmset to set the hibernatemode. You might checkout something like Deep Sleep for an automated way of making this configuration change.

link|improve this answer
Safe sleep was not on by default on my Intel Mac mini. I used SmartSleep to enable it, but indeed pmset can achieve the same. – Arjan Oct 29 '09 at 18:29
feedback

I wrote a script that will let you enter hibernation immediately (without changing your settings permanently). I find it quite useful, as I like the default settings, but want to forcibly enter hibernation when on the road. Maybe someone else will find it useful too ;-)

It is a bit too long to post here, but check out the link in my post. Might make a "systray" version if someone requests it.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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