after waking from sleep native screen in clamshell mode wakes up and takes dock

I work on external screen mostly and have MacBook in clamshell mode. External screen is set as main screen with dock attached to it.

When I wake MacBook up from sleep, sometimes screen in clamshell mode wakes up and overtakes my dock. Screen itself is turned off, but soft thinks its on.

To fix this I've to open MacBook lid and close it again. This brings dock to my external screen.

Atm I've set external monitor to mirror MacBook screen avoiding this issue altogether. But surely its annoying. Seems like a bug as I didn't notice this in OS X.

I noticed this issue on macOS sierra. I've a MacBook Pro (Retina, 13-inch, Mid 2014), 2.6/8/256


The first things I'd try are to reset both the NVRAM and SMC in that order. Before following the steps below, ensure you have no external hardware connected (so, unplug your external display) and make sure you use the built-in keyboard.

Reset the NVRAM

Older Macs had what's called Parameter RAM (PRAM), newer Macs use Non-Volatile Random-Access Memory (NVRAM). Here’s how to reset the NVRAM on your particular MBP:

  1. Shut down your machine. Yes, a full shut down, not just logging out.
  2. Press the power button and then press the commandoptionpr keys. You have to make sure you press these keys before the gray screen appears or it won’t work.
  3. Hold those keys down until your Mac reboots again and you here the startup chime.
  4. Let go of the keys and let your Mac reboot normally.

Note: When you log back in you may need to readjust some of your system preferences (e.g. speaker volume, screen resolution, startup disk selection, time zone information, etc).

Reset the SMC

To reset the SMC on your particular MBP, follow these steps:

  1. Shut down your computer
  2. Keep the MagSafe adapter (power cable) plugged in.
  3. Press at the same time shiftoptioncontrol (on the left side of the keyboard) and the power button
  4. Let go
  5. Turn your computer back on with the power button.

After resetting both the NVRAM and SMC, use your computer to determine if the issue still persists.