Notes on Life, ‘Puters and Hawaii

Turn off your mac’s disk hibernation in OS X.

OS X has this deep-sleep mode that will save all the contents of Ram to disk. They do this just in-case you forget to charge it and the battery drains. However this causes a long hibernation time (the time measure from the time you close the lid to the time you see the “breath” light and it’s safe to move the laptop). During this long hibernation time, you MUST NOT move or especially jerk the laptop (like putting it in your bag). If you do jerk you laptop around at any time the hard disk is running, you can damage the hard disk. It is a moving-at-high-velocity part of your computer.

If you are like me, there isn’t but a few hours that go buy before I am using my laptop again. The battery-draining-all-the-way situation is almost never going to happen to me. I am always backed up and charged. The laptop is my life-blood and my primary tool for my family income.

So, rather than have the thing take for ever to sleep for a feature I won’t use, I decide to discover a way to turn it off. The result is the script. Open a terminal and type the following:

sudo sh -c '
  pmset -a hibernatemode 0;
  nvram use-nvramrc?=false;
  rm /var/vm/sleepimage > /dev/null 2>&1
'

Comments are closed.