Tuesday, September 22, 2009

Make Macbook Pro Hibernate


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 harddisk. 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 modern Mac that uses “Secure virtual memory”.
  • 7 - Behaves as 3 but applicable only for 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 3"

hibernateon and hibernateoff can be any text you want, you just need to remember what you used.

See follow-up: http://linuxtoosx.blogspot.com/2011/10/optimizing-mac-os-x-for-ssd-drives.html

No comments:

Post a Comment