OpenGL compositing and webrender lower performance in Firefox on Linux on Intel HD 5500
Categories
(Core :: Graphics: WebRender, defect)
Tracking
()
People
(Reporter: konrad.kolodziejczyk.poczta, Unassigned, NeedInfo)
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.
Reporter | ||
Updated•3 years ago
|
Reporter | ||
Comment 1•3 years ago
|
||
I think this bug is related to that bug.
https://bugzilla.mozilla.org/show_bug.cgi?id=594876
Comment 2•3 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Reporter | ||
Comment 3•3 years ago
|
||
(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).
Comment 4•3 years ago
•
|
||
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).
Reporter | ||
Comment 5•3 years ago
|
||
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.
Comment 6•3 years ago
|
||
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 :)
Updated•3 years ago
|
Updated•2 years ago
|
Reporter | ||
Comment 7•2 years ago
|
||
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).
Reporter | ||
Comment 8•2 years ago
|
||
On Google Chrome GPU accelerations works on Linux without problems.
Comment 9•9 months ago
|
||
The bug has a release status flag that shows some version of Firefox is affected, thus it will be considered confirmed.
Comment 10•8 months ago
|
||
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%.
Comment 11•8 months ago
|
||
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.
Comment 12•8 months ago
|
||
Rik, gfx.webrender.force-disabled goes away in FF92. You're issue seems unrelated to this bug can you please file a new one?
Description
•