enable safe sleep on your mac

November 14th, 2005


A new feature of OS X 10.4.3 and the new PowerBooks is a deeper sleep setting called “Safe Sleep”. Essentially, like “Hibernate” on Windows and linux, it writes the contents of your Mac’s RAM to the hard drive and then shuts down your mac entirely. It’s detailed in this Apple technote and on this mighty useful page right here.

The big news is that “Safe Sleep” can be activated on some older macs as well as the new Powerbooks; Matt’s page as mentioned above has the particulars and some shell scripts. I thought it might be slightly more mac-friendly to wrap up those shell scripts as an E-Z AppleScript, so I’ve done so here:

Download.

…but, hey, listen, this is a totally unsupported hack, so make sure you examine (and perhaps print out) Matt’s page which has details on how to reset your machine should things blow up. “Safe Sleep” has worked for me (first-gen 1.25 GHz aluminum PowerBook — I don’t get the cool waking display animation shown in the Apple technote, however, just a dark screen), but it’s still not known which machines “Safe Sleep” works on and which machines it doesn’t, so caveat emptor.

NOTE: To test “Safe Sleep”, type this in a terminal window :

sudo pmset -a hibernatemode 1

then sleep your mac; if everything has worked, then it should then “Safe Sleep”. To go back to the normal sleep, type this:

sudo pmset -a hibernatemode 0

~jeff

  • Moik

    Is there anything “unsafe” about regular sleep?

  • http://ldopa.net Jeff

    The only thing even mildly unsafe about normal sleep is that if you had unsaved documents, and you slept your mac, and then it totally, 100% ran out of juice, those documents would be unsaved.

    With Safe Sleep, everything in RAM is saved to disk, so when you get more power in your mac, then you could resume the state and save those documents.

  • tucker

    I’ve noticed on the new iBooks that sleep actually consumes a fair amount of battery power. Safe Sleep could theoretically avoid that issue.

  • bob nobin

    I already get deep sleep on my MDD powermac in Panther. When I put it to sleep, it won’t wake up unless I reboot…hahaha. If safe deep sleep works in 10.4.x I would be thrilled.