“To sleep, perchance to dream; ay, there’s the rub.” While neither Hamlet nor Shakespeare had computers available, the famous line from Hamlet’s soliloquy does describe a problem many Mac users have experienced: their Macs being in such a sound sleep that they fail to wake, perhaps enjoying their dreams just a bit too much.
Of course, that’s not the only sleep-related problem we’re going to explore in this Rocket Yard guide. We’re also going to look at problems entering sleep, as well as the various sleep options available for both desktop and portable Macs.
Putting Your Mac to Sleep
The Energy Saver preference pane controls the basic sleep functions. Here you can set sleep options, including how long to wait before turning off the display, as well as the computer, whether drives should be spun down, and if Power Naps are allowed (we’re in favor of that last option). The available options can be different, depending on the version of the Mac OS you’re using, and whether your Mac is a desktop or portable model.
Your Mac will automatically sleep based on the Energy Saver settings, but you can also force sleep by selecting Sleep from the Apple menu, using a Hot Corner, closing the lid of your Mac portable, or using the Option + Command + Eject keyboard shortcut.
Problems Entering Sleep
Most of the time we think of problems occurring when entering sleep, but it’s also possible to have sleep occur for an unknown reason, say right in the middle of a game you’re playing.
If you find your Mac going to sleep when it shouldn’t, the problem is likely to be a sleep parameter that is set incorrectly. You should start by checking the Energy Saver preference pane. Look for the following:
Display Sleep slider set with a very short time frame.
Computer Sleep set to quickly enter idle sleep.
A Sleep schedule setting that is forcing your Mac to sleep (click the Schedule button to check).
Having a hot corner setting on the display that forces your Mac to sleep (check the Mission Control preference pane; look for the Hot Corners button).
Pressing the Power button can put your Mac to sleep, or wake it up. In OS X Mountain Lion or earlier, the ability of the power button to be used for sleep is controlled by the Energy Saver preference pane setting. See if the “Allow power button to put the computer to sleep” option is checked.
Having a magnet near your portable Mac. As odd as it sounds, a magnet can both cause your Mac to be unable to go to sleep, as well as prevent it from waking up. This happens because the Mac uses magnetic switches to detect when the lid is closed. Having a strong magnet near the front edge or palm rest area of your MacBook can affect these switches and send the wrong signal to the power management circuitry, causing your Mac to sleep or wake from sleep.
Failure to sleep can also be caused by hardware connected to your Mac, as well as software running on your Mac. One likely hardware issue is USB peripherals. You can try disconnecting your peripherals one at a time, to see if any are preventing your Mac from entering sleep.
Printer queues are a notorious cause of sleep prevention. The issue arises when a printer queue becomes corrupt, or when one or more pages are stuck in the queue and fail to print. Clearing out the queue or resetting the printer system will cure the problem.
You can use Terminal to help you determine what’s causing your Mac from entering sleep. Using the pmset command, you can discover if anything is setting an assertion against entering display or idle sleep.
Launch Terminal, located at /Applications/Utilities.
Enter the following at the Terminal prompt:
pmset –g assertions
Press enter or return.
Terminal will display the current assertion status. We’re interested in the ‘Assertion status system-wide’ group. In particular, we’re interested in the items named:
If any of these items have a 1 after their name, it indicates that display sleep or computer sleep is being overridden by an app, service, or device. Try quitting apps one at a time, and then rerun the Terminal command and check to see if the assertion has been removed. Once you find the app or service that’s causing the issue, you can check to see if there’s an update available that corrects the problem.
If you still can’t find the app that’s causing the sleep issue, try the following Terminal command:
pmset –g assertionslog
Press enter or return.
Terminal will display a log of apps and processes that are setting and releasing assertions. Look for Type entries with the same assertion status names as those mentioned above.
The log is live and shows the current status; it’s likely that you’ll see assertions being set against sleep somewhat routinely, and then being removed; this is the normal course of events. You’re looking for an assertion that is being set and never removed.
Actually finding the assertion causing the issue can be a very time-consuming operation. You may have better luck taking the easier route, and just quitting apps until you can successfully enter sleep.
Problems Waking From Sleep
If you’re having problems waking from sleep, there are a few basic steps to check. They may sound silly, but at least one of these has happened to me at least once, maybe twice.
The screen brightness is set at a low level. Personally, I think our cat was involved. Walking across the keyboard is one of his favorite activities.
An external display is turned off, either at the power button or a power strip. If you have a cat, check for paw prints; I’m just saying.
If your Mac is equipped with an SSD, it may have been in the sleep state long enough to enter a standby sleep mode. Try pressing the power button momentarily to wake your Mac. To find out more about this sleep mode, see Trouble Waking Up After a Deep Sleep.
If your Mac uses a hard drive, it may have been in sleep mode long enough to enter Safe Sleep mode, where memory data is copied to the hard drive and then the computer is powered down to a very low state. To awaken your Mac, press the power button momentarily.
If you’re still having problems waking from sleep, connect your Mac to AC power. If your Mac’s battery charge became extremely low during sleep, your Mac won’t reawaken until the battery is charged or AC power is restored.
If you’re still not able to wake from sleep, you can press and hold the power button. This will cause your Mac to shut down. Once your Mac is turned off, you can restart normally. This last method of gaining control will cause you to lose any unsaved data in open apps.
If you continue to have problems waking from sleep, you should reset the SMC and the NVRAM.