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

    Joined:
    Feb 18, 2010
    #1
    hi,

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

    thanks.
     
  2. keysofanxiety macrumors 604

    keysofanxiety

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

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

    Joined:
    Feb 20, 2009
    #4
    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

    Joined:
    Feb 18, 2010
    #5
    thanks. does this work in el cap?

     
  6. astrotouf macrumors newbie

    astrotouf

    Joined:
    Aug 23, 2016
    #6
    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

    Joined:
    Sep 23, 2008
    #7
    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:
    Code:
    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:
    Code:
    ls -lOh /var/vm/sleepimage

    You should get this result:
    Code:
    -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:
    Code:
    sudo pmset -a hibernatemode 3

    You may have to reboot.
     

Share This Page