How to safe-sleep (hibernate) your Mac.

Discussion in ' News Discussion' started by MacBytes, Nov 12, 2005.

  1. macrumors bot

    Jul 5, 2003
  2. macrumors 6502a

    Flying Llama

    Aug 4, 2004
    Los Angeles
  3. macrumors 604


    Jan 20, 2005
    Since it's essentially a hack, what happens when you update OSX to 10.4.4?
  4. macrumors 6502a


    Oct 21, 2003
    very cool. I've always wondered why Apple didn't have a hibernation mode in its gear/OS.
  5. macrumors member

    Jul 17, 2005
    In unfathomable darkness
    I got bored and decided to write a couple of applescripts to enable and enter safe sleep.

    *Note these come with absolutely no warranty, do not complain to me if they ruin your system.

    also, i highly advice someone with more experience with applescript to review these.

    edit: do NOT use these if you have secure virtual memory enabled

    Attached Files:

  6. macrumors regular

    Oct 26, 2004
    Heck with all the benefits of storing your RAM on your ROM, this is a way of sleeping that kills the 1,000,000 lumen lighthouse beacon of insomnia on my PB! Now I can sleep in my bedroom at the same time as my powerbook!
  7. macrumors G5


    May 2, 2002
    No kidding, my PowerBook has enough juice to sleep for days, but that light is enough to read by :D

    Question: if you have one of the new PBs, do you have the choice in the GUI whether to fast sleep or safe sleep?

    Or is it just that it will automatically go into safe sleep AFTER you've already run down your batteries most of the way and hypnnotized yourself with the light for days?

    (I know this hack allows you to safe sleep immediately--just wondering if that's also available without the hack.)
  8. macrumors G3


    Aug 30, 2003
    Probably nothing, all this does is set two flags (one in the firmware to mark the machine as being capable of safe sleep, one that tells the power mangler to try it). No actual code is harmed in this exercise, so at worst youmight be stuck with the old-style sleep if Apple decide to disable this for marketing reasons.
  9. macrumors 68030

    Analog Kid

    Mar 4, 2003
    My interpretation from the article is that this is a safety net. The system always dumps your RAM to the hard drive but only uses it if it realises it woke up labotomized...

    'Suppose we could read the Apple notes...
  10. macrumors G3


    Aug 30, 2003
    Yep, that's what happens. It only does the load from disk on wake if you disconnect the power (you'll see a progress bar if the image is used).
  11. macrumors 68000

    Aug 5, 2005
    The only problem is that there are times when I need a fast sleep/wake cycle (school), and times where I want it to go to safesleep straight away (at home - but then again, I used to prop a stick of RAM against the light :p). But, either way, it's working just fine :D
  12. macrumors G5


    May 2, 2002
    Does it do it if you merely disconnect the power (like everyone with a laptop does in transit)? So as to prevent the batteries from running down at all?

    Or does it do it only if you disconnect power AND the batteries also run down?

    I'm guessing the latter since it would wake faster--best of both worlds--but I wouldn't mind the choice in the GUI. Then, before a long transit time, I'd choose Unpowered Sleep (or whatever) instead of just shutting the lid.
  13. macrumors G3


    Aug 30, 2003
    On the portables, it's only using the image if it loses both battery and AC.
    I suppose you could just pull the battery, if your bag has room for that.

Share This Page