4K upscaled videos lag

I have no trouble smoothly playing videos on a 1080p display, however it lags a lot when using 4K, even if it is just upscaled and videos are not actually 4K in resolution. Is there any way to trick apps into believing that the screen is actually smaller and make them play videos as if they were maximized on only 1080p? I’d rather not ditch my 4K monitor just because videos lag when maximized. I can also just not maximize windows and it will play fine, but then I use only 25% of my screen’s real estate :frowning: and you can imagine it’s not the best viewing experience.

if you use VLC you can try this setting. Otherwise there are no solution, rendering is done using the CPU on Qubes OS, and the larger the display area, the more it uses CPU.

Throwing more cpu to that qube may help.

Are you connecting your 4K display as second display along with 1080p display?
If yes then maybe it’s this issue:

1 Like

Nope, I use a desktop PC with a 4K monitor as my only display. Changing display resolution in dom0’s XFCE to 1080p makes videos no longer lag on maximized windows.

Qubes OS is not able to render 480p without noticeable lags, and you want 4k.

Try mpv, it is better than vlc out of the box. If it does not maange, well, nothing can be done.

For me, VLC is able to play a 1080p movie without issue, the audio only lags behind sometimes about 1/3rd of a second or so. Freetube app is also able to play 1080p Youtube videos without really any problems. I have Purism’s Librem Mini v2 as my PC. They probably carefully tested Qubes with its hardware.

I do not believe it is a case, maybe you do not notice the issue. The link with the provided train and city panning - can you make it full screen and check if there are fluency disruptions (like lags) on city panning scene?
Lags seem to be inevitable in Qubes OS even in 480p for such dynamic scenes due to X11 and Xen software limitations (it’s not CPU/RAM/Hardware problem), it was discussed on github tracker. I hope migration to wayland will fix it someday.

Yes, it lags. In Firefox, it’s noticeable but bearable, while in both VLC and mpv after downloading with yt-dlp, it’s pretty bad. However, I tried watching a movie in 1080p with VLC previously and it was a surprisingly good experience, with not really any noticeable lag for me. Maybe some codecs depend more on GPU acceleration than others?

Thanks for confirmation. Hmm, VLC and mpv were lagging even more? That is strange a bit. Lagging of such video in every resolution in Qubes OS is expected on any hardware, but I thought Firefox+html5 is slower and less effective than VLC/mpv players.

It is not about codes, because better CPU would solve it (but it doesn’t), it is about painting/drawing decoded raw frames in X11 under Xen.
Movies or TV shows do not often have such dynamic long smooth panning that would make us notice these inevitable lags. I watch movies on Qubes OS with not real issues, too, but I am sure lags are there, and playing the same movie on bare GNU+Linux is really much more fluent and smooth, but I just got used to micro-lags of Qubes OS.

I can play 2160p videos in 1080p with no stuttering or lag :thinking: It’s working fine except it’s wasting so much CPU time.

Wouldn’t all that depend on resolution and bitrate? Using a contrieved example: my understanding of video encoding is that a completely monochrome video using a compressed codec could play nice even in 4K because very few changes would need to be decoded and applied between frames (corresponding to a low required bitrate).

Depending on how different videos are encoded, they may be more or less affected by Qubes OS’ CPU rendering limitations at different resolutions if the bitrates are different. What I’m saying is that unless I’m wrong, comparing different videos based on resolution alone is not really meaningful, and that might explain why some folks find everything terrible (presumably trying to watch videos with higher bitrates at a given resolution) and others find things okay even at higher resolutions (presumably watching videos with lower bitrate). Even assuming that their opinions about what is okay and what is not are somewhat consistent.

2 Likes

No, I do not think bitrate or codec matter in this case at all. As I said, you can watch train-city-panning video in 480p and it will lag in Qubes OS.

How can it bitrate of this 480p youtube video be relevant if 1080p video works the same? The bitrate of youtube video a 480p is like 10 times lower.

So, once again, it is NOT about bitrate, not about CPU, not about RAM. It is about Qubes OS not able to refresh the whole screen properly without lags. So, display resolution is more important than video bitrate and etc.

It means that your CPU is enough for decording and bitrate of such videos. It only supports the statement that the existing micro-lags problem is not about decoding performance and bitrate. I am personally certain it is not about CPU performance, nor bitrate.

That would be great.