How can I disable the suspend to disk function on my MacBook Pro Whenever I close the lid of my MacBook Pro it takes over a minute to write out my memory to disk. This is part of the Mac's safe suspend option, which allows it to restore your memory from the hibernation file if the Mac loses power (say you change batteries or they go flat) while it is asleep.

I prefer my machine to go to sleep as soon as possible and am willing to take the risk of an unclean shutdown should my battery go flat.

A long time ago I disabled this behavior, but have recently reinstalled my machine and OS X has reverted to the default behavior.

How can I disable the hibernation action when I close the lid?
To disable Safe Sleep:

$ sudo pmset -a hibernatemode 0
$ sudo nvram "use-nvramrc?"=false


Further details can be found at http://www.normalesup.org/~martinez/macosx/, Including how to enable it again.