Detailed Mac sleep mode settings

Source: Internet
Author: User

Detailed Mac sleep mode settings



Original link: http://www.insanelymac.com/forum/index.php?showtopic=281945



The
first thing to note is that this article is for users who have been able to sleep and wake up successfully.
If your sleep now has a variety of problems, then this article may not be the most you need at this stage
Of course, below, I would also mention that a point in the article might make it possible for you to sleep on a machine
that is not sleeping.


Check for active settings


After you open the terminal, the first thing to do is to determine the sleep mode that your Mac OS is currently using, In case you need to set it back .

You can observe and change the sleep mode by using Unix command pmset .

To view the current sleep mode settings, enter the following command at the terminal:

    1. Pmset-g | grep Hibernatemode
Copy Code



You should see a result similar to the following in the terminal:

    1. $ pmset-g | grep Hibernatemodehibernatemode 3
Copy Code



Okay, now we can see that your machine is in mode 3 .

Thanks to a very handy little plugin in dashboard deep Sleep Instructions

We can correctly separate the characteristics of each sleep pattern:

0-old sleep mode
Memory power-up during sleep, disable safe sleep (secure sleeping), ultra-fast wake-up

1-Sleep mode

The in-memory data is written to disk, and the system shuts down completely during so-called "sleep"
Slow wake-up due to the need to read memory data previously saved to the hard disk

3-sleep mode (machine defaults after fall 2005)

During sleep, the memory remains energized while the memory data is written to the hard disk before entering sleep mode

In case there is no external power and the battery is completely dead, the system will automatically enter sleep mode

5-Same as Mode 1

But this is for those users who use secure virtual memory. System Preferences Security

7-Same as Mode 3

But the same is true for users who use secure virtual memory

Now that you know where you are now, make a record.

You can also use the following instructions, one step:

    1. sudo pmset-g | grep hibernatemode > ~/desktop/current_mode.txt
Copy Code



This command will delete all the results of the Pmset commands except for the last mode value.

then export the results to the desktop named text file for current_mode.txt

In case of future need, save this file.

Attention:

I was deliberately so cautious here.

In fact, unless you've ever worked with this setting, your Mac isn't in mode 0 or 3 or 7.

If you're in mode 0, this tip doesn't matter to you, because your Mac still uses old-fashioned sleep

Save a text file with 3 or 7 numeric values it's a little too many.

But at least in the future, you're not going to get stuck in the initial pattern, 3 or 7.




Change sleep mode settings


To change the sleep mode, you need to use the Pmset command, plus the variable and the corresponding value you want to change.

So if you want to go back to the old-fashioned sleep mode (from above you can know that mode 0), enter the following command:

    1. sudo pmset-a hibernatemode 0
Copy Code



Press Enter and you will be prompted for your password

After you lose the carriage return, your sleep mode is complete.

If you want to use the original setting, replace the "0" of the above instruction with the value stored in the Current_mode.txt

Of course, this also means that you can also set your machine directly into sleep mode, the method is to change the last value from 0 to 1

I found an easier way to use the deep Sleep plugin mentioned above

This plugin will return the value before it is in hibernation mode, which means

You can use this plugin to enter hibernation while closing the lid

(notebook @[email protected]) can also enter normal sleep mode

It is important to note that the above changes do not require a reboot to take effect



Free up some disk space


If your machine's previous settings are 3 or 7 and you have set up the use of old sleep mode, you can proceed to the next step:

Release the portion of the disk space that you used to save the system memory backup before you changed sleep mode

Enter the following two instructions in the terminal, press ENTER to input the password

    1. Cd/var/vm
    2. sudo rm sleepimage
Copy Code



If you go back to the new sleep mode,

This sleep image file (Sleepimage) will automatically be created when you execute the sudo pmset command

An execution instruction is created, not the first time the machine goes into sleep mode



Summarize


Note: The following "I" means the original author

Personally, I think new sleep is better, I also set my machine to this mode

But if you prefer old-fashioned sleep, you already know how to set up a

Yes, it does take a trip on the end of the road.

But once you decide to embark on a journey, you'll find that it's not as difficult as it might seem.

P.H:


Before I read the author's post, I checked the pmset instructions in detail.

So the content of the original author, is already have a certain understanding of

The following gives you a few intuitive use of the feeling, more straightforward than the above text to many

mode 0, the biggest difference compared to other modes is that it goes to sleep very fast

Within 1 seconds, my laptop feels intuitive.

My system default is mode 3, after clicking on sleep, can see the hard drive lights flashing

The reason for this is that the memory data is simply written to the hard disk

So it's going to take a seven or eight seconds to see the power light breath flashing.

In contrast, the mode 0 instantly sees the power light breathing flashes and goes to sleep

And about freeing up disk space as mentioned in the article

My memory is 8G, so I tested it deliberately.

Before and after execution, the system free space increased by more than 8G

In fact, it should be 8G, but it involves the problem of the system, there will be some discrepancies

In other words, Windows also has a similar way to free up space on the system disk (size equals your memory size)

In addition, I found that my sleep mode was set by default to mode 3

If you change to mode 5, after sleep, there is no problem in a short time.

However, it may take some time for the system to automatically power off

The kind of full power off, the boot is the kind of normal boot, no wake-up

Because the above mentioned virtual memory is involved, and I am shutting down the virtual memory of the Mac

so may be Black Fruit the support for Modes 5 and 7 is not very good, or because I turned off the virtual memory.

In addition, some machines may use the system default mode 3,5,7 or 1 cannot sleep

But after switching to mode 0, you can sleep normally.

Of course, this is not a universal approach, but it is possible

It will allow you to sleep in a machine that does not work well to support sleep



In summary, the individual still prefers mode 0

Detailed Mac sleep mode settings

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.