I could imagine that it is a bandwidth problem. Note that you run a AMD/INTEL CPU/GPU which can reduce the bandwidth for power saving. Now when you switch the GLX to Nvidia, which has way more bandwidth, it can throttle and or even freeze.
Set the frequency policy to performance with cpupower. Maybe that helps?
i suspect problem is related to fact that hdmi port is connected to nvidia GPU,
with laptop build-in display (connected to iGPU) i have no problem
its only when using external monitor that this happens