Motherboard Forums


Reply
Thread Tools Display Modes

Sleep on close

 
 
Howard S Shubs
Guest
Posts: n/a
 
      04-07-2012, 06:05 PM
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
 
Reply With Quote
 
 
 
 
dorayme
Guest
Posts: n/a
 
      04-07-2012, 09:10 PM
In article <(E-Mail Removed)>,
Howard S Shubs <(E-Mail Removed)> 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
 
Reply With Quote
 
 
 
 
unfrostedpoptart
Guest
Posts: n/a
 
      04-08-2012, 04:46 AM
On Saturday, April 7, 2012 2:10:14 PM UTC-7, dorayme wrote:
> In article <(E-Mail Removed)>,
> 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
 
Reply With Quote
 
unfrostedpoptart
Guest
Posts: n/a
 
      04-08-2012, 05:28 AM
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 <(E-Mail Removed)>,
> > 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
 
Reply With Quote
 
Howard S Shubs
Guest
Posts: n/a
 
      04-08-2012, 06:34 AM
In article <(E-Mail Removed)>,
dorayme <(E-Mail Removed)> wrote:

> In article <(E-Mail Removed)>,
> Howard S Shubs <(E-Mail Removed)> 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
 
Reply With Quote
 
David Empson
Guest
Posts: n/a
 
      04-08-2012, 11:01 AM
Howard S Shubs <(E-Mail Removed)> wrote:

> In article <(E-Mail Removed)>,
> dorayme <(E-Mail Removed)> wrote:
>
> > In article <(E-Mail Removed)>,
> > Howard S Shubs <(E-Mail Removed)> 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
(E-Mail Removed)
 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      04-10-2012, 07:24 AM
In article
<23219543.203.1333862925638.JavaMail.geo-discussion-forums@ynbq18>,
unfrostedpoptart <(E-Mail Removed)> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
to sleep or not to sleep srdjan.m Apple 5 10-28-2006 02:20 PM
to sleep or not to sleep srdjan.m Apple 0 10-27-2006 09:47 PM
to sleep or not to sleep srdjan.m Apple 0 10-27-2006 09:41 PM
NF7-S 2.0, SndStorm.exe has encountered a prolbem and needs to close igor Abit 2 09-23-2004 05:48 PM
P4C800 Deluxe Memory: How close is close? rfdjr1@optonline.net Asus 9 03-03-2004 03:13 AM


All times are GMT. The time now is 04:34 AM.


Welcome!
Welcome to Motherboard Point
 

Advertisment