What Really Happens When You Put Your Mac to Sleep?
Question: What Really Happens When You Put Your Mac to Sleep?
When I use the Mac's sleep mode, what really happens? Is sleep the same as safe sleep? Are sleep or safe sleep modes really safe? Are there any security concerns? And can I change the Mac's method of sleeping?
Answer:
Macs have had a sleep mode for saving energy and quickly turning back on for quite a while. Yet, questions about what happens to a Mac when it sleeps remain perennial favorites among frequently asked questions.
To address questions about the Mac's sleep function, we first need to know about the various sleep modes the Mac supports. Since 2005, Apple has provided three basic sleep modes.
Mac Sleep Modes
Sleep: The Mac's RAM is left powered on while it's sleeping. This allows the Mac to wake up very quickly, because there's no need to load anything from the hard drive. This is the default sleep mode for desktop Macs. This mode is also called hibernatemode 0.
Hibernation: In this mode, the contents of RAM are copied to your hard drive before the Mac enters sleep. Once the Mac is sleeping, power is removed from the RAM. When you wake the Mac up, the hard drive must first write the data back to the RAM, so wake time is a bit slower. This is the default sleep mode for portables released before 2005. This mode is also called hibernatemode 1.
Safe Sleep: The RAM contents are copied to the hard drive before the Mac enters sleep, but the RAM remains powered while the Mac is sleeping. Wake time is very fast because the RAM still contains the necessary info.
Writing the RAM's contents to the hard drive is a safeguard. Should something happen, such as a battery failure, you can still recover your data.
Since 2005, the default sleep mode for portables has been Safe Sleep, but not all Apple portables are capable of supporting this mode. Apple says that models from 2005 and later directly support Safe Sleep mode; some earlier portables also support Safe Sleep mode. This mode is also called hibernatemode 3
What Happens When Your Mac Sleeps
The only difference between the various Mac sleep modes is whether the contents of RAM are first copied to the hard drive before the Mac enters sleep. Once RAM contents are copied, all Mac sleep modes then execute the following functions:
- The processor is put into a low-power state.
- The video output is disabled. Connected displays will enter their own low-power state, if supported.
- Apple-supplied hard drives will spin down. Third-party internal and external drives may spin down (most do).
- Optical media drives spin down.
- Power to the RAM memory is removed (Hibernation and Safe Sleep modes).
- Ethernet port is disabled. This actually depends on system settings, which can allow the Ethernet port to respond to a WOL (Wake on Lan) signal.
- AirPort functions, if any, are disabled.
- USB ports have limited functionality (respond to keyboard).
- Audio input and output are disabled.
- Keyboard illumination, if present, is disabled.
- Expansion card slot is turned off (portable Macs).
- Modem, if present, is disabled. This depends on whether the modem is configured to wake when it detects a ring.
- Bluetooth is disabled. This depends on the Bluetooth system preference, which can allow Bluetooth devices to wake your computer.
Security Concerns When Sleeping
When it's asleep, your Mac is subject to many of the same vulnerabilities as when it's awake. Specifically, anyone who has physical access to your Mac can wake the Mac from sleep and gain access. It's possible to use the Security system preference to require a password to access your Mac when waking it from sleep. But this only provides a minimum level of protection, which can be sidestepped by knowledgeable individuals.
Assuming you have the Ethernet set not to respond to a WOL signal, your Mac should be completely invisible to any network access. The same should be true of AirPort-based wireless access. Third-party Ethernet cards and wireless solutions, however, may remain active during sleep.
Is Sleep or Safe Sleep Safe?
As mentioned under the Security Concerns section above, your Mac is as safe when asleep as it is when awake. It can even be slightly safer, since network access is usually disabled during sleep.
Safe sleep is much safer than normal sleep, because all RAM contents are first written to the hard drive. Should power fail during sleep, your Mac will recreate the state it was in when it first entered sleep. You can see this occurring when you first recover from a power failure during a safe sleep session. A progress bar will display, as the contents of RAM are recreated from the hard drive data.
Is it Possible to Change Sleep Modes?
Yes it is, and it's fairly easy to do with a few Terminal commands. You can find instructions for changing sleep modes in the "Change How Your Mac Sleeps" article.
Source...