Closed Bug 1707487 Opened 5 years ago Closed 5 years ago

Video playback on Ubuntu 20.04 is slow

Categories

(Core :: Audio/Video: Playback, defect, P3)

Firefox 87
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: me, Unassigned)

Details

Attachments

(4 files)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0

Steps to reproduce:

I've put detailed system information in the attached file, but here's the basics:

  • Ubuntu 20.04.1
  • AMD Ryzen 7 5800X 8-Core Processor
  • NVIDIA Quadro K2200
    • nvidia-driver-460
  • Mozilla Firefox 87.0 (64-bit)
  • "Use recommended performance setting" is checked (i.e. True)

To reproduce:

  • launch Firefox
  • open a video (e.g. this video of music and a static-ish image https://youtu.be/vd0VCrGfmR0)
  • leave the tab for that video focused
  • observe CPU usage peaks at 40-100% per core
  • observe system-wide graphical slowdown, most noticeable in very slow scrolling (typically a couple of seconds of latency in scrolling)

This does not occur when the video tab is not focused. CPU usage then peaks at ~10% per core.

I tried reproducing on Chromium 90.0.4430.85 snap (64-bit), and CPU usage with the video tab focused was only ~20% per core with no system-wide slowdown.

I've failed to reproduce on this same machine on the same version of Firefox on Windows 10.

Actual results:

System-wide graphical slowdown, most noticeable in very slow scrolling (typically a couple of seconds of latency in scrolling)

Expected results:

No apparent slowdown

The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: Playback' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core

Mozilla Firefox 87.0 (64-bit)

That version is old and not supported anymore. Does that still happen with a supported version?

Flags: needinfo?(me)

It doesn't seem to be offering an upgrade through the "About Firefox" window, and apt doesn't seem to have a newer version either. Is there a way to force an upgrade?

Flags: needinfo?(me)

Hi,
Does this guide for updating Firefox work for you? Will this issue only happen on Youtube, or on other sites as well? In addition, will issue happen on a fresh profile or on a private browsing window? Would you mind to provide the information from about:support?
In addition, could you help me use Firefox Profiler with "Media" preset to profile the issue?
Thank you!

Flags: needinfo?(me)
Flags: needinfo?(me)

The Ubuntu Software Updater app had the update, so I'm now on FF 88.0. The system-wide slowdown seems perhaps less (though still noticeably present), but the CPU usage is still about as high. I've put the about:support output in the above file. I'll get you the profiling data in a moment.

So I'm not sure how to export the data captured by the profiler, but taking a look at it, it seems that the compositor is what's being the CPU hog (claiming 98-99% of the CPU). Not knowing anything about Firefox's graphics stack, this suggests to me that I'm not getting hardware acceleration. Perhaps I'm having a driver issue? I'll look into it. In the meantime, I'll post a couple interesting screen caps from the profiler.

Attached image profiler graphs —

Videos on Nebula are not having the issue (load per core <40% while the tab is focused) https://nebula.app/videos/adam-neely-how-many-chuggas-before-the-choo-choo-music-theory-qa (sorry for this being behind a paywall)

Videos on Vimeo don't seem to have the issue (load per core <20% while the tab is focused) https://vimeo.com/464298473

So I'm not sure how to export the data captured by the profiler,

In the upper right of the profile UI there's an 'Upload Local Profile' button you'll need to use to share the profiles.

From the image on the comment9, it seems graphic doing something busy, but if possible that I would still want to see the full profile. As bryce mentioned in comment12, click Upload Local Profile then you can share the link of the profile. The one you provided in comment 10 is the local only url. Thank you.

Flags: needinfo?(me)

Here's the capture from the profiler. I ended up having to recapture the data, so it's not exactly the same as above, but the same 99% CPU usage persists https://share.firefox.dev/3e12yLv

Flags: needinfo?(me)

Thank you for doing that, but would you mind to recapture that again with "Media" preset? because the one you captured in comment 14 didn't contain the information about media.
Thank you.

Flags: needinfo?(me)

Oh shoot! Here ya go, same as before, but I selected Media from the dropdown in the browser extension https://share.firefox.dev/3tgSthR

Flags: needinfo?(me)

Do you see more than 2 threads in your local profile (before uploading)? when you upload the profile, you have to ensure that you select Include hidden threads as well.
Thank you.

Flags: needinfo?(me)

Ah sorry didn't realize you needed that. Here's a profile taken on the media preset with hidden threads https://share.firefox.dev/3hmKrSv. Sorry it took a minute to get this; it's been a few days since I've been on my linux machine.

Flags: needinfo?(me)
Severity: -- → S3
Priority: -- → P3

Just got 89.0, and it looks like yall got this bug fixed. Thank you much! https://share.firefox.dev/34KHHGZ

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → WORKSFORME

Thanks for letting us know, marking as resolved.

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

Attachment

General

Creator:
Created:
Updated:
Size: