HDMI freezes on High Sierra
I have the exactly same issue.  It started to happen after my upgrade to High Sierra.  I own a Mid 2012 MacBook Pro with Retina display.  I googled a bit and found that this happens mostly to MacBook Pro with Retina owners 2012- or 2013-version.

Resetting NVRAM/PRAM or SMC did not work for me but turning off automatic graphic switching as you suggested worked. I will have to turn it off until Apple got to fix this.