Sending mobile macs based on Intel chips into sleep mode sometimes takes ages depending on RAM size as the whole RAM has to be written back to disk to prevent data loss even if the battery goes down completely. With some settings you can put things right, if you don’t want to wait this time and can afford to set the additional data security aside. On the terminal the following commands can be used to configure the sleep mode (for further information refer to Stewing Over Save Sleep and Save Sleep Revisited):
- To get the current state (default is 3):
pmset -g | grep hibernatemode
- To change the setting:
sudo pmset -a hibernatemode 0
The following values are possible:
- 0: battery buffered RAM-only mode
- 3: battery-buffer RAM and save RAM to disk (default setting)
If you want to use the RAM-only setting you should issue the following command afterwards:
sudo rm /var/vm/sleepimage
This frees up additional space (= size of installed RAM) on your hard disk which was used by the sleep image. If you set back the sleep mode to the combined mode the file will be recreated when your computer goes to sleep the next time.
The second link mentioned above describes a configuration, which sets the sleep mode depending on battery load: if the battery is low, writing the RAM to disk is automatically reactivated when the computer goes to sleep.
But that’s all plain command line hacking. There’s also a nifty solution to be integrated in the Mac’s System Settings: SmartSleep of Patrick Stein combines the terminal hacks with a nice user interface.
Rating: 






Leave a Reply