Command for changing standby preference?

Discussion in 'MacBook Pro' started by JTToft, Mar 10, 2011.

  1. JTToft macrumors 68040

    Joined:
    Apr 27, 2010
    Location:
    Aarhus, Denmark
    #1
    Hi!

    I remember fiddling around with a MacBook a couple of years ago, and I found a command that would change the way the computer goes into standby mode. It would tell the computer to save the state to RAM instead of writing it to the hard drive.

    I remember that there was a significant improvement in the time it takes from you close the lid to the laptop actually goes into standby. I would like to try this out on my new MacBook Pro, but I can't seem to find the information anywhere.

    Does anyone know this command?

    - Thank you! :)
     
  2. bamf macrumors 6502

    Joined:
    Feb 14, 2008
    #2
    Grab SmartSleep - it will give you all the options in System Preferences.
     
  3. mulo macrumors 68020

    mulo

    Joined:
    Aug 22, 2010
    Location:
    Behind you
    #4
    this is default behavior, it will then proceed to save the ram to the hard drive should the battery become low on battery.
     
  4. JTToft thread starter macrumors 68040

    Joined:
    Apr 27, 2010
    Location:
    Aarhus, Denmark
    #6
    - Not entirely true. By default it saves to both RAM and hard drive when you close the lid. I wanted to change this so that it only saves to RAM and thereby reduce the time it takes the system to go to sleep.

    - This was exactly what I was looking for! Thank you.
    Before it could take up to 15 seconds for my laptop to go to sleep (after closing the lid). Now it takes 1-3 seconds. :)
     
  5. DustinT macrumors 68000

    DustinT

    Joined:
    Feb 26, 2011
    #7
    There is a major advantage to having your data written to both the ram and the hard drive. Yes, writing to ram is quicker but writing to the hard drive is more reliable. And, it allows the macbook to manage its sleep states itself. Personally, I don't see any need to change this setting as its quite valuable as it is.
     
  6. JTToft thread starter macrumors 68040

    Joined:
    Apr 27, 2010
    Location:
    Aarhus, Denmark
    #8
    - The default method is really slow. 8 out of 10 times when I close my lid, I do it because I want to move the computer (putting it in a backpack for instance). I don't wish to wait for 15 seconds before I can move it.

    The only advantage I see in the default setting is that the computer will turn itself off completely if the battery percentage gets low enough, while still being able to resume where you left off when you plug it in.
    To me, this is a minor disadvantage, since the computer only uses about 4% battery over 8 hours when sleeping (my experience from a couple of days ago). At this rate your (fully charged) battery won't run out until after 8 days. That's enough for me...

    Do you mind explaining why you think writing to the hard drive is more reliable than writing to RAM?
     
  7. Ccrew macrumors 68020

    Joined:
    Feb 28, 2011
    #9
    Solid reason to change it is if you have an SSD that has sleep issues.

    To the OP, you're looking at the pmset commands from Terminal to put you on the right track.

    pmset -g | grep hibernatemode will give you current settings.
     
  8. JTToft thread starter macrumors 68040

    Joined:
    Apr 27, 2010
    Location:
    Aarhus, Denmark
    #10
    - I know. That was what the MacWorld article that iceberg888 posted was about.
    But I thank you for your contribution anyway!
     
  9. Ccrew macrumors 68020

    Joined:
    Feb 28, 2011
    #11
    Yeah, went back after the fact and saw that link... normally not a link follower :) Sorry!
     
  10. iceberg888 macrumors newbie

    Joined:
    Dec 2, 2010
    Location:
    San Francisco, CA
    #12
    One downside to writing the RAM contents to memory is that it takes longer the more memory you have. In other words, if you have 8GB of RAM, it has to write twice the amount to your hard drive than if you had 4GB of RAM. So if you were waiting 15-20 seconds with 4GB and you upgrade to 8GB, you would likely be waiting 30-40 seconds. And if you can afford OWC's new 16GB kit, you might be looking at 60-70 seconds extrapolating from the OP's comments!

    Plus, if you have an SSD, you may want to limit this kind of frequent, large writes to the drive to help limit wear. But having access to the terminal commands gives you flexibility to turn this mode on/off based on your needs.
     

Share This Page