As soon as I heard about 'safe sleep' (which lets you replace a battery without a shut down, for instance) on the new PowerBooks, I wanted it. I have often been in the position where my 12" PowerBook G4 has run out of juice while hibernating (due to various reasons), and then I have lost all my open programs. Well it appears that safe sleep can be implemented on many Macs, as described in this excellent entry on Andrew Escobar's blog.
It works. I've tried it.
[robg adds: I tested this on my 12" PowerBook G4 (1.33GHz), and it worked -- on the second attempt. The first time I yanked the power and restored it, the machine just cold booted. But on the subsequent attempts, it worked as it should. Very cool! If you try this one yourself, please post your Mac model info and success/failure results in the comments.
It should be obvious, but I'll say it anyway: this is potentially quite dangerous! Andrew provides good recovery instructions, in case things go wrong. However, I would recommend having a current backup, just in case...
The above-linked article is very well done, with clear step-by-step directions and additional information. In the event that entry ever disappears, though, I thought I would at least provide the basic steps here; Read More to see them...
Please note, I do not recommend using the following information to implement safe sleep on your Mac -- use the above-linked directions instead, as they are much more thorough, and cover situations that I haven't documented! With that warning, here are the basic steps:
sudo nvram nvramrc='" /" select-dev
" msh" encode-string " has-safe-sleep" property
unselect
'
sudo pmset -a hibernatemode 3
If you use secure virtual memory, see the original instructions for different settings. This command should create a file named sleepimage in /var/vm.Mac OS X Hints
http://hints.macworld.com/article.php?story=20051114072358161