Sleep on close

Discussion in 'Apple' started by Howard S Shubs, Apr 7, 2012.

  1. Is there a way to restore the old "sleep on close" behavoir for MacBook
    Pros? Now it simply shuts off the screen if you close it, and
    rearranges the Desktop.

    --
    May joy be yours all the days of your life! - Phina
    We are but a moment's sunlight, fading in the grass. - The Youngbloods
    Those who eat natural foods die of natural causes. - Kperspective
    Howard S Shubs, Apr 7, 2012
    #1
    1. Advertising

  2. Howard S Shubs

    dorayme Guest

    In article <>,
    Howard S Shubs <> wrote:

    > Is there a way to restore the old "sleep on close" behavoir for MacBook
    > Pros? Now it simply shuts off the screen if you close it, and
    > rearranges the Desktop.


    DE said to me:

    "
    ....

    "hibernatation mode".
    It is controlled by a hidden setting, and is normally enabled for
    notebook models, disabled for desktop models.
    This command in Terminal shows the current power management settings
    for all power modes:

    pmset -g custom

    Look for the "hibernatemode" line under the Battery Power and AC Power
    headings. The only modes which should be used, from the man page:
    hibernatemode = 0 is the default on supported desktops. The system
    will not back memory up to persistent storage. The system must wake
    from the contents of memory; the system will lose context on power
    loss. This is, historically, plain old sleep.
    hibernatemode = 3 is the default on supported portables. The system
    will store a copy of memory to persistent storage (the disk), and will
    power memory during sleep. The system will wake from memory, unless a
    power loss forces it to restore from disk image.

    hibernatemode = 25 is only settable via pmset. The system will store a
    copy of memory to persistent storage (the disk), and will remove power
    to memory. The system will restore from disk image. If you want
    "hibernation" - slower sleeps, slower wakes, and better battery life,
    you should use this setting.
    [end quote]

    If you want to change the setting, you need to be logged in as an
    admin user and use the 'sudo' command to execute the command with root
    priveleges. It will ask for a password - enter your account password.
    Assuming you want to disable hibernation completely:

    sudo pmset -a hibernatemode 0

    The -a option specifies all power sources.

    If you want different modes for when running on power adapter or
    battery (at the point the computer goes to sleep), you will need to
    enter the command twice, replacing -a with -b for battery or -c for
    charger, and replacing 0 with the desired mode."

    Interesting as this is, my problem, a sudden change in the time it
    took for my MB to go to sleep after lid close or key command, fixed it
    itself for a reason I have no idea about. A week or so after DE
    replied and I looked into the matter, it suddenly worked as it used to
    work for years. I will spare you details but just make the point that
    mysterious things can happen with Sleep, logging off and on, sys prefs
    and other settings, and sometimes it is hard to pin down, there maybe
    some instabilities in the OS?

    --
    dorayme
    dorayme, Apr 7, 2012
    #2
    1. Advertising

  3. On Saturday, April 7, 2012 2:10:14 PM UTC-7, dorayme wrote:
    > In article <>,
    > Howard S Shubs <howard@...> wrote:
    >
    > > Is there a way to restore the old "sleep on close" behavoir for MacBook
    > > Pros? Now it simply shuts off the screen if you close it, and
    > > rearranges the Desktop.

    >
    > DE said to me:


    >
    > "hibernatation mode".
    > It is controlled by a hidden setting, and is normally enabled for
    > notebook models, disabled for desktop models.
    > This command in Terminal shows the current power management settings
    > for all power modes:
    >
    > pmset -g custom


    Thanks so much for this info! I never heard of the pmset command. For years I made fun of people at work who carried around their Windows laptops half open so they wouldn't turn off when they could easily change the settings for closing the screen. Now it's been joke on me with my new MBA and doing the same thing! I'll have to study all the options more to set this up the way I want.

    Any nice GUI app / pref pane that is a front end for this?

    David
    unfrostedpoptart, Apr 8, 2012
    #3
  4. On Saturday, April 7, 2012 9:46:27 PM UTC-7, unfrostedpoptart wrote:
    > On Saturday, April 7, 2012 2:10:14 PM UTC-7, dorayme wrote:
    > > In article <>,
    > > Howard S Shubs <howard@...> wrote:
    > >
    > > > Is there a way to restore the old "sleep on close" behavoir for MacBook
    > > > Pros? Now it simply shuts off the screen if you close it, and
    > > > rearranges the Desktop.

    > >
    > > DE said to me:

    >
    > >
    > > "hibernatation mode".
    > > It is controlled by a hidden setting, and is normally enabled for
    > > notebook models, disabled for desktop models.
    > > This command in Terminal shows the current power management settings
    > > for all power modes:
    > >
    > > pmset -g custom

    >
    > Thanks so much for this info! I never heard of the pmset command. For years I made fun of people at work who carried around their Windows laptops half open so they wouldn't turn off when they could easily change the settings for closing the screen. Now it's been joke on me with my new MBA and doing the same thing! I'll have to study all the options more to set this up the way I want.



    Spoke too soon :(
    sudo pmset -a lidwake 0
    Does stop it from automatically turning on when I open the lid but it doesn't stop it from going to sleep when I close the lid! I know this thread was started to get it to sleep when closing, but I'm trying to have it not dothat. Anyone know why this isn't working? Several forum articles I've found said it should but maybe it's changed in Lion or something on the 2011 MBA.

    David
    unfrostedpoptart, Apr 8, 2012
    #4
  5. In article <>,
    dorayme <> wrote:

    > In article <>,
    > Howard S Shubs <> wrote:
    >
    > > Is there a way to restore the old "sleep on close" behavoir for MacBook
    > > Pros? Now it simply shuts off the screen if you close it, and
    > > rearranges the Desktop.

    >
    > DE said to me:
    >
    > "
    > ...
    >
    > "hibernatation mode".
    > It is controlled by a hidden setting, and is normally enabled for
    > notebook models, disabled for desktop models.
    > This command in Terminal shows the current power management settings
    > for all power modes:
    >
    > pmset -g custom
    >
    > Look for the "hibernatemode" line under the Battery Power and AC Power
    > headings. The only modes which should be used, from the man page:
    > hibernatemode = 0 is the default on supported desktops. The system
    > will not back memory up to persistent storage. The system must wake
    > from the contents of memory; the system will lose context on power
    > loss. This is, historically, plain old sleep.
    > hibernatemode = 3 is the default on supported portables. The system
    > will store a copy of memory to persistent storage (the disk), and will
    > power memory during sleep. The system will wake from memory, unless a
    > power loss forces it to restore from disk image.


    That's what it's set to. I wonder if the external monitor is what's
    changing things. Thanks.

    --
    May joy be yours all the days of your life! - Phina
    We are but a moment's sunlight, fading in the grass. - The Youngbloods
    Those who eat natural foods die of natural causes. - Kperspective
    Howard S Shubs, Apr 8, 2012
    #5
  6. Howard S Shubs

    David Empson Guest

    Howard S Shubs <> wrote:

    > In article <>,
    > dorayme <> wrote:
    >
    > > In article <>,
    > > Howard S Shubs <> wrote:
    > >
    > > > Is there a way to restore the old "sleep on close" behavoir for MacBook
    > > > Pros? Now it simply shuts off the screen if you close it, and
    > > > rearranges the Desktop.

    > >
    > > DE said to me:
    > >
    > > "
    > > ...
    > >
    > > "hibernatation mode".
    > > It is controlled by a hidden setting, and is normally enabled for
    > > notebook models, disabled for desktop models.
    > > This command in Terminal shows the current power management settings
    > > for all power modes:
    > >
    > > pmset -g custom
    > >
    > > Look for the "hibernatemode" line under the Battery Power and AC Power
    > > headings. The only modes which should be used, from the man page:
    > > hibernatemode = 0 is the default on supported desktops. The system
    > > will not back memory up to persistent storage. The system must wake
    > > from the contents of memory; the system will lose context on power
    > > loss. This is, historically, plain old sleep.
    > > hibernatemode = 3 is the default on supported portables. The system
    > > will store a copy of memory to persistent storage (the disk), and will
    > > power memory during sleep. The system will wake from memory, unless a
    > > power loss forces it to restore from disk image.

    >
    > That's what it's set to. I wonder if the external monitor is what's
    > changing things. Thanks.


    If you have an external monitor plugged in, then what is supposed to
    happen on closing the lid is:

    1. Computer goes to sleep.

    2. If you have an external keyboard or mouse (USB or Bluetooth), press a
    key, move the mouse, or do something else which wakes up the computer,
    it will operate in "clamshell" mode, where the internal display is
    disabled and the external display is the primary (and only) display.
    Assuming they are different resolutions, this will result in the desktop
    being rearranged.

    If something prevented the computer going to sleep when the lid was
    closed, then an external display would trigger immediately going into
    clamshell mode.

    3. If you open the lid again, the normal arrangement is restored, so the
    built-in display becomes the primary, resulting in another round of icon
    rearrangements.

    I'm not aware of any settings to configure this behaviour.

    --
    David Empson
    David Empson, Apr 8, 2012
    #6
  7. Howard S Shubs

    dorayme Guest

    In article
    <23219543.203.1333862925638.JavaMail.geo-discussion-forums@ynbq18>,
    unfrostedpoptart <> wrote:

    > I know this thread was started to get it [MB] to sleep when closing, but I'm
    > trying to have it not do that.


    Mine can be awake and spinning away with the lid closed on my desk,
    where it is connected to an external screen and usb keyboard. They
    call this clamshell mode for obvious reasons. I never do this now
    because it surely breathes a bit better (through the keyboard) with
    the lid open and I can still spare the screen by dimming it to zero.

    Why you would want to be able to prevent sleep on closing the lid when
    it is not connected to external monitors, I am not sure? Perhaps if
    you are connected to the internet wirelessly and are up or downloading
    or waiting for an email while walking about with the MB? However, you
    might perhaps, instead, set Sys Prefs for Energy to wake on network
    activity, not put the HD to sleep...

    --
    dorayme
    dorayme, Apr 10, 2012
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. igor
    Replies:
    2
    Views:
    250
    helinut
    Sep 23, 2004
  2. Replies:
    9
    Views:
    401
  3. srdjan.m

    to sleep or not to sleep

    srdjan.m, Oct 27, 2006, in forum: Apple
    Replies:
    5
    Views:
    269
    Barry Margolin
    Oct 28, 2006
  4. srdjan.m

    to sleep or not to sleep

    srdjan.m, Oct 27, 2006, in forum: Apple
    Replies:
    0
    Views:
    224
    srdjan.m
    Oct 27, 2006
  5. srdjan.m

    to sleep or not to sleep

    srdjan.m, Oct 27, 2006, in forum: Apple
    Replies:
    0
    Views:
    217
    srdjan.m
    Oct 27, 2006
Loading...

Share This Page