It’s been long known that a vocal minority (or perhaps even majority) of Firefox users have had issues with rendering performance on X11, but nobody has quite pinpointed what the issue is.
Recently Nicolas Silva landed a change in mozilla-central to add a preference to allow for disabling the use of the RENDER extension when drawing using Cairo on X11. I’d like to call on any Firefox/Linux users who have been experiencing speed issues to download the latest nightly and go to about:config and set “gfx.xrender.enabled” to “false”. If you could also let me know what hardware and drivers you’re running that’d also be great.
It would be useful to mention this boolean to AppNotes in crash reports, and in about:support.
amd radeon HD 6310 with open source driver X.Org — Gallium 0.4 on AMD PALM — 2.1 Mesa 8.0.2
The good news : i can enable accelerated layers without any glitch, webgl is faster.
The bad news : http://ie.microsoft.com/testdrive/Performance/PsychedelicBrowsing/Default.html and http://ie.microsoft.com/testdrive/Performance/FishIETank/Default.html are much slower.
That’s expected. How much slower is canvas performance?
OpenGL vendor string: X.Org R300 Project
OpenGL renderer string: Gallium 0.4 on ATI RS480
OpenGL version string: 2.1 Mesa 8.0.2
OpenGL shading language version string: 1.20
Psychedelic @ 1280×1023
gfx.xrender.enabled true:
262RPM
+layers.acceleration.force-enabled true:
235RPM
gfx.xrender.enabled false:
6RPM
+layers.acceleration.force-enabled true:
6RPM
Fishtank has larger variance inside the test, depending of the fish size, than between tests.
Any better tests out there? Is the extension to test canvas rendering errors applicable?
That’s funny. I got the results reversed. Fishtank is much faster with gfx.xrender.enabled set to false. (nvidia drivers 280.13)
With xrender enabled PsychedelicBrowsing does 3182 revolutions per minute, disabled it’s down to only 3 (7 with azure canvas enabled).
FishIETank (20 fish): 45fps with xrender enabled, 12fps with xrender disabled (15 with azure canvas enabled).
Same here, running with xrender disabled and layers force-enabled; no glitches at all (woohoo!), WebGL super fast, but general browser performance took a severe hit — I basically lost smooth scrolling.
Can do profiles for you if you want.
NVIDIA 295.40 driver.
Filed a bug with a profile about my scrolling performance issues:
https://bugzilla.mozilla.org/show_bug.cgi?id=753228
ATI with fglrx
I agree that webgl is faster, although my experience (on psychedelic and fishIEtank) is that browsing without xrender is nearly twice as fast.
Although if I force-enable layers I get *lots* and *lots* of glitches, everything is essentially broken.
Can you try adding a boolean pref in about:config that is “gfx.textures.poweroftwo.force-enabled” and set it to true? Let me know if that makes GL layers work fine. If that doesn’t work, try adding “gfx.work-around-driver-bugs” and set that to true.
I have geforce 9600gt 512m with proprietary beta 302.07 drivers. Tested in fullscreen, resolution: 1600×1200.
With xrender enabled:
fishtank: ~60fps with 100 fishes
psychedelic: 7521
http://demos.hacks.mozilla.org/openweb/HWACCEL/ : ~106fps
Without xrender:
fishtank ~11fps
psychedelic: 6
hwaccel: 16fps
Forgot to mention: force-enabled layers acceleration doesn’t make a difference when xrender disabled
Well that should settle it:
Driver Mesa DRI Intel Sandbridge mobile, Mesa 3.0 8.0.2
Couldn’t see the difference in text rendering between the two modes. Maybe it’s me
However MASSIVE performance difference on the 2 said test sites:
XRENDER on:
Psychadelic 4293-4400 rev/m
CPU usage low
FishIE: 60 FPS (max) 20 fishs
CPU usage medium
XRENDER off:
Psychadelic 75 rev/m
CPU usage high
FishIE: 34 FPS 20 fishs
CPU usage medium
FWIW I have plenty of glitches when using layers.force-enabled=true on Intel/Mesa-git.
With xrender disabled, I can’t seem to notice any glitch AND I cannot sense a perf regression either in scrolling or otherwise.
This is pretty awesome!!
restart the browser after you change the setting
AMD Radeon HD 6310 Graphics — 4.2.11627 Compatibility Profile Context
I switched to the proprietary driver and the results are quite different.
First I can’t use layers force-enabled with xrender disabled it’s full of glitches, in the past a mozilla developer said glitches were caused by bad interaction with xrender but now that it’s disabled there must be an alternative cause.
There is however a somewhat positive point, canvas performance was so bad with xrender that its actually better now (but still bad):
With xrender enabled PsychedelicBrowsing does 2 revolutions per minute, disabled it’s up to 3 (6 with azure canvas enabled).
FishIETank (20 fish): 13fps with xrender enabled, 14fps with xrender disabled (16 with azure canvas enabled).
These results are interesting. I’m running a mobile i7 Sandy Bridge with:
Adapter Description: Tungsten Graphics, Inc — Mesa DRI Intel(R) Sandybridge Mobile Vendor ID: Tungsten Graphics, Inc
Device ID: Mesa DRI Intel(R) Sandybridge Mobile
Driver Version: 2.1 Mesa 7.11.2
WebGL Renderer: Tungsten Graphics, Inc — Mesa DRI Intel(R) Sandybridge Mobile — 2.1 Mesa 7.11.2
GPU Accelerated Windows: 1/1 OpenGL
With xrender disabled and layers force enabled I’m getting relatively good performance on psychadelic (~850 w/GL layers, ~750 without, both with image surfaces @ 1366×768). FishIE tank takes a small hit but it’s not too bad (pegged at 60 down to a range of 45-60). Scrolling seems fine.
Benoit – I may come over to your desk later and have a look at what’s going on on your machine.
The NVIDIA 295.40-ubuntu1 driver is crashing my X.org/Unity every hour or so, so I resorted to nouveau — Gallium 0.4 on NV92 — 2.1 Mesa 8.0.2.
With the 15.0a1 (2012-05-09) nightly:
1. { layers.acceleration.force-enabled: true } is basically ruining graphics; browser graphics are not drawn properly or do not refresh or hang and so on.
2. Furthermore, { gfx.xrender.enabled: true } actually slows down the Psychedelic, FishTank and WebGL Aquarium FPS rates.
I hope this helps. Thanks!
Psychedelic is
with gfx off 44 revolutions
with gfx on 4660 revolutions
http://www.smashcat.org/av/canvas_test/
with gfx off 60 -63
with gfx on 230+
Adapter DescriptionX.Org — Gallium 0.4 on AMD CAICOSVendor IDX.OrgDevice IDGallium 0.4 on AMD CAICOSDriver Version2.1 Mesa 7.11.2WebGL RendererX.Org — Gallium 0.4 on AMD CAICOS — 2.1 Mesa 7.11.2GPU Accelerated Windows0
AzureBackendskia
For those that are experiencing decent rendering (ie – no corruption) but slower canvas performance please concentrate on testing content rendering? I’m primarily concerned with things like scrolling performance and general day-to-day use.
Whilst these synthetic benchmarks are useful for optimising specific parts of the graphics stack, they don’t translate too well into real world scenarios.
I want to help out. After setting “gfx.xrender.enabled” to false, what am I supposed to do?
Just restart Firefox and let me know how the performance is
On an older Athlon amd64 2GB machine with 64-bit Firefox
Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/15.0 Firefox/15.0a1
Adapter Description: X.Org R300 Project — Gallium 0.4 on ATI RV350
Vendor ID: X.Org R300 Project
Device ID: Gallium 0.4 on ATI RV350
Driver Version: 2.1 Mesa 8.0.2
WebGL Renderer: X.Org R300 Project — Gallium 0.4 on ATI RV350 — 2.1 Mesa 8.0.2
GPU Accelerated Windows: 0
AzureBackend: skia
Rendering was fine before, it’s fine now, scrolling large web pages is equally smooth. I think all my other graphics settings are at their default, so layers.acceleration.force-enabled is false.
Before, in a fullscreen 1280×844 window, Psychedelic browsing ranged from 222 to 502 and the FishIETank with default 20 fish was 9-10 fps (). With gfx.xrender.enabled false, Psychedelic browsing dropped to 5-8. FishIEtank claims 20 fps, but its rendering is extremely choppy or the fish don’t display, and firefox is at 95% of CPU (before with gfx.xrender.enabled true, Xorg took about 65% of CPU and Firefox 6%). If I reduce the window size to half-screen it jumps to 40fps and looks smoother, maybe the fullsize window is hitting some texture limit.
My results varied a lot…
Window Size 1238×1026
Intel(R) Core(TM)2 Duo CPU T7700 @ 2.40GHz
NVIDIA Corporation G84M [Quadro FX 570M] (rev a1)
Ubuntu Precise with nvidia 295.40-0ubuntu1
Unity desktop with Compiz
gfx.xrender.enabled = true
layers.acceleration.force-enabled = false
- Psychedelic: 24rpm
- Fish: 28 to 34fps
- Smashcat Canvas test – 25-31fps (slowly climbed)
gfx.xrender.enabled = true
layers.acceleration.force-enabled = true
- Psychedelic: 1131rpm
- Fish: 1fps
- Smashcat Canvas test – 2fps consistent
gfx.xrender.enabled = false
- Psychedelic 1rpm
- Fish: 9 to 12fps
- Smashcat Canvas test – 42fps consistent
Using 2012-05-11 nightly
Linux 3.3.2
NVIDIA 295.33 driver
Hardware: old AMD Athlon 2800XP
scrolling on https://bugs.launchpad.net/ubuntu/+source/roundcube/+bug/900190 (for example)
with XRENDER on, firefox uses about 45% CPU (!)
with XRENDER off, firefox uses about 60% CPU (!!)
can’t see much of a difference in webgl performance (6ish fps for fish tank with 1 fish!)
There’s long standing performance issues with firefox and the NVIDIA driver, i just wish i knew where to look; launchpad is using CSS sprites, and more and more sites seem to be moving that way, and for some reason firefox and NVIDIA drivers don’t like them.
Disabling xrender resulting in an increase of CPU usage is expected; it’s because the Firefox process is now doing the work instead of the X process. You should see a decrease in the CPU usage of X.
Using Mesa trunk on 790GX…
PsychedelicBrowsing test:
Forced Layer Acceleration on + Xrender off: 11 point
Forced Layer Acceleration on + Xrender on: 353 point
Forced Layer Acceleration off + Xrender off: 8 point
Forced Layer Acceleration off + Xrender on: 1573 point (But super jerky!)
With xrender disabled, Psychedelic is over 100 times slower (12rpm vs. 3418 rpm) and FishIETank is also dramatically slower.
OpenGL vendor string: Tungsten Graphics, Inc
OpenGL renderer string: Mesa DRI Intel(R) Sandybridge Mobile x86/MMX/SSE2
OpenGL version string: 3.0 Mesa 8.0.2
OpenGL shading language version string: 1.30
Gerv
@gw280
No real noticeable rendering issues.
Hi. Are you still collecting information about this? I’m on a 7970 on fglrx on some recent version of Nightly.
layers.acceleration.force-enabled = false
layers.acceleration.force-enabled = true
Seems to be the fastest for day to day browsing. Also, I’m not getting any corruption in rendering like some people seem to have had. The only problem is canvases are black before content is rendered in them.
Sorry, that should be
gfx.xrender.enabled = false
layers.acceleration.force-enabled = true
While developing a javascript-based astronomical image display application using Kinetic.js, we ran into a problem with FF seemingly not firing mousemove events on a number of machines using various operating systems (Debian, Ubuntu, CentOS, Mac). An initial bug report was made on the Kinetic.js site (to rule out Kinetic and get some advice):
https://github.com/ericdrowell/KineticJS/issues
See Issue #221: Mousemove event problems using Firefox (on some systems)
Thanks to your page, we found that all of the Linux problems were resolved by setting “gfx.xrender.enabled” to “false”. (The Mac problems were resolved by upgrading to FF18.) You might want to glance at the discussion on the Kinetic site, as well as the test page at:
http://hea-www.cfa.harvard.edu/saord/test/mev2.html
It might shed some light on the general topic. (Sorry, too many machines and graphics cards were involved to list them all.)