I have a Dell XPS 15 laptop (not sure what year, but it has a Skylake CPU and GeForce GTX 960M graphics) running 18.04.4, with Cinnamon, and Nvidia native drivers, version 430. It generally works pretty well. In particular, i can watch video fine, whether YouTube in Firefox, or an MP4 in VLC, and play lightweight 3D games like Team Fortress 2.
Unless i plug in an external monitor via HDMI. Then, video, in a browser or with VLC, on either screen, slows to a crawl, playing a few frames then pausing for a few tenths of a second, with cursor movement being laggy, and Xorg using 100% CPU. Team Fortress 2 is unplayable; i get 3 fps just on the menu!
The effect seems to vary between different videos, even two videos on YouTube encoded with the same codec. One that is 30 fps seems to be worse than one which is 25 fps.
I don't have pixel scaling on the external monitor. It has a very different dot pitch to the laptop screen, so i would like to have pixel scaling, but i couldn't get it to work.
What is happening, and how can i fix it?
My guess would be that it's something to do with hardware acceleration. Maybe the GPU can't handle video while also driving an external monitor? Maybe the machine uses integrated graphics when there's an external monitor, for some reason?
I'm more than happy to post output from diagnostic tools, but i don't know what would be relevant!