Web browser's (Firefox) video playback is laggy

Checking the Xorg logs, the modesetting driver is already loaded by default, as driver 0.

Sorry, but there’s dozens of esoteric tweaks like this suggested all over the forum. None of them work! And they all seem to ignore the fact that this is specific to Firefox. It’s not specific to Youtube, Xorg settings, HTML5 videoplayers in general, or the hardware specs. This is because with all those variables being the same, for most people Brave performs without any issues at all (that means not just a little bit better).

So personally I think it’s in Firefox settings where we should look for a solution.

I don’t think you could tweak poor memory and cpu handling of firefox in settings.
When I open TrueNAS web interface in firefox in qube with 8gb ram and 4 vCPUs it uses 70-80% of it right away.

I’ve done a test in the Whonix Workstation template.

The Torbrowser build, which ships with WW, also plays videos fine. On the other hand, standard Firefox installed in WW, has the kind of performance issues that people usually complain about.

This is a pretty important finding. It shows that the issue is specific just to the standard (debian?) build of Firefox. In other words, it shows that it’s possible to have a Firefox build without those issues.

Any suggestions for where to go from here?

Could someone please check if they can reproduce the issue in a Fedora template, with standard Firefox installed from their package manager? I don’t have that template installed.

It would need standarized test, it’s personal fealings otherwise.

Like 2 vCPU, memory balancing 1->2 gb, and particular web test that returns numbers.
Is there web playback test somwhere?

As a preliminary test, maybe just check if frames per second drop in the single digits and if CPU usage jumps 10x.

Where you see frame per seconds drop in YT? There is total frames droped in nerd statistics only.

It’s just an approximate counting of how many times per second the image is changing.

with 60fps YT? Are you serious?

Actual video playback gets as bad as ~5 fps; either way, in the single digits.

No, it’s not.
If you have 5 fps windowed or fullscreen then you have something really wrong with system.
Playback might be little choppy but not 5 fps. It’s might be more like 10-20 fps with some frame drops every 2-3 seconds but not 5 fps.
I’ve had this in fullscreen with i915 driver on Iris Xe gfx on i5-1245U

PS: don’t use whonix or debian at all

Telling people their problem doesn’t exist isn’t very productive.

Not sure why you suggest to avoid the debian template, but it obviously ignores the fact that video playback works fine in debian, in either brave or the torbrowser build.