nDarkness Logo
  • Home
  • Forums

Posts Tagged ‘MacBook’

9 Oct 2009

MacBook/MacBook Pro Hibernation Modes



As a power saving feature of most modern operating systems, you have the ability to save your current system state to ram, go into a power saving mode and consume very little battery power. This is a very convenient feature among portable computer users that are always on the go.

MacBooks have this feature enabled by default and there are three ways to activate it:

  1. close the lid
  2. press option+command+eject
  3. click the apple icon and select sleep

I prefer to save all of the battery life I can on my laptop when I won’t be using it for several days. Sleep mode works very well in accomplishing this goal but we can actually save virtually all of our battery power by using hibernation.

Hibernation will save the operating state to the hard drive and eliminates the need for power at all. This allows us to travel with our computer for several days at a time and not need to plug it up after that extended period to use it.

There are several methods available to activate hibernation mode in OS X. The first method is to put your laptop to sleep, unplug it and remove the battery. This will cause your laptop to enter hibernation mode and you will need to replace the battery and press the power button to wake it. I have a protective case for my laptop to protect it so this method is definitely out for me. The next method is to download one of the several available apps that will do the job for you. This is the easy method but requires no skill and very little effort on your part.

The method we will be using will require us to us the terminal and add a few lines to our .bash_profile file.  Before we begin editing the file, lets talk about the command we will be using.

There are 5 different hibernation modes for the Mac. To find out which mode your computer is using, press command+<space bar> and type in terminal. Select the terminal program from the list and type:

    pmset -g | grep hibernate

This is the output I received:

    hibernatefile    /var/vm/sleepimage
    hibernatemode    3

So what does all of this mean and how is this going to help us turn on hibernation? Below is a list of the different hibernation modes with explanations:

  • 0 – Old style sleep mode, with RAM powered on while sleeping, safe sleep disabled, and super-fast wake.
  • 1 – Hibernation mode, with RAM contents written to disk, system totally shut down while “sleeping,” and slower wake up, due to reading the contents of RAM off the hard drive.
  • 3 – The default mode on machines introduced since about fall 2005. RAM is powered on while sleeping, but RAM contents are also written to disk before sleeping. In the event of total power loss, the system enters hibernation mode automatically.
  • 5 – This is the same as mode 1, but it is for those using secure virtual memory (in System Preferences -> Security).
  • 7 – This is the same as mode 3, but it is for those using secure virtual memory.

Now lets make the changes necessary to switch back and forth from our current mode to a new one. While still in terminal enter the following commands.

    vi .bash_profile

Now add the following lines to this file:

    alias hibernateon="sudo pmset -a hibernatemode 5; pmset -g | grep hibernate"
    alias hibernateoff="sudo pmset -a hibernatemode 3; pmset -g | grep hibernate"

To exit this editor, press esc :wq enter. This will save the file with our changes and we will need to quit terminal and restart it again for our changes to take effect. Once we have restarted the terminal, type hibernateon, enter your password and now close your lid and your computer will enter hibernation mode automatically. To revert back from this new mode, open terminal again and type hibernateoff. This will return your computer to its original mode and the power saving features will work the way they did previously.

GHTime Code(s): a4d22 ed2d3 7d326 4ac2a 
9 October, 2009 at 23:54 by safety

Tags: Mac, MacBook, MacBook Pro, OS X
Posted in Mac OS X | No Comments »

  • nDarkness Recent Posts

    • Sony VSP-NS7 Digital Signage Hacking
    • OS X – Apache Web Sharing Starts But You Are Unable Connect
    • DM-Filemanager 3.9.6-9 Multiple Vulnerabilities
    • Mac OS X – Update PHP, MySQL and Easily Add GD Support
    • Facebook’s Privacy Troubles on the Horizon
    • Should MySpace Be Put Out to Pasture?
    • WordPress Sites Hacked in Bulk
    • Intuit QuickBooks Discount Error Goes Unfixed
    • DM-FileManager 3.9.9 XSS Vulnerability
    • DM-FileManager 3.9.6 Cookie Injection and Authorization Bypass Vulnerability
  • Sponsors

  • User Recent Posts

    • Zpas0000 has posted - the world .....if ran by D/K
    • Zpas0000 has posted - About
    • Mandi has posted - Teaching My Baby Sign Language
    • Mandi has posted - Weekend Fun and CJ's Birthday
    • Mandi has posted - The Do's and Don'ts of Tipping
    • Mandi has posted - First Words
    • Cassey has posted - My New Toy
  • Recent Comments

    • Jacob on Facebook’s Privacy Troubles on the Horizon
    • Sid on Intuit QuickBooks Discount Error Goes Unfixed
    • safety on Intuit QuickBooks Discount Error Goes Unfixed
    • sid on Intuit QuickBooks Discount Error Goes Unfixed
    • safety on Intuit QuickBooks Discount Error Goes Unfixed
    • rafalbo on Intuit QuickBooks Discount Error Goes Unfixed
    • safety on Should MySpace Be Put Out to Pasture?
    • wclax04 on Should MySpace Be Put Out to Pasture?
    • safety on Intuit QuickBooks Discount Error Goes Unfixed
    • kgermino on Intuit QuickBooks Discount Error Goes Unfixed
  • Categories

    • Account information (1)
    • Computer Security (8)
    • Linux (3)
    • Mac OS X (6)
    • Privacy (8)
    • Social Networking (2)
    • Software (7)
    • Uncategorized (1)
    • Utilities (5)
    • Windows (6)
  • Tags

    Apache Cookie Injection DM-Albums DM-FileManager Error Exchange Exploit Facebook Flash Flash Cookies Hacking Intuit Linux Mac MacBook MacBook Pro MySpace MySQL OS X PHP Privacy QuickBooks Service Slackware Social Networking Software Sprint Ubuntu Vulnerability Windows WordPress XP XSS
  • Archives

    • September 2010 (2)
    • August 2010 (1)
    • May 2010 (5)
    • January 2010 (1)
    • December 2009 (1)
    • November 2009 (4)
    • October 2009 (6)
  • Site Links

    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org
nDarkness is proudly powered by WordPress
Entries (RSS) and Comments (RSS).
Privacy Policy