This is how your Mac sleeps or hibernates (and how to adjust it)

While your Mac is in sleep mode, more is happening than you think. Many processes run in the background while your Mac is asleep. This tip tells you how to find out what your Mac is doing and how to limit it.

If you don't use your Mac for a few minutes, it will automatically go into sleep mode. In Dutch, Apple also speaks of sleep mode. The screen turns off and the most recent status is kept, including the open documents and apps. This prevents you from losing anything if your MacBook runs out of battery or if someone accidentally unplugs your Mac. Non-essential processes are closed in the background. In the meantime, a lot can still happen on the Mac during this hibernation. In this tip you can read all about how you can put the sleep modes on your Mac to your liking.

  • How the Mac sleep mode works
  • How to activate the Mac sleep mode
  • What has your Mac been doing while sleeping?
  • Different sleep states on the Mac (and how to adjust them)
  • How safe is my Mac sleeping?
  • How safe is my Mac sleeping?
  • li>

How Mac Hibernate Works

You may remember the Mac's Power Nap feature. This is only found on Intel Macs and not on models with Apple Silicon. Recent Macs have opted for a different approach, whereby all kinds of activities can still be performed in the background.

A Mac with an M-series chip hardly uses any energy when it's in sleep mode, but you'll still have to take into account that the battery will gradually drain. If you leave your MacBook on Friday afternoon without plugging it in, the battery will lose about 10% battery after the weekend. To avoid this, it is better to turn off the Mac completely. This is also recommended if you want maximum security, for example if you have to leave your MacBook in a hotel room. If the Mac is in a trusted place at home or at the office, the sleep mode can be active and there is little risk that someone will try to access your data.

This is how you activate the Mac sleep mode

There are several ways to put your Mac to sleep or hibernation:

  • It happens automatically if you don't use your Mac for a while.
  • It also happens it when you close your MacBook screen.
  • You can activate it with  > Snooze.
  • You can also enable it via Command-Option-Media Eject (if the latter button is present on your keyboard).

A Mac without a Touch ID button can also be put to sleep by pressing the power button. If Touch ID is incorporated in the on/off button, this button works in a different way: you will be logged out if you keep your finger on the button.

You can choose when your Mac screen turns off when idle. To do this, go to System Settings > Access screen. For example, with a MacBook you can indicate that the screen should turn off after 2 minutes of inactivity, while it is 10 minutes with mains power. You decide how long this is.

The background activities in sleep mode will be on automatically. For example, the Mac can receive incoming network traffic in sleep mode, for example from apps that update their data via iCloud. Think of iMessage, Mail, Calendar, Notes and the like. These are also updated when your Mac is in sleep mode. The Mac will also continue to provide its location to the Find My network. Time Machine backs up and pulls app updates from the Mac App Store in the background. Third-party software can also wake a Mac to perform certain activities.

If you don't want this, you can prevent network activities from being carried out in sleep mode. You do this via: System settings > Battery > Options. You can choose to do this only when the MacBook is connected to a power adapter to save battery life.

< img src="/wp-content/uploads/c76395fe15ec64974f0c35a62f64e3d8.png" />

If network access is allowed, your Mac can also be used for shared devices such as a shared printer or to access a shared volume. The Mac will then wake from sleep mode, even if the lid is closed.

What has your Mac been doing while asleep?

Want to know what your Mac has been up to while it seemed to be sleeping peacefully? You have to be in the Terminal for this. Enter the command below and you will get a long list of activities:

pmset -g log

The result is difficult to oversee:

If you really want to analyze your Mac's sleeping behavior properly, you need third-party apps, such as Sleep Aid. This app reads the log file shown above and creates a graphical overview of it. You can see exactly when your Mac was and wasn't sleeping. You can also see when notifications came in and when there was network activity. You can try the app for free for 14 days. Such software can also come in handy if you notice that your battery drains very quickly when it is in sleep mode. You can then find out what the culprit is.

Various hibernation states on the Mac (and how to customize them)

If you want to experiment with different sleep modes on the Mac, you can. There are basically three states:

  • hibernatemode 0 (default for desktop Macs)
  • hibernatemode 3 (default for MacBooks)
  • hibernatemode 25 (must be set manually)

Below we explain how this works. It is important to know the difference between memory (RAM) and write storage (SSD or hard disk). The RAM memory always needs power to hold data. As soon as the power goes out, the memory will be erased and you can lose data. Data stored on disk will remain intact if the power is lost.

Hibernatemode 0

For a desktop Mac, hibernatemode 0 is default.applicable. Content is only stored in memory. If someone accidentally pulls the plug from the socket or if the power fails, you can lose data if it has not been (automatically) saved in the meantime. If you regularly suffer from power outages, we recommend enabling hibernatemode 3. We will explain how to do this later on.

Hibernatemode 3

On a MacBook, hibernatemode 3 is required.the default setting. The MacBook keeps all content in memory (RAM), but also keeps a copy of the most recent state on disk (a hibernate image). The memory continues to receive power during sleep, but if the battery runs out, the memory will be erased.

When the MacBook is taken out of sleep mode, it first checks whether the contents of the memory are still intact. If not, because the power supply has been interrupted, the content can be restored from the information on disk.

Hibernatemode 25

Finally hibernatemode 25. This is the safest variant. In this case, the Mac saves everything in memory to disk and then cuts power to the memory. The memory is then cleared and background processes are no longer running. When the Mac is woken up from sleep, the hibernation image is always removed from the disk to restore the most recent status on the screen.

This option has advantages and disadvantages:

  • This is the most energy efficient, because the Mac will use almost no energy during sleep mode.
  • This is the safest, because there are no background processes running.
  • The disadvantage is that it going to sleep and waking up again takes longer.

You can see which hibernatemode your Mac is set to with the following Terminal command:

pmset -g

The standard setting 3 applies to this MacBook:

Before you get started with changing things, it is smart to see how you can use and adjust these settings with the following command:

man pmset

You can also read here that the ‘hibernatemode’ can have the values ​​0, 3 and 25. Whether a hibernation image is actually created on the disk also depends on the values ​​of ‘standby’ and ‘autopoweroff’. If you don't want any hibernation images at all, you have to make sure that ‘hibernatemode’, ‘standby’ and ‘autopoweroff’ all set to 0.

How secure is my Mac when it sleeps?

If apps and network activity can wake your Mac from sleep, you may wonder if it's safe to do so. Not much will happen in most cases, but if you have things like screen sharing, file sharing, and remote login enabled, you're at extra risk. You can disable this in System Settings > General > To share.

You are also at additional risk if you are running an outdated version of macOS and do not regularly update third-party software. If malware is already installed on the Mac, it can wake the Mac from sleep and perform malicious actions. Another risk is that when a computer is in sleep mode, there is usually still data in the memory (RAM). If you have to hand over the computer, for example during a house search, seizure or violent robbery, an attacker has physical control over the device and all kinds of attacks are possible via the external ports.

If you are visiting a country with a dubious reputation and you are an interesting target (for example a journalist), it is best to switch off your MacBook completely if you leave it in your hotel room or have to hand it over to the authorities. You do this via  > Turn off.


Posted

in

by

Tags: