Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

A couple of additional SafeSleep tips and tricks System 10.4
If you've been using Safe Sleep (see these two hints on it), you should probably also be aware that resetting the PRAM (Command-Option-P-R at boot, or through OpenFirmware) will clear the NVRAM property that enables Safe Sleep.

This is both good and bad: if you're unable to boot the computer because of a corrupted sleepimage file (such as happens if you use the hibernatemode pmset option for encrypted swap when your swap isn't encrypted, or vice-versa), it's a quick-and-easy way to get the computer booting again. It's bad because I'm sure somebody will set up Safe Sleep, come to rely upon it, reset the PRAM for some other reason...and really, really get upset when the computer did a normal sleep rather than a Safe Sleep!

Also, somebody might find the following shell script handy:
#!/bin/sh

PATH=/bin:/sbin:/usr/bin:/usr/sbin;

sudo -v

sudo nvram nvramrc='" /" select-dev
" msh" encode-string " has-safe-sleep" property
unselect
';
sudo nvram "use-nvramrc?"=true;

if sysctl vm.swapusage | grep -q 'encrypted'; then
  sudo pmset -a hibernatemode 7;
else
  sudo pmset -a hibernatemode 3;
fi

echo "You must restart your computer to finish enabling Safe Sleep."
It'll automagically take care of figuring out which hibernatemode to use; just run it (remember to make it executable) and (assuming your hardware supports it), Safe Sleep is enabled. (And reboot, of course.)
    •    
  • Currently 3.40 / 5
  You rated: 3 / 5 (5 votes cast)
 
[14,390 views]  

A couple of additional SafeSleep tips and tricks | 0 comments | Create New Account
Click here to return to the 'A couple of additional SafeSleep tips and tricks' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.