Simply closing mac's display when an external monitor is still on worked for me.

My setup:

 - MacBook Pro Sierra 10.12.6
 - External monitor connected through HDMI & monitor USB cable
 - External mouse and keyboard connected to the monitor