31

Currently, in about:support (Firefox 30) the "Graphics" section states the following:

enter image description here Now, I know that Firefox has (for whatever reason) disabled the hardware accelerated features for Linux users. However, as stated in this site, it should be possible to force enable it. So far, I have:

  • Set layers.acceleration.force-enabled and layers.offmainthreadcomposition.enabled to true.
  • Set the environment variable MOZ_USE_OMTC=1

It doesn't work, and the hardware acceleration remains disabled. Is there another way to force-enable hardware acceleration (performance is horrible on my computer)? Or am I just doing it wrong?

  • 1
    There is this bug report as well: https://bugzilla.mozilla.org/show_bug.cgi?id=924403 . The silly thing I find with the 'force-enabled' option is that it seems to be the same as enabling it under Settings > Advanced > General. – Wilf Jul 04 '14 at 16:54
  • Xrender is gone on about [here](https://bbs.archlinux.org/viewtopic.php?pid=1178224) as well - note hardware acceleration does not always mean the results will be faster even though it sounds cooler. – Wilf Jul 04 '14 at 17:06
  • 1
    @Wilf Well on my Windows machines Firefox with hardware acceleration on performs much faster than with simple software rendering. The thing here is whether or not I can enable it just to try it out (and hope for better performance :D) –  Jul 04 '14 at 21:59

2 Answers2

27

I try this as a answer even if the question actually gave the answer to me. I had problems setting up the environment variable - because it actually went away as soon as i closed the console. It worked when I started Firefox on the same console I used the export command but nothing else. I tried setting it in bash and zsh. Then I found a solution and now what is described in the question works perfectly for me.

  1. Check if Hardware acceleration is actually enabled in Firefox by visiting about:support looking for "GPU Accelerated Windows 1/1 OpenGL (OMTC)" under graphics. If this shows 1/1 you can stop right here, you not need this tweak. But if it shows 0/1 you can force it on ...
  2. Open about:config in Firefox (url bar)
  3. Set layers.acceleration.force-enabled and layers.offmainthreadcomposition.enabled to true
  4. Run sudo bash -c "echo export MOZ_USE_OMTC=1 >> /etc/X11/Xsession.d/90environment" to set the enviorment variable globally for X (Is no longer needed for up to date Firefox versions)
  5. Reboot and check about:support for "GPU Accelerated Windows 1/1 ..."

enter image description here

redanimalwar
  • 1,500
  • 3
  • 19
  • 35
  • 2
    This mostly worked for me - Firefox worked faster, but there were graphic glitches and the entire system's graphics crashed upon trying 3D webgl content :(. Using fglrx drivers. Also, note you can test this by running `export MOZ_USE_OMTC=1` before running `firefox`. – Wilf Nov 28 '14 at 14:36
  • or another way to set MOZ_USE_OMTC=1 variable is to create in your home folder *.pam_environment* file which is dedicated for user environment variables and add MOZ_USE_OMTC=1 – EdiD Jan 10 '15 at 21:37
  • This works though a nicer way to enable `MOZ_USE_OMTC` on Ubuntu is to add `export MOZ_USE_OMTC=1` in your `~/.profile` file. – Sir_FZ Jul 10 '15 at 10:37
  • "nicer" is **your opinion**. `.profile` is only at a user basis. `/etc/X11/Xsession.d/90environment` is system wide. – redanimalwar Aug 06 '15 at 18:08
  • 1
    I just changed it to where the variable is set every time I start Firefox. I use a bash script that runs `env MOZ_USE_OMTC=1 firefox`. – trlkly Aug 14 '15 at 09:55
  • One drawback: if you have an old card (Quadro FX 1700/PCIe/SSE2) the effective driver version remains on 3.3.0 NVIDIA 340.93. And the effect is visible but still renderung is too slow :( – Jan Oct 23 '15 at 09:10
  • This caused extreme glitches in my case (fglrx driver), even outside of firefox window. After a while whole screen freezes. AMD users be careful. – HeyYO Mar 08 '16 at 09:21
  • I would recomend testing with @trlkly method before modifying system environment variables - also setting the variable for X may not work for new OSs using Wayland or Mir. I think according to linked bugs here: https://wiki.mozilla.org/Platform/GFX/OffMainThreadCompositing#Linux) they may enable this by default at a later date. – Wilf Mar 21 '16 at 18:20
  • 7
    @Wilf Current versions of Firefox no longer require MOZ_USE_OMTC to be set at all. Off main thread composition is turned on by default. Setting he about:config preference layers.acceleration.force-enabled to true is now sufficient. – trlkly Mar 26 '16 at 02:08
-3

Try setting gfx.font_rendering.directwrite.enabled to 'True'. Then right-click that entry, click New > Integer, type mozilla.widget.render-mode as the 'Name' and then 'OK'. Type 6 as the Value and click 'OK'.

Source

Ads20000
  • 1,953
  • 1
  • 16
  • 31