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

MikesGravity

macrumors 6502
Original poster
Oct 29, 2008
458
154
Southeast MI
So I recently used terminal to do the standby "hack" and changed the time, all is great, instant on whenever I need.

Is there any benefit to deleting the page file that standby was creating on my SSD? Will it just make a new one when (if ever) it goes into "deep sleep" again?
 
So I recently used terminal to do the standby "hack" and changed the time, all is great, instant on whenever I need.
Is there any benefit to deleting the page file that standby was creating on my SSD? Will it just make a new one when (if ever) it goes into "deep sleep" again?
Basically the only advantage is the space saved, the same size as your RAM. If you need that space, here are the steps (found here on this forum, can't give credit where it is due as this is a compilation of info). I have done this, and my MBP runs just fine.

Open a Terminal shell (in the /Applications/Utilities folder)
pmset -g
will list all the current power settings/device settings.
1. set hibernate mode to 0
sudo pmset -a hibernatemode 0
hibernationmode 0 is normal sleep, data kept in ram, nothing written to disk
2. delete the unnecessary sleep file (since hibernate is disabled) to regain disk space equal to memory (saves the same amount of disk space as your RAM, eg. 8 GBs, valuable on an SSD),
You can use the Go to folder menu to delete the file, found in the /var/vm/ folder, and named sleepimage. Reboot and simply delete that file,. Or use this:
sudo rm /var/vm/sleepimage or sudo rm /private/var/vm/sleepimage
The sleep image file is actually in /Private/var/vm/ but /var/vm/ is a symbolic link to that location.
Optional: Create a blanked zero-byte file so the OS cannot rewrite the file:
sudo touch /private/var/vm/sleepimage
Make the file immutable:
sudo chflags uchg /private/var/vm/sleepimage
3. If pmset -g shows: autopoweroff**1,
disable this automatic hibernation mode (happens even if hibernation mode is set to 0 on the new Mac mini 2012 and iMac)
sudo pmset -a autopoweroff 0
4. set the safe sleep timer (standbydelay) to 20 hours, default is 4200
sudo pmset -a standbydelay 72000
5. sudo pmset -a standby 0
While researching this, I noticed that bit 3 of hibernatemode encourages the dynamic pager to page out inactive pages prior to hibernation. So this appears to be why I have swap used after sleeping (even though my hibernatemode is 0, so bit 3 is off). I disabled this new, possibly buggy behavior by switching off standby: sudo pmset -a standby 0
:cool:
 
Thanks for the instructions! Did your macbook just wright another 8GB or 16GB file again or does it truly stay off?

Basically the only advantage is the space saved, the same size as your RAM. If you need that space, here are the steps (found here on this forum, can't give credit where it is due as this is a compilation of info). I have done this, and my MBP runs just fine.

Open a Terminal shell (in the /Applications/Utilities folder)
pmset -g
will list all the current power settings/device settings.
1. set hibernate mode to 0
sudo pmset -a hibernatemode 0
hibernationmode 0 is normal sleep, data kept in ram, nothing written to disk
2. delete the unnecessary sleep file (since hibernate is disabled) to regain disk space equal to memory (saves the same amount of disk space as your RAM, eg. 8 GBs, valuable on an SSD),
You can use the Go to folder menu to delete the file, found in the /var/vm/ folder, and named sleepimage. Reboot and simply delete that file,. Or use this:
sudo rm /var/vm/sleepimage or sudo rm /private/var/vm/sleepimage
The sleep image file is actually in /Private/var/vm/ but /var/vm/ is a symbolic link to that location.
Optional: Create a blanked zero-byte file so the OS cannot rewrite the file:
sudo touch /private/var/vm/sleepimage
Make the file immutable:
sudo chflags uchg /private/var/vm/sleepimage
3. If pmset -g shows: autopoweroff**1,
disable this automatic hibernation mode (happens even if hibernation mode is set to 0 on the new Mac mini 2012 and iMac)
sudo pmset -a autopoweroff 0
4. set the safe sleep timer (standbydelay) to 20 hours, default is 4200
sudo pmset -a standbydelay 72000
5. sudo pmset -a standby 0
While researching this, I noticed that bit 3 of hibernatemode encourages the dynamic pager to page out inactive pages prior to hibernation. So this appears to be why I have swap used after sleeping (even though my hibernatemode is 0, so bit 3 is off). I disabled this new, possibly buggy behavior by switching off standby: sudo pmset -a standby 0
:cool:
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.