How to turn off hibernation in el cap?

Discussion in 'OS X El Capitan (10.11)' started by pjny, Oct 29, 2015.

  1. pjny macrumors 6502a

    Feb 18, 2010

    turing of hib was easy in yosemite. how do you do it in el cap?

  2. keysofanxiety macrumors 604


    Nov 23, 2011
    Have you tried Apple menu>System Preferences>Energy Saver? Disable hard-drive sleep and display/computer sleep?
  3. pjny thread starter macrumors 6502a

    Feb 18, 2010
    I want to turn it off. On my last laptop with 16gb ram it gave me extra space on ssd.
  4. Fishrrman macrumors G3

    Feb 20, 2009
    From my archives, I found this:
    First, disable hibernation mode :
    sudo pmset -a hibernatemode 0

    delete /private/var/vm/sleepimage :
    sudo rm /private/var/vm/sleepimage

    create an empty file and name it 'sleepimage' :
    sudo touch /private/var/vm/sleepimage

    change this flag to immuable:
    sudo chflags uchg /private/var/vm/sleepimage

    Now, OS X won't be able to rebuilt over your sleepimage file since it is locked.
  5. pjny thread starter macrumors 6502a

    Feb 18, 2010
    thanks. does this work in el cap?

  6. astrotouf macrumors newbie


    Aug 23, 2016
    Hello, Thank you for this tip. It worked for me. Now I want to go back to the standard.

    Is it possible to know the workaround to enable the default settings ?

    thanks !
  7. KALLT macrumors 601

    Sep 23, 2008
    If you followed Fishrrman’s suggestion fully, then you should proceed as follows. First, you need to restore the sleep image to its original state with these commands:
    sudo chflags nouchg /var/vm/sleepimage
    sudo chown root:wheel /var/vm/sleepimage
    sudo chmod 1600 /var/vm/sleepimage

    To verify, when you type this command:
    ls -lOh /var/vm/sleepimage

    You should get this result:
    -rw------T  1 root  wheel  -  4.0G Aug 23 15:01 /var/vm/sleepimage

    Then you need to reset the hibernation mode to its system default:
    sudo pmset -a hibernatemode 3

    You may have to reboot.

Share This Page