Skip to main content

Gecko Preferences

Here are some notes on preferences you may want to change in Gecko Embedded (items specified in about:preferences or about:config page or preference files such ad prefs.js)

Gecko Rendering Engine

Hardware Acceleration

  • layers.acceleration.disabled
  • layers.acceleration.force-enabled
    • if set to true, GPU will be used even if HW Compositing is determined to be unavailable
  • gfx.canvas.azure.accelerated
    • Whether to use Hardware Acceleration in Canvas
  • widget.wayland-dmabuf-webgl.enabled

WebRender

Setting for WebRender rendering engine implemented in Rust language, enabled in Gecko 92 in all environments including Linux. Gecko 92 have a temporary setting to revert to the legacy rendering engine, but it was discontinued in Gecko 93, and WebRender (Software or Hardware) is now used across the board.

The results of the configuration changes can be checked at about:support. Under Graphics section, Compositing: WebRender means GPU-accelerated WebRender, and Compositing: WebRender (Software) means fallback to software-processed WebRender. See also WEBRENDER and WEBRENDER_QUALIFIED in the decision log.

  • gfx.webrender.all
    • If true, all settings to enable WebRender are turned on (for cases where WebRender is automatically disabled but you want to enable it).
    • On Linux, this includes forcing on the use of the OpenGL layer.
    • Gecko 92 and later will enable WebRender without this setting. Basically, this setting is used up to Gecko 91.
  • gfx.webrender.software (since Gecko 87)
    • Use software WebRender instead of GPU in WebRender
  • webrender.low-quality-pinch-zoom
    • Perform pinch-zoom processing for low-performance devices such as Android devices, not for high-performance PCs.
    • Consider enabling it for use on an embedded SoC if you want to have the same high-speed pinch-zoom processing as Android devices.
  • gfx.webrender.debug.profiler
  • gfx.webrender.debug.profiler-ui
    • Specify a string that specifies what to display when Overlay Debugging is enabled. The default setting is Default, which displays very detailed information, but there are also Compact and Slow indicators for a simplified version, or FPS if you simply want to display FPS.
    • See the comments in profiler.rs for other possible strings.

Deprecated prefs not used in the latest Gecko:

  • gfx.webrender.all.qualified (hidden prefs)
  • gfx.webrender.force-legacy-layers (deprecated on Gecko 93)
    • setting to disable WebRender instead of gfx.webrender.force-disabled on Gecko 92
  • gfx.webrender.force-disabled (deprecated on Gecko 92)
    • If true, WebRender is not used (for cases where WebRender is enabled automatically, but you want to disable it)
  • gfx.webrender.enabled (deprecated)
    • If true, WebRender is used (for older versions that are disabled by default)
    • on Linux, it is only enabled if layers.acceleration.force-enabled=true
  • nglayout.debug.paint_flashing, nglayout.debug.invalidation

Some WebRender behaviors can only be controlled via environment variables, not prefs:

Preferences to enable/disable e10s and to configure the number of processes when enabled. You can check the result of the setting change in about:support, e.g. Multi-process window: 2/2 (enabled by user setting).

caution

RZ/G1 series can only create one EGL window due to hardware/BSP restrictions. So e10s have to be turned off since GPU acceleration with egl cannot coexist with canvas-gpu acceleration or WebGL, etc (not tested/confirmed).

Stylo

Enable/disable Stylo, the Rust implementation style engine ported from Servo. The result of the setting change will shown in Stylo section of about:support page such as "Stylo: content = true (enabled by default), chrome = true (enabled by default)"

  • layout.css.servo.enabled
    • If set to true, use Stylo

WebGL/WebGPU

  • webgl.msaa-force
    • If true, WebGL anti-aliasing is used (disabled by auto-decision but should work)
  • dom.webgpu.enabled (gecko 73~)
    • If true, enable WebGPU.

Video Codecs

  • media.mediasource.enabled
    • Enable MSE
  • media.mediasource.mp4.enabled
    • Enable mp4 support in MSE

Touch events

security restrictions

  • privacy.file_unique_origin
    • Relax same-origin rule for local files. Fetch to non-HTTP(S) location no longer allowed since Firefox 68. Set to false if you want to work with content that does not work when loaded with a file URL for the time being.

SpiderMonkey JS Engine

  • javascript.options.baselinejit
    • Enable/disable baseline JIT (no need to restart the browser itself)
  • javascript.options.ion
    • enable/disable IonMonkey optimized JIT (no need to restart the browser itself)
    • When baseline JIT is disabled, this should also be disabled
  • dom.max_script_run_time
    • Specify the amount of time to wait before checking if the JavaScript of the content is too heavy to abort. It is recommended to set this in advance when running a heavy bench. Default 10 should be set to 1000, but in some cases it may be set to 0 (infinite).

Debugging

Show Frame rate

  • layers.acceleration.draw-fps (deprecated)
    • If true, the frame rate will be displayed in the upper left corner of the screen (but it may not be displayed in some cases)
    • FPS history can be checked while profiling with Performance Tools in Development Tools
    • This setting is not enabled in WebRender, see gfx.webrender.debug.profiler

Show layer borders

  • layers.draw-borders
    • If true, composite layer borders will be displayed. if CSS Transition/Animation starts too late, check if the appropriate layer is detected, if not, set will-change to indicate it.

Remote debugging

  • devtools.debugger.remote-enabled
    • Set to true to allow remote debugging. The following items must also be set to true
  • devtools.debugger.usb.enabled = true
    • Set to true to allow bags remotely via USB
  • devtools.debugger.prompt-connection
    • set false to allow automatic connection without pressing allow button when connecting

History and Cache

Settings in Preferences window

You can configure settings for automatic deletion of cache and history data when exiting in about:preferences

  • Open about:preferences
    • Privacy & Security panel - `Cookies and Site Data
      • Turn on `Delete cookies and site data when Firefox is closed
      • This will automatically delete cookies, local storage, and other data stored by content-side code.
    • Privacy & Security panel - History.
      • Select Firefox will Use custom settings for History, turn on Clear history when Firefox closes, and select the desired settings in Settings.
      • This will automatically clear the history and cache stored by the browser engine, regardless of the program on the content side.

Reference: How to clear the Firefox cache

Disk/Memory Cache

Others

  • dom.max_script_run_time
    • Set the time it takes to display an unresponsive script warning on heavy JavaScript processing pages.
  • browser.sessionstore.interval
    • Automatic storage of session information. Default 15 seconds (15000), but longer interval reduces disk access.
  • browser.sessionstore.resume_from_crash
    • If set to false, it is possible to disable the automatic storage of session information itself
  • dom.push.enabled
    • ESR 68 sets this to false by default and it will show JavaScript error: resource:///modules/sessionstore/SessionStore.jsm, line 1215: uncaught exception: [2147746065](http://james-ross.co.uk/mozilla/misc/nserror?2147746065) error. This is a known bug. To work around this problem for now, change the setting to dom.push.enabled=true.

References