use safe sleep alias hibernate
The last days I noticed that the MacBook Pro has a very inefficient sleep mode. If you are on the road for 4 hours not using your MBP, batter power is already below the critial 95%, and if you leave it over night, it wakes in the morning with less than 90%. This is quite annoying because every charge cycle decreases your battery capacity.
I've been looking for a way to activate hibernate on demand and found the hint "A helper script to enter SafeSleep on demand" on macosxhints.com. If you follow the discussion you see that there are other ways to do so, but the original hint works fine with me.
Use this link to create the Applescript document or open the Scripteditor.app and paste the code below:
do shell script "/usr/bin/pmset -a hibernatemode 1" password "_password_" with administrator privileges ignoring application responses tell application "Finder" to sleep do shell script "(/bin/sleep 20 && /usr/bin/pmset -a hibernatemode 3) &> /dev/null &" password "_password_" with administrator privileges end ignoringreplace
_password_with your administrator password- save as; enter a name you want; select format "Application Bundle"; activate option "Run Only"
in the original hint it says you should add the following lines to the Info.plist file (rightclick on the application , show package contents, open contents, open the file):
<key>LSUIElement</key> <string>1</string>I am not very sure what this is supposed to do but you might want to change it.
The number 20 tells how many seconds the computer presumably needs to go into hibernate sleep. After that the sleep mode is set back to normal sleep. If your computer goes into hibernate mode all the time you want to activate normal sleep, 20 seconds might be too short. The MBP takes rather long to go into sleep compared to PPC macs, so if you run this script on a PPC machine (with a rather small amount of RAM) you might substitute 20 with 15 or even 12.



