Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

pjny

macrumors 6502a
Original poster
Feb 18, 2010
798
159
hi,

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

thanks.
 

pjny

macrumors 6502a
Original poster
Feb 18, 2010
798
159
I want to turn it off. On my last laptop with 16gb ram it gave me extra space on ssd.
 

Fishrrman

macrumors Penryn
Feb 20, 2009
29,239
13,312
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.
 

pjny

macrumors 6502a
Original poster
Feb 18, 2010
798
159
thanks. does this work in el cap?

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.
 

astrotouf

macrumors newbie
Aug 23, 2016
1
0
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 !
 

KALLT

macrumors 603
Sep 23, 2008
5,380
3,415
Is it possible to know the workaround to enable the default settings ?

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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.