MHL only works for a few minutes on Galaxy S4
I purchased 3 cheap MHL cables, same problem than you.  This is the red one.  2 cables disconnect all the time, one works perfectly.  The problem is the crappy cable.