MacBook – 2015 Macbook Pro won’t wake up in clamshell mode in morning only

catalinaclosed-clamshelldisplaymacbook prosleep-wake

My situation:

  • Mid 2015 15" MacBook Pro (2.5 GHz i7) running 10.15.3 Catalina (clamshell mode)
  • Two external displays connected via each of the two mini DV ports (one uses a mini DV to HDMI adapter, and the other a mini DV to VGA adapter, if that matters)
  • Wired Lenovo keyboard attached to the mac via an old powered (plugs into wall) USB 2.0 hub
  • Wireless Logitech M510 mouse connected via a unifying receiver to the hub.

Procedure for putting my macbook to sleep:

  • Apple menu > sleep
  • Once the macbook goes to sleep, I press the power buttons on both displays to turn them off

Problem:

During the day, if I turn on the displays, and then press some buttons on the keyboard, the macbook wakes up just fine — even if it's been asleep for a few hours. But in the morning after its been asleep all night this never works! The fans don't start to spin — it just stays silent. The only way to wake up the computer is to physically open and shut the macbook's lid briefly. How do I fix this? So far I've had this setup for ~2 weeks, and I have never had trouble waking up during the day, and 100% of the time have had trouble in the morning after. How do I fix this?

Additional info/stuff I've tried:

In the Energy Saver system preferences pane, I have the following set (for "Power Adapter"):

  • Unchecked: Prevent computer from sleeping automatically when the display is off
  • Checked: Put hard disks to sleep when possible
  • Checked: Wake for Wi-Fi network access
  • Checked: Enable Power Nap while plugged into a power adapter

I also have automatic graphics switching enabled.

Should I change any of those settings?

I looked at this question, and tried things like clearing system caches, resetting the NVRAM and the SMC, and resetting display settings. I don't have the option of swapping ports. I have not disabled automatic GPU switching, as I am worried that that will wear out my mac faster. I also would really rather not attach my keyboard to the one free bluetooth wake is enabled, although I don't use any bluetooth devices, so I doubt that's important.

I know that I could simply prevent my macbook from ever going to sleep, but that seems like a really bad idea from a longevity standpoint, right? Any suggestions would be much appreciated.

Best Answer

Per our conversation in comments, the problem seems to be that your computer is going into hibernation (aka Safe Sleep) overnight, and that hibernation is interfering with waking the machine up while it's in clamshell mode. It's possible that the machine would eventually wake up, even in clamshell — waking up from hibernation can take significantly longer than waking up from sleep, and I don't know whether you've tested for that — but in any case, hibernation is a setting that can be adjusted or turned off.

When the computer goes into hibernation, it writes the entire contents of RAM to disk and then turns off power to the RAM chips, sending the machine into a low power-use state. When the machine wakes up, the RAM is turned back on and the hibernation file is read back into it, effectively returning the machine to the exact state it was in before hibernation. This was originally intended for Mac portables with swappable batteries to prevent data loss. In other words, if you were (say) on a plane doing spreadsheets or watching a movie (or whatever) and ran out of battery power, the machine would shut itself off, you could swap in a fresh battery, and the machine would restart exactly where you left off. You could also set the machine to only use hibernate mode, giving a bit extra battery life by bypassing sleep mode (which wastes power keeping RAM active while your machine is asleep). That effectively trades slower wake-ups and power-downs for better batter life. In modern machines with fixed batteries, hibernate acts as a failsafe: e.g., if the power goes out and your battery runs down, hibernate will ensure that you don't lose whatever you were working on.

Turning hibernate off mostly means you need to take responsibility for ensuring your work is saved. It has no effect aside from saving power and preventing data loss.

You control the hibernate function through the unix pmset (power management settings) utility. See: man pmset. To turn hibernate mode off completely when the machine is in charging mode (i.e., connected to a power cord), open Terminal and run the following command:

sudo pmset -c hibernatemode 0

This will turn off hibernate mode when your machine is plugged in, but keep it active when your computer is running on battery power. If you prefer to turn it off entirely in all modes, omit the -c option.

The hibernatemode setting takes three values:

  • hibernatemode 0: turns off hibernate for the specified power configuration
  • hibernatemode 3: turns on hibernate for the specified power configuration
  • hibernatemode 25: turns on hibernate for the specified power configuration, and sets it as the default mode, bypassing normal sleep.

It is also possible to change the way hibernate operates using the pmset settings:

  • standby (0/1): 'standby' tells the machine to hibernate after a set time in sleep, saving power.
  • standbydelayhigh, standbydelaylow, highstandbythreshold: the first two specify a time in seconds for when to send the machine into hibernation; the last specifies a batter percentage. The threshold is usually set at 50 (half power), and longer hibernate delays are set when the battery has more power
  • autopoweroff, autopoweroffdelay: European-complaince equivalents ofstandby and the two 'standbydelay' settings.

You could monkey with those to fine-tune the machine's behavior, if you're so inclined.