1

I'm working with a 2013 Macbook Pro in clamshell mode using a 2012 Cinema display (on the display port) and magic keyboard and trackpad. When I leave the office, I would like to put the computer to sleep with the minimum number of steps. It's easy to see that just unplugging the display and power won't put the Macbook to sleep. The next thing I have come up with is

  1. Put the computer to sleep using either the apple menu or Launchbar.
  2. Unplug power, Display port, Thunderbolt network.
  3. Leave

This seems to not work. When I arrive at home the Macbook shows 95% battery remaining, indicating that it was running in the bag until it went to sleep due to inactivity.

If I, after unplugging everything, open the Macbook, it shows the password screen, indicating that it has at least locked. If I then close the Macbook and leave, it seems to go to sleep (and show 100% battery remaining when arriving at home).

How can I put the computer to sleep without opening and closing the lid?

1

Your MacBook Pro is waking up when you disconnect the Display Port and Thunderbolt connections. This happens because OS X needs to re-evaluate its hardware situation.

Consider using a context-sensitive automation tool like ControlPlane. When you disconnect your display or thunderbolt network, have ControlPlane trigger sleep mode.

Alternatively, try reducing the required period of inactivity before sleeping: System Preferences > Energy Saver

  • Is it possible to use apple script to, say, put the computer to sleep 30 seconds after a display has been disconnected and if the lid is closed? (I don't want to use properietary software for such a simple fix) – Thomas Jan 21 '16 at 10:43
  • 1
    You will need your AppleScript to detect the display being disconnected. You could poll but this is better avoided; the delay then sleep part is certainly possible. Please can you ask another question about such a script. AppleScript specific questions tend to attract positive attention. – Graham Miln Jan 21 '16 at 10:46
  • Good point. It's here now: apple.stackexchange.com/questions/224322/… – Thomas Jan 21 '16 at 11:36
  • You are right about the wake on unplug. I don't understand why it needs to re-evaluate its hardware situation and why this could not wait until after the next wake, though. In any case, plugging in the Cinema display does not wake the MacBook. – Thomas Jan 22 '16 at 8:20
1

Since I'm using a wireless Magic keyboard, a solution to the problem is to put the MacBook to sleep after all peripherials have been disconnected using Option+Command+Eject. The success of can not be checked, but still.

  • 1
    Sounds like a good solution. You can see when your Mac slept and woke through the system.log. This log of computer wide events is visible through Applications > Utilities > Console.app. Alternatively a history of power events is visible with the command pmset -g log. – Graham Miln Jan 22 '16 at 9:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .