Open Bug 1659143 Opened 2 years ago Updated 1 month ago

OpenGL compositing and webrender lower performance in Firefox on Linux on Intel HD 5500

Categories

(Core :: Graphics: WebRender, defect)

79 Branch
Desktop
Linux
defect

Tracking

()

UNCONFIRMED
Tracking Status
firefox79 --- disabled
firefox80 --- disabled
firefox81 --- disabled

People

(Reporter: konrad.kolodziejczyk.poczta, Unassigned)

References

(Blocks 1 open bug)

Details

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

Steps to reproduce:

On Dell Latitude E7250 with Intel HD 5500 GPU on Linux (different distributions) I enable either layers.acceleration.force-enabled or gfx.webrender.all (in about:config). I have checked this on both modesetting and intel xorg 2D driver. I have checked this on both iris and i965 opengl driver.

Actual results:

U Both layers.acceleration.force-enabled and gfx.webrender.all does not cause more smooth web browsing and less CPU usage. On the contrary, these options cause slower loading of complex web pages and significantly higher CPU usage while watching videos on Youtube.

This is CPU usage with disabled these options.
https://i.postimg.cc/zG51wmhj/without-acceleration.png

This is CPU usage with enabled layers.force-acceleration.enabled
https://i.postimg.cc/YqzPHv46/opengl-compositing.png

This is CPU usage with enabled gfx.webrender.all
https://i.postimg.cc/6p1YWnBv/webrender.png

This problem does not occur on Dell Optiplex 745 with Core 2 Quad Q6600 and AMD Radeon HD 6450 GPU.

Expected results:

Enabling either of these options should cause smoother web browsing experience and lower CPU usage.

OS: Unspecified → Linux
Hardware: Unspecified → Desktop

I think this bug is related to that bug.
https://bugzilla.mozilla.org/show_bug.cgi?id=594876

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Graphics: WebRender
Product: Firefox → Core

(In reply to Release mgmt bot [:sylvestre / :calixte / :marco for bugbug] from comment #2)

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

It also is related with OpenGL acceleration (layers.acceleration.force-enabled).

Thanks for the report! (layers.acceleration.force-enabled is deprecated, only WebRender matters going forward.)

  • Basic compositor (software rendering) has partial present, WebRender doesn't have it yet due to missing support in Mesa:
    bug 1648799, bug 1625070 and https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6132 are about this.
  • The video is software-decoded. Linux VAAPI hardware video decoding is being developed in bug 1610199.
    You can try it out with the following steps:
    Download https://nightly.mozilla.org and start it always with $ MOZ_X11_EGL=1 path/to/firefox. Open about:config, set the following prefs and restart Nightly afterwards: gfx.webrender.all=true (OpenGL rendering), media.ffmpeg.vaapi.enabled=true (hw decoding), media.ffvpx.enabled=false (vp8/9 hw decoding).
    With $ vainfo you can see which codecs are supported by your GPU.
    Optionally you can install the intel-gpu-tools package and launch intel_gpu_top as root to see hw decoding workload.
    With https://addons.mozilla.org/en-US/firefox/addon/enhanced-h264ify/ you can disable codecs that are not supported by your GPU (e.g. disable VP8/VP9/AV1 if only h264 is supported. But disabling VP9 means that you can't play back videos above 1080p on YouTube).
    If you have multiple GPUs (bug 1588904), you might need to set another env var, e.g.: MOZ_WAYLAND_DRM_DEVICE=/dev/dri/renderD129 (for x11/wayland).

I know Firefox 79 does not support hardware decoding of video. Nevertheless, on AMD Radeon HD 6450 enabling openGL acceleration cause significantly smoother youtube watching experience and smoother web browsing experience overall. It does not work on Intel HD 5500.

Also note that versions prior 81 (nightly) suffer from bug 1617002 - i.e. additionally to missing partial present, the window behind firefox will also get painted - and if you have multiple firefox windows stacked, things get even worse. However, this mainly affects the GPU.

Concerning CPU, there are quite few areas where Webrender still can improve, i.g. bug 1650378 specificly and bug 1596042 / bug 1477376 in general. The good news is that most of these improvements will be shared on all platforms, i.e. they often affect Windows, Android and MacOS aswell. So things will get better with each new release :)

Severity: -- → S4
Blocks: wr-linux-perf
No longer blocks: wr-linux

On Firefox 85.0.1 (Ubuntu 20.10 Gnome 3.38.3) I am still experiencing problems with performance on Webrender enabled despite the fact that Webrender is default enabled. Watching Youtube 1080p 60fps video with Webrender enabled and clicking the Youtube quality choice button causes significantly frame rate drop.

I've noticed also little performance regress (slightly higher CPU Usage with Webrender enabled) after enabling Webrender on other laptop (Lenovo Thinkpad E495 with AMD Ryzen 7 3700U CPU and integrated GPU on Linux Mint 20.1 Cinnamon Edition).

On Google Chrome GPU accelerations works on Linux without problems.

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