Hibernation Tool for Mac OS

Hibernate Since quite some time Mac OS also has a hibernation mode, also known as suspend-to-disk. But as usual for Mac, you cannot select it by hand. In fact, a suspend-to-ram always does a suspend-to-disk as well, so that in a case of power loss (like empty battery) you can start the computer from the image on the hard disk without losing anything. Apple calls this suspend combination “Safe-Sleep“.

So far so nice. But sometimes you might want to go directly into hibernation mode. Therefore I wrote a little applescript, which in respect to similar scripts doesn’t need any administrator rights to work. In fact the icon was the most difficult part.

Download it right here.

For an easy access to the hibernation mode, you either move it to /Applications/ or somewhere else and drag it into your dock, or you put it in ~/Library/Scripts and activate the script menu with the Applescript Utility.

PS.: If your Mac does not support the hibernation mode, there is a chance that you can enable it. Look here.

PPS.: As a Mac OS X user you might also be interested in another tool by me: UpdateCheck (Software Update Notifications for Non-Admin-Users)

Troubleshooting: if you experience that your computer still goes into normal sleep mode, open Hibernate.app/Contents/Resources/Scripts/main.scpt and increase the delay to 30 at the end of the script.

26 Gedanken zu “Hibernation Tool for Mac OS

  1. Pingback: Ralf's Blog

  2. Exactly what i needed, great work ;)

    As i’m used to have the Dashboard turned off for performance improvements i needed the “Deep Sleep”-Widget as App-Solution – got it ;)

  3. Thank you – this is exactly what I have been looking for. There are a couple of apps out there that are far too clever, all I’ve wanted was something that would let me hibernate the computer at the end of the day without interfering with the MacBook’s usual sleep mode which is really quick and effective. This is perfect. Many thanks.

  4. this is great–please continue to update it. i think hibernation is more energy efficient, and thus much better for the environment, than normal sleep. (perhaps apple likes selling batteries more than saving the world?) i would love the option to turn off the confirmation dialog, however, to make it quicker. it’s just an extra step i don’t need, since the worst result of a mistaken double-click is 30 lost seconds. danke!

  5. @matt: you can easily change that on your own. Just open Hibernate.app with the “Script Editor.app” and add a -- to the beginning of the line display dialog ("Do you want to hibernate?" &...

  6. Hello,
    thank you for sharing this very useful app. I think though, that it doesn’t save the ram where the safe sleep saves it, but on a different location instead. Since I got 4 gigs of ram, safe sleep takes 4 gigs, and I think now that I ran hibernate.app it takes another 4 gigs.
    If I’m right, may I ask where it saves them so I can delete them manually?
    Thanks

  7. @Orestis: The tool doesn’t decide were to save the memory. It just tells the system to go into hibernation. Everything else is done by Mac OS, so I have no idea why there should be a difference. And to be honest, I don’t believe it, you are probably seeing something else.

  8. Is it possible to write a script for the hibernatemode 5 instead of 1? Thanks.

  9. @Tom: The man page of pmset doesn’t say anything about hibernatemode 5, so I have no idea what that mode is. But if you know, what you do, you can just drag the Hibernation.app on the Script Editor and change the value in line do shell script "/usr/bin/pmset force -a hibernatemode 1"

  10. Thanks, that worked great. Mode 5 is the same as 1 except for use with secure memory setting on newer macs.

    From a macworld article:


    # 0 – Old style sleep mode, with RAM powered on while sleeping, safe sleep disabled, and super-fast wake.
    # 1 – Hibernation mode, with RAM contents written to disk, system totally shut down while “sleeping,” and slower wake up, due to reading the contents of RAM off the hard drive.
    # 3 – The default mode on machines introduced since about fall 2005. RAM is powered on while sleeping, but RAM contents are also written to disk before sleeping. In the event of total power loss, the system enters hibernation mode automatically.
    # 5 – This is the same as mode 1, but it’s for those using secure virtual memory (in System Preferences -> Security).
    # 7 – This is the same as mode 3, but it’s for those using secure virtual memory.”

  11. @Tom: I think this information is not accurate. I remember modes 5 and 7 were mentioned in older man pages of pmset, but Apple removed it with a reason I assume. Just read section “A Question of Encryption” in this article: http://db.tidbits.com/article/9115

    I quote: “Don’t ever use 5 or 7.”

  12. Pingback: the switch, extended » scribbling damselfly » deborahkalin.com

  13. Pingback: How to enable hibernate mode on a Mac | Geek Guides

  14. Pingback: kaputtendorf » UpdateCheck

  15. Sometimes when resuming from Hibernation, the mouse cursor is still set to the wait wheel (black / white)?

  16. Thanks very much for this app; it works very well. However, I was wondering: I’d like to use this as a way to more quickly switch between Windows and Mac OS X. When I turned the machine back on, I held down the Option key but was not presented with a choice of OSes to load — it just went straight back into OS X.

    Do you know of any way to work around this so that I can chose to run Windows instead? I’m aware of Virtual Machines and the like but I am using Windows for gaming primarily and the games run far better natively.

    Thanks again for this great utility.

  17. Thank you very much for this script, I believe it will be very useful to me.

    Indeed, I have the same question as matalk: can’t I boot to an other OS while OSX is suspended-to-disk?

    I use rEFIt to load my Linux, but it is never loaded: the RAM is restored directly.

    That would be so nice to be able to switch from one OS to an other without the booting process…

  18. Pingback: How to hibernate Mac OS X | Code Mox

  19. Pingback: Como hibernar o Mac | iSengardian

  20. Pingback: Otra opción para poner tu Mac a hibernar | Soy de Mac

  21. Hi Sveenie, thanks for this good script.

    I’d like to advice about the hibernatemode used, you use the mode 1, that is aceptable, but if we read at pmset manual ($ man pmset) we can read at the hibernatemode section (please everyone read it):

    ” We do not recommend modifying hibernation settings. Any changes you make
    are not supported. If you choose to do so anyway, we recommend using one
    of these three settings. For your sake and mine, please don’t use any-
    thing other 0, 3, or 25.”

    Basically the mode 25 is the same than 1 (hibernation ON, power OFF) but reducing the ammount of RAM written to disk to minimal. I tested this and the time for hibernation and restore is much better than using mode 1, besides the CPU is less used (CPU fan is lesser noisy for lesser time).

    So I modified the script to use mode 25 for my own, but I thought you’d like to know for modifing the script for everyone.

  22. Hi Sveenie, I use to have your software working fine in my older Mac OS but when I updated to Mac OS X 10.7.4 it stopped working and I get error message: “exit return_code = 0xe00002c1″ do you know how do I fix it? Any help would be fine. Thank you.

Hinterlasse eine Antwort

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind markiert *

*

Du kannst folgende HTML-Tags benutzen: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>