I connect my MacBook Pro to an external display via a DisplayPort -> HDMI connector. After a couple of months of problem free operation, all of a sudden my MacBook wouldn’t recognize the external monitor. It would flash blue (clearly recognising something was connected) then not display the image.
After a lof of searching around and ordering a replacement cable, here’s what solved it: Power off (as in disconnect from the wall) the monitor, then unplug the cable, then plug the cable back in, then reconnect power to the monitor, then turn the monitor back on.
Everything else I tried including resetting the PRAM didn’t work. Hope this helps someone.