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


Click here to return to the '10.4: Disable Safe Sleep for faster sleep on lid close' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Disable Safe Sleep for faster sleep on lid close
Authored by: etresoft on Mar 06, '07 11:42:07AM
I tend to forget these little tricks when I need them. I can see the rationale for having and not having the hibernate mode. I think we should be able to choose when appropriate. Here is a virtually untested script:
#!/bin/sh

SETTING=$1

if [ "$SETTING" == "off" ]; then
  echo "Turning off safe sleep"
  sudo pmset -a hibernatemode 0
  sudo nvram "use-nvramrc?"=false
  echo "Don't forget to reboot!"
  echo You are now free to remove your sleepimage file at /private/var/vm/sleepimage
elif [ "$SETTING" == "on" ]; then
  echo "Turning on safe sleep"
  sudo pmset -a hibernatemode 3
  sudo nvram "use-nvramrc?"=true
  echo "Don't forget to reboot!"
else
  echo "Usage: safesleep on | off"
fi


[ Reply to This | # ]