Open Bug 1659143 Opened 3 years ago Updated 8 months ago

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


(Core :: Graphics: WebRender, defect)

79 Branch



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


(Reporter: konrad.kolodziejczyk.poczta, Unassigned, NeedInfo)


(Blocks 1 open bug)


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.

This is CPU usage with enabled layers.force-acceleration.enabled

This is CPU usage with enabled gfx.webrender.all

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.

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 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 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 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.

The bug has a release status flag that shows some version of Firefox is affected, thus it will be considered confirmed.

Ever confirmed: true

Same here with Firfox 91.9.1-esr on Debian Bullseye.
Fresh installation. Running with defaults, with webrender it's double slower than --safe-mode that runs with "Basic" compositor.
I wonder: how can I have the same result without --safe-mode? I mean, how can I get compositor "Basic" instead of "Webrender"? It'll suffice to me. Otherwise the CPU is 100%. With "Basic" the CPU is 20%.

Found it!
gfx.webrender.force-disabled = true
Finally I've got my speed back! :-)
Mozilla should talk with Debian because FF ESR and Debian don't get on very well.

Rik, gfx.webrender.force-disabled goes away in FF92. You're issue seems unrelated to this bug can you please file a new one?

Flags: needinfo?(riksoft)
You need to log in before you can comment on or make changes to this bug.