X

Mac portables restarting/waking from sleep when lid is closed, resurfaced

the "hot laptop in bag syndrome" -- again.

CNET staff
3 min read

It's an issue that resurfaces every few months (last covered here) with the same symptoms: some Mac portables -- particularly MacBooks and MacBook Pros -- fail to go to sleep automatically when the lid is closed, or wake up from sleep involuntarily while the lid is closed, resulting it what we've affectionately dubbed the "hot laptop in bag syndrome," a label applied because the user is often notified that this problem has occurred when they retrieve a scorching hot portable from their bag with the fans blaring. If the unit is indeed contained in a bag when this issue occurs, the portable will sometimes shut itself off automatically to avoid overheating component damage.

One MacFixIt reader recently wrote:

"Every now and then when I close the laptop lid and put it to sleep, my laptop with restart itself rather than goto sleep. Just wondering if you've seen any other similar problems and know of any possible culprits. I'm running all the newest updates, and noticed the problem shortly after updating the OS."

This puts a slightly different spin on the issue -- a MacBook restarting when the lid is closed rather than going to sleep, with the same net effect: a system that is on and active rather than asleep.

We previously noted that safe sleep -- a function that allows Macs to return to resume operation as if they were only asleep while actually powered off -- may be involved in some instances of this issue. The Safe Sleep mechanism must write at least some of the current RAM contents to disk before the system falls asleep (if Safe Sleep is enabled). This is one of the reasons there is a slight delay between execution of the sleep command and commencement of sleep. If something goes wrong while Safe Sleep is writing data to the disk, or the process responsible for doing so hangs, the system will become locked in an awake state and never fall asleep. At the same time, the hung process will spike processor usage, generating excessive heat and sending the fans into maximum rotation. The only surefire solution to this issue is disablement of Safe Sleep (as described in this article). If you want to retain the functionality, however, simply make sure that your portable has actually gone to regular sleep (indicated by a gently pulsating status light) before leaving it unattended or putting it in a bag. If the system hasn't gone to sleep after 30 seconds or so (indicated by a steady status light), open the lid and try manually putting the unit to sleep again. 

Here are a few other potential fixes for this issue:

Unplug/plug first Avoid connecting or disconnecting devices, or connecting/disconnecting power after your portable Mac has gone to sleep. USB devices in particular can trigger a wake from sleep"

Set lidwake variable to 0 One option for resolving this problem is to set the NVRAM variable lidwake to 0 with the following Terminal command:

  • sudo pmset lidwake 0

This setting will cause the machine to resist waking from sleep when the lid is opened. Instead, you will need to press a button on the keyboard or perform another "system event" (such as connecting and activating a USB device) in order to wake the system.

This can prevent instances of the problem where the system erroneously thinks the lid has been opened when it is still closed.

Deleting power management-related .plist files In some instances, this issue can be resolved by deleting the following files:

  • /Library/Preferences/SystemConfiguration/com.apple.PowerManagement.plist
  • /Library/Preferences/SystemConfiguration/com.apple.AutoWake.plist
  • ~/Library/Preferences/com.apple.systemuiserver.plist

then restarting.

(the tilde [~] indicates your home user directory, i.e. /Users/username)

Unfortunately, this fix might not stick, and may require repetition if the problem recurs.

Turn off Bluetooth devices before putting to sleep Un-pair and power-off any Bluetooth devices associated with Mac portable before putting it to sleep. It appears that turning Bluetooth devices on or off while the system is going to sleep can trigger a disconnection error message, barring proper sleep.

Gently close lid -- ensure sleep is taking place In some cases, carefully closing the lid and ensuring the system has actually gone to sleep (indicated by a slowly pulsating light) can prevent this issue from occurring.

Resources

  • here
  • More from Late-Breakers