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
Best Answer
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:
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:
After resetting both the NVRAM and SMC, use your computer to determine if the issue still persists.