Bug 2278600 - overall gfx performance issues with firefox drawing content and media playback
Summary: overall gfx performance issues with firefox drawing content and media playback
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: firefox
Version: 39
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Gecko Maintainer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-05-02 08:57 UTC by customercare
Modified: 2024-11-06 04:25 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-07-08 07:46:27 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
check the timestamps (2.04 MB, application/zip)
2024-05-05 17:28 UTC, customercare
no flags Details
ff about:support content (84.16 KB, text/plain)
2024-05-10 07:17 UTC, customercare
no flags Details

Description customercare 2024-05-02 08:57:49 UTC
Since yestderday, but could be a day earlier, i experience partly dramatic performance issues on firefox.

I have a dual display system, using a RTX4060 with nvidias prop drivers from RPMFusion. 

Yesterday i noticed for the first time, that video playback inside firefox ( NetFlix ) was lagging on the video track so badly, that the video frames got stuck for seconds. sound was normal, which is an indication that the network stream was not the issue.

While this happend, i checked the gpu stats with nvtop, and there has only been a 40% usage by a game that runs longside on the other display. So the GPU was not the issue. 

After restarting performace was a bit better, but no way near normal rates. 

From experience with pinephones, it LOOKED LIKE it was a software that tries to do things without a gpu at all.. raw cpu power.

today: using firefox in a normal way to display websites, I can see a performace loss on pages that usually just appear instantly. it's like chewing gum. 

Because we had a gstreamer update on the 28th and no kernel nor firefox update nor any other remotely related to ff or gpus, this is my hypothesis:

Gstreamer broke video playback and related functions, as it's a key component for ff.



Versions: 

Firefox 125.0 

2024-04-28T10:01:32+0200 SUBDEBUG Upgraded: gstreamer1-plugins-good-1.22.9-1.fc38.i686
2024-04-28T10:01:32+0200 SUBDEBUG Upgraded: gstreamer1-plugins-ugly-free-1.22.9-1.fc38.x86_64
2024-04-28T10:01:32+0200 SUBDEBUG Upgraded: gstreamer1-rtsp-server-1.22.9-1.fc38.x86_64
2024-04-28T10:01:32+0200 SUBDEBUG Upgraded: gstreamer1-plugins-bad-free-extras-1.22.9-1.fc38.x86_64
2024-04-28T10:01:32+0200 SUBDEBUG Upgraded: gstreamer1-plugins-bad-free-1.22.9-1.fc38.x86_64
2024-04-28T10:01:32+0200 SUBDEBUG Upgraded: gstreamer1-plugins-bad-free-libs-1.22.9-1.fc38.x86_64
2024-04-28T10:01:32+0200 SUBDEBUG Upgraded: gstreamer1-plugin-libav-1.22.9-1.fc38.x86_64
2024-04-28T10:01:32+0200 SUBDEBUG Upgraded: gstreamer1-plugins-base-1.22.9-1.fc38.i686
2024-04-28T10:01:32+0200 SUBDEBUG Upgraded: gstreamer1-plugins-good-gtk-1.22.9-1.fc38.x86_64
2024-04-28T10:01:32+0200 SUBDEBUG Upgraded: gstreamer1-plugins-good-qt-1.22.9-1.fc38.x86_64
2024-04-28T10:01:32+0200 SUBDEBUG Upgraded: gstreamer1-plugins-good-qt6-1.22.9-1.fc38.x86_64
2024-04-28T10:01:32+0200 SUBDEBUG Upgraded: gstreamer1-plugins-good-1.22.9-1.fc38.x86_64
2024-04-28T10:01:32+0200 SUBDEBUG Upgraded: gstreamer1-plugins-base-1.22.9-1.fc38.x86_64
2024-04-28T10:01:32+0200 SUBDEBUG Upgraded: python3-gstreamer1-1.22.9-1.fc38.x86_64
2024-04-28T10:01:32+0200 SUBDEBUG Upgraded: gstreamer1-1.22.9-1.fc38.i686
2024-04-28T10:01:32+0200 SUBDEBUG Upgraded: gstreamer1-1.22.9-1.fc38.x86_64


Reproducible: Always

Steps to Reproduce:
1. surfing websites
2. watching videos

Actual Results:  
very bad performace as if no gpu is involved

Expected Results:  
smooth playback and surfing.

Comment 1 Stephane Travostino 2024-05-04 09:56:04 UTC
Yes, I am having the exact same issues as reported here https://discussion.fedoraproject.org/t/broken-rendering-and-video-playback-on-firefox-fedora-40/116133/1

It is not just a video playback problem, as I was having lag spikes while loading this very website (bugzilla.redhat.com). Flatpak Firefox seems perfectly fine.

Perhaps unrelated, but I have noticed hardware acceleration is NOT enabled, even when it should be on Wayland (as it's been the default on Fedora since FF 77). Forcing it on in about:config doesn't do anything either.

Affects Silverblue 40.20240430.0 to 40.20240503.0 at least. AMD RX 6800 XT, can reproduce on Hyprland and GNOME.

Comment 2 customercare 2024-05-05 17:21:44 UTC
I found a hint ( see attachment )

I had 5 Tabs open, all newspages without activated js ( noscript rulz ) 
AND after ~10 minutes, my PVA alerted me of high cpu usage.

I checked and firefox ran with 450%++ cpu without any interaction with the tabs.

The cpu usage spikes out of nothing and after a ~15sec -> never  it return to normal ( ~28 % ) 

about: processes show the main ff process is causing it, not the tabs and submodules.

I will attach some picture.

Comment 3 customercare 2024-05-05 17:28:46 UTC
Created attachment 2031410 [details]
check the timestamps

Comment 4 Martin Stransky 2024-05-06 05:54:46 UTC
Please file it at https://bugzilla.mozilla.org/ and CC me there:

1) try upstream binaries:
https://fedoraproject.org/wiki/How_to_debug_Firefox_problems#Testing_Mozilla_binaries

2) Attach about:support page:

Thanks.

Comment 5 customercare 2024-05-10 07:17:25 UTC
Created attachment 2032458 [details]
ff about:support content

Comment 6 customercare 2024-05-10 07:27:44 UTC
https://bugzilla.mozilla.org/show_bug.cgi?id=1896061

CCed you as requested.

Comment 7 customercare 2024-05-10 07:33:11 UTC
Note: it would make sense test nightly builds from upstream, if the issues would be reliable reproduceable, which it is not. I don't see a pattern yet. How important that is, we can see with the fullscreen-1 bug. 

TODAY: no issues on playback with the same movie i had issues with.

Comment 8 customercare 2024-05-27 07:45:35 UTC
new hints guys:

The issue reoccurred yesterday night.. out of a sudden while watching Netflix again. 
I was creating a video with openshot in parallel when the playback was stumpling and than stopping in firefox. 

Because i needed to check the video anyway i opend a videoplayer for it and that did also ONLY PLAY the sound, but the videopart was not possible it stuck on the first decoded frame.
Skipping inside the video was possible producing a slide show of still frames, while the sounds got instantly played normal.

I checked celluloid, mpv and totem, all had the same issue and all wanted to use the NVIDIA HDMI DEVICE for playing the sound. 
FFPLAY on the opposite, worked flawless.

I rebooted with a different kernel to avoid kernel driver issues, same result. 

When i changed they playback device with PulseAudios VolUmecontrol, playback worked again in FF, Celluloid, mpv and totem.

This is a PIPEWIRE ISSUE in conjunction with NVIDIA :(

After rebooting the nvidia playback device by disabling the device and reenabling it in PAVU's config tab, playback was possible there too again.

As this bug is reboot persistent, it can only be in Pipewire || Wireplumber , because the nvidia drivers get reloaded and the hw restarted on a reboot. 


O== Confirmation Question:

As ffplay was working while playing on the same audio device, it's important to confirm, that ffplay does use alsa for playback, instead of pulseaudio/pipewire.

Scott? can you confirm this as maintainer of the rpmfusion package?

If this is confirmed, i would give the ticket to Wim Taymans from pipewire, as it's no longer a ff issue.

Comment 9 customercare 2024-05-27 07:51:43 UTC
Name        : ffmpeg
Version     : 6.1.1
Release     : 5.fc39
Install Date: Do 16 Mai 2024 15:17:48 CEST
Packager    : RPM Fusion

Name        : pipewire
Version     : 1.0.6
Release     : 1.fc39

Name        : pipewire-pulseaudio
Version     : 1.0.6
Release     : 1.fc39

Name        : wireplumber
Version     : 0.4.17
Release     : 1.fc39

Comment 10 leigh scott 2024-05-31 08:29:15 UTC
ffplay uses pulseaudio

Comment 11 Aoife Moloney 2024-05-31 09:19:47 UTC
Fedora Linux 38 entered end-of-life (EOL) status on 2024-05-21.

Fedora Linux 38 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 12 customercare 2024-05-31 10:49:52 UTC
Issue confirmed with F39 ...

this morning, same thing, video freezing while audio playing on the same hdmi device. Switching to other device, instant recovery.

Comment 13 Martin Stransky 2024-07-08 07:46:27 UTC
https://bugzilla.mozilla.org/show_bug.cgi?id=1896061

Comment 14 Red Hat Bugzilla 2024-11-06 04:25:07 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days


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