There's also a preference pane app called SmartSleep (http://www.jinx.de/SmartSleep.html): you have to pay for the current version, but you can find older versions around the Internet.
Also I've used this tutorial, I copied pasted the contents, and have some notes in the bottom:
I don’t like to waste battery life, especially when traveling. I love the Hibernate feature in Windows, and have all of my laptops set to hibernate when the lid is closed. The few extra seconds it takes to wake up is worth the saved battery life in my eyes. For those that don’t know here are the different states of the MacBook Pro:
- On – Computer is awake, screen is on, battery is being consumed based on your power settings
- Off – Computer is using no power from the battery
- Sleep – Computer has turned off the screen and has suspended the operating system to RAM (volatile memory).
- Hibernation – Computer has turned off most hardware and has suspended the operating system to the hard drive.
Usually when you close the lid of your MBP, it will be put to sleep, waking quite quickly when you open the lid again. While sleeping, it’s still consuming battery power, albeit a small amount compared to normal usage. When the battery reaches a certain low level, the MBP will automatically switch to hibernation mode: basically shutting off so you don’t lose any work.
Sleep is great for when you’re actively using your computer, but when you want to stretch out battery life for as long as possible, you'll want it to hibernate. Also note that apparently the newer MacBook Pros also write information to the hard drive when sleeping so that when the battery drops to dangerous levels it can jump instantly into hibernation. Apple calls this “Safe Sleep”. (More info on all the technical stuff here)
A few examples of why you would want to use hibernation with your laptop:
- You’re about to head to the airport on an international flight and you want to use your machine during the flight but still leave enough juice to be able to pull up a map/email/info when you get to your destination.
- You toss your laptop in a bag and may or may not use it on a weekend trip but don’t want to worry about charging it.
- You want to conserve every little bit of power you can.
And when you would want to stick with sleep:
- Your laptop isn’t running off battery power
- You will be opening and closing your lid quite often
- You’re running around but actively using your laptop (conferences, meetings, etc.)
Basically you sacrifice the speed of restoring your machine to gain a little bit of battery power or vice versa. Personally I like to get every last bit of electricity that I can.
After some searching I came across a post that explained how to basically force your MBP into hibernation when the lid is closed. It requires a quick bit of work in a console, but is painfully simple.
In a console, type this command to determine your current sleep mode:
pmset -g | grep hibernate
This should return one of the following:
- 0 –
Legacy sleep mode. It will save everything to RAM upon sleeping but does not support Safe Sleep. Very fast sleep.
- 1 –
Legacy Safe Sleep. This is the Safe Sleep. Everything your laptop goes into sleep, it will save everything to hard disk. It takes some time to go into sleep, and is slow to startup. Slow on Sleep and Startup.
- 3 –
Default. As described above, when sleeping, contents are saved to RAM. When battery runs out, hibernate occurs.
- 5 – Behaves as 1 but applicable only for a modern Mac that uses "Secure virtual memory".
- 7 – Behaves as 3 but applicable only for a modern Mac that uses "Secure virtual memory".
Now edit and save your
/Users/username/.bash_profile file with the following lines:
alias hibernateon="sudo pmset -a hibernatemode 5"
alias hibernateoff="sudo pmset -a hibernatemode 0"
hibernateoff can be any text you want: you just need to remember what you used.
Now execute the following:
Now you have a handy little command that will let you enable and disable instant hibernation on a whim. Whenever you want your machine to hibernate when you close the lid, just drop to a terminal window and type
hibernateon. When you’d prefer your laptop to just sleep, type
.bash_profile (notice the period) is a "hidden" file in your home directory.
Try this command:
and then add the two alias lines.