I just upgraded to Sierra 10.12.3, but I started having this same problem when I upgraded to Sierra.
I did everything that was suggested in this thread, but still the problem is there.
I have an asus PB278 connected to my macboox pro ( MacBook Pro (Retina, Mid 2012), 2.6 GHz Intel Core i7,16 GB 1600 MHz DDR3,NVIDIA GeForce GT 650M 1024 MB,Intel HD Graphics 4000 1536 MB ) via the mini display port. This works and doesn't have any problem at all, but when i plugged in my other monitor (24 in Dell), this is when i can reproduce the problem mentioned in this thread.
I tried that kext hack. nadah didn't solve it.
Tried turning on and off that automatic graphics swtiching in the energy saver, nope it didnt work.
I tried putting the main menu bar in the macbook screen and not in the external monitor.
Tried all the resets (Smc, pram etc).
For that dell monitor, I bought a vga to mini display port converter (apple), a dvi to mini display port converter(apple) and also a dvi to hdmi cable just to test and see if any of these will make a difference , but unfortunately, some minutes after i connect the monitor and start browsing in chrome, kernel_task will spiked up and will leave your mac unuseable. Also, i noticed even if you dont use Chrome and the kernel_task/fans won't spike up , when you scroll, there seems to be a lag and the experience is not enjoyable. The solution is always to remove that extra monitor (unplugged the Dell, whether it is connected inthe mini dp or hdmi port and the Asus one remains ) and everything will turn back to normal.
This seems to be a common experience for people who are connecting an extra external display to their macbook nd yet apple is all quiet about it?
Anyone who has figure out this problem?