I installed Ubuntu 16.04 on an ASUS Z450LA laptop with Intel HD5500 graphics (no dedicated graphics card) and am using MATE as my desktop environment.
I had to rebuild the kernel with this patch to fix an issue with the touchpad not working upon waking up from suspend, if this matters.
The problem is that the system freezes completely after a while if I use HDMI. The mouse stops moving, the machine doesn't respond to pings anymore, and the only way out is to hold the power button until the machine turns off.
There is no error message in the logs as far as I can see, and the machine is not overheating or anything (it usually stays at the range of 30 - 40 ºC).
What can be causing this problem and how would I debug this?