I was having difficulties with lagging videos e.g. while watching movies in the browser. What bugged me most was that I’ve read that multiple people with much less potent hardware are able to watch movies without issues. So I was wondering what went wrong and tried some things. Those may even helped a bit. But I found out that a major issue exists within my setup in combination with a 4k screen I want to share here.
My setup: a high resolution screen on my laptop (actually 3k) and a less high-resolution “HD” screen (1080p). Once you have a 4k or similar screen you will increase your dpi settings. This is bad if you are using an older screen (everything getting really big). You can either change the dpi settings every time you switch screens (which involves some unpleasent hacks and quirks) or you are using the scaling feature of xrandr. This is exactly what I did and it worked fine for my prior ArchLinux installation.
However, I realized that I only have laggy YouTube videos when watching on my external “HD” screen, not when watching on my 3k laptop screen. Even 4k videos are no problem to watch on the internal screen. Soooo… this is a heads-up that the scaling feature of xrandr is presumbly causing a lot of extra computations that can lead to lagging videos for this kind of setup.
I already ordered a new external (4k) screen and try to report if videos aren’t lagging on high-res external screens (so omitting the
--scale option of xrandr) to confirm my hypothesis.