How to turn on Accelerated Compositing Layers on Firefox

Accelerated compositing is the best way to use the available graphics hardware, offloading the work required to composite the webpages from the various layers they contain. If you enable it in Firefox, the result will be better user experience and improved overall performance.

Hardware accelerated compositing uses the Graphics Processor Unit (GPU) to accelerate certain elements as native video formats like Theora or WebM, images, CSS animations, and some other elements.

Let’s see how to enable it on the latest Firefox versions.

Before any steps, let’s check if the Accelerated Compositing Layers is already on your browser.

Open a Firefox tab and digit:

about:support

Check for HW_COMPOSITING value. If you find something like blocked by default: Acceleration blocked by platform, you’re ready to enable acceleration.

So, open another Firefox tab and digit:

about:config

In the search field, put layers.acceleration.force-enabled and press ‘enter’. Then, right-click on it and select ‘Toggle’. Now, you should see the line in bold and the value changed from ‘false’ to ‘true’. In the end, restart your Firefox browser.

If you don’t find any valuable difference in performance, maybe you can try to force all layers acceleration. Because of different hardware and GPUs, it could be a better option.

Open a Firefox tab and digit:

about:config

Right-click anywhere and select ‘NEW’ then ‘Boolean’. Add in layers.accelerate-all, then double click to turn it ‘true’ or right-click as explained above. This will enable all compositing of layers and you can revert it by simple double click again.

In both cases, if your performance suffers or occurs bugs, you must revert the values to the default because your system has issue enabling acceleration on Firefox.

Plus. Another tweak to speed up your browser on Linux is to enable Accelerated Azure Canvas.

Go again to about:config and right-click to create a new boolean value. Set the name as gfx.canvas.azure.accelerated and set it to true. Pay attention because Accelerated Azure Canvas may cause corrupt rendering of images on unsupported devices and drivers. I found this tweak on the legendary ArchWiki, check it for more information. I don’t use it because it gave me weird issues both on Dell and Thinkpad laptops, so you are warned.