Open Bug 1857941 Opened 2 years ago Updated 2 years ago

Firefox freeze and video is not smooth if playing video in more tabs

Categories

(Core :: Graphics, defect, P2)

Firefox 118
defect

Tracking

()

UNCONFIRMED

People

(Reporter: hankering_jigsaw122, Unassigned)

Details

Attachments

(6 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0

Steps to reproduce:

I opened 3 youtube tabs and played a video in each of them.
Only 1 tab is fine, 2 tab slow down, 3 tab is like freezing.

Actual results:

Video is not not smooth, it's like freezing. And the browser is not responsive for some time. If I try to change tab I have to wait seconds.

Expected results:

As usual smoothly playing everything and the browser being not unresponsive.

Summary: Firefox freeze and video is not smoth if playing video in more tabs → Firefox freeze and video is not smooth if playing video in more tabs

Mei, can you also please attach the output of your about:support here along with the other file?

Severity: -- → S3
Component: Untriaged → Graphics
Priority: -- → P2
Product: Firefox → Core

Sotaro, could you have a look when you have some cycles?

Flags: needinfo?(sotaro.ikeda.g)

The file attached is an archive and contain: about:config and firefox profiler output made with 2 different presets: media and graphics. :)

It looks from the supplied about:config that you have 10 windows open. The per-window GPU memory overhead can be quite high - I wonder if something changed with the driver update and it's struggling with the amount of allocated GPU memory? Could you go to your task manager and check what the reported GPU memory usage is when Firefox is running slowly (attaching some screenshots of task manager might be helpful).

Flags: needinfo?(73y8f6sj1)

It's not lack of memory since I've got plenty of it. And most of the windows are filled with unloaded tabs usually. And actually I can fill the whole memory and still play multiple youtube fine when the issue is not around. At the moment is not doing it and I filled all the memory on purpose opening ton of pages with pictures. I've got 32 GB of memory and 16 are shared with the igpu. It seems really not the case. But I will report after it start to freeze again.

Flags: needinfo?(73y8f6sj1)

It seems that GPU became too busy for hw video decoding and webrender rendering.

Thank you. After all this resource remarks I'm testing an extension that unload unused tabs after a while. I will report back if the issue still show up even after this.

I want to report that if I open enough streams, the lag is there even with no other tabs involved. I checked the resource usage and nothing is satured. Sure I've got some cpus busy but not many doing very little, memory is quite free and gpu usage is kinda low. So even if this is a resource issue, it doesn't seem like it's lacking hardware space, or it can be detected by system resources monitor.

Attached image cpus.png
Attached image igpu.png

The thing is that it used to be more capable to play many things at times without slowing down. So even if it's a resource issue, it seems that Firefox is now demanding more resources than before.
Also while I get basically freezing with like maybe 6-8 streams? I just opened way more streams on Chrome and it keep super smooth, like 25 video streams and I think I can go even further.

Mei, some asks:

  • Can you recall how long ago this behavior started to show?
  • Can perform a mozregression to help pinpoint the commit that might have lead to this?
  • Can you also grab an about:memory report while this behavior is occurring and attach it here?
Flags: needinfo?(sotaro.ikeda.g) → needinfo?(73y8f6sj1)

I also see in the about:support that there are some reported critical errors, seem to be VIDEO_HW_OVERLAY - Sotaro, do you know what this could mean?

Flags: needinfo?(sotaro.ikeda.g)
Flags: needinfo?(sotaro.ikeda.g)
Attached file memory-report.json.gz
Flags: needinfo?(73y8f6sj1)

As you suspected, there's nothing too alarming in that memory report that I can see. Are you able to try and do a mozregression (link is in comment 12) to see when it started occurring?

I played a lot with mozregression but I was not able to figure out much. If anything newer releases seem to be doing better.
I'm assuming at this point that it was really my computer being busy with many tabs. Now that I've got an extension that unload things after some time the issue is not showing.
I have no idea why the other day I was able to reproduce lag with not much tabs again, so I'm confused. I'm waiting to see if it happens again in this new situation.
It might be still some bug going on though, since I don't think my resources are never satured. Dealing with many tabs at time happens to break things. And I'm pretty sure it's not memory, it's more processing related. Also I don't know if it helps, but I want to note that when Firefox is freezing and lagging, the system and apps are not affected.

A small update on this! I think the issue I've been experienced is a mix of different things. Now I just want to highlight that yeah, opening tabs in the order of just 10, is enough to get some lag to kick in. The specific lag is the video showing one new frame every few seconds. So it's like it become a slideshow and it keeps the same speed. No cpu or memory is stressed, and everything is fluid. Only the video is doing this, and I think it's pretty obvious there is some bug around, but no idea at what level. If anything this behaviour was already tracked in my first profiled reports.
I remember some hint about vsync being super slow? It sounds related to me. The sad thing about this is that I don't really have any recipt to reproduce it. The only hint is that it usually happens if I've got open different things and media is involved.

The busy computer issue instead was different, since the lag was umpredictable, and everything was as well freezing or slow.

I remember some hint about vsync being super slow?

No doubt I'm grasping a straws here, but would any of this ring a bell for you, Markus?

Flags: needinfo?(mstange.moz)

In the profile from comment 19 I can't see a video playing. There are no video markers on the Compositor thread of the GPU Process.

I'd be happy to look at another profile of the "slideshow video but responsive system" phenomenon.

Vsync appears to be working fine in that profile.

Flags: needinfo?(mstange.moz)

Again slow video. Not super slideshow, just sluggish and maybe skipping few frames. Closing and opening again the page won't fix it.

Hello. An update about this after a long time the bug not going away. Now I'm not even using many tabs anymore.

It appears that the issue is related to AV1 hardware decoding. Not sure If I should close this bug and open a new one.

Other people reporting the same issue: https://www.reddit.com/r/AV1/comments/13969mr/av1_lagging_like_mad/

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: