Why is GPU acceleration disabled in Linux Firefox?

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
User avatar
Lucap
Level 5
Level 5
Posts: 913
Joined: Tue May 24, 2016 1:40 am

Why is GPU acceleration disabled in Linux Firefox?

Post by Lucap » Thu Jul 14, 2016 3:07 am

Anyone know why GPU acceleration is disabled in Linux Firefox but not in the windows version?

I keep coming across this on other forums such as Ubuntu but there doesn't seem to be an explanation why it would be treated differently........

Hoser Rob
Level 15
Level 15
Posts: 5588
Joined: Sat Dec 15, 2012 8:57 am

Re: Why is GPU acceleration disabled in Linux Firefox?

Post by Hoser Rob » Thu Jul 14, 2016 12:16 pm

Well, it's because of the reason that's really the obvious one. Hardware acceleration in Firefox in Linux isn't reliable enough, and this affects Chrome and other browsers as well.

There's no particular one reason why it fails so much but some are: too many Linux APIs; often poor Linux driver support; poor OpenGL support.

Here's something:

https://bbs.archlinux.org/viewtopic.php ... 8#p1156328

And something else:

https://bugzilla.mozilla.org/show_bug.cgi?id=594876#c57

I don't think you're going to have an easy time finding a non technical explanation for something like this ....

User avatar
Lucap
Level 5
Level 5
Posts: 913
Joined: Tue May 24, 2016 1:40 am

Re: Why is GPU acceleration disabled in Linux Firefox?

Post by Lucap » Fri Jul 15, 2016 12:56 am

Some threads date back years so it must be badly broken if it can't be fixed in all this time.

sikejsudjek
Level 4
Level 4
Posts: 214
Joined: Thu Apr 24, 2014 1:53 pm

Re: Why is GPU acceleration disabled in Linux Firefox?

Post by sikejsudjek » Fri Jul 15, 2016 1:27 am

In chrome I normally override it in chrome://flags and set it to override software list. So far on my gpu's it works well with acceleration enabled. This really helped with netflix playback. If it doesn't work you can always set it back. Is there an equivalent with firefox ?

User avatar
Lucap
Level 5
Level 5
Posts: 913
Joined: Tue May 24, 2016 1:40 am

Re: Why is GPU acceleration disabled in Linux Firefox?

Post by Lucap » Fri Jul 15, 2016 1:35 am

sikejsudjek wrote:Is there an equivalent with firefox ?
https://wiki.archlinux.org/index.php/firefox_tweaks
Enable OpenGL Off-Main-Thread Compositing (OMTC)
Warning: If OpenGL OMTC is disabled for a specific hardware, it may be due to stability issues, high system resources consumption, driver bugs or a number of different variables. Proceed with force-enabling it at your own risk.
Note: Since Firefox version 40 basic software OMTC is enabled by default.

To check if OpenGL OMTC is enabled, go to about:support and under the "Graphics" section look for "GPU Accelerated Windows". If it reports "0/1 Basic (OMTC)" (possibly 0/2), OpenGL OMTC is disabled; if it reports "1/1 OpenGL (OMTC)" (possibly 1/2 or 2/2) it is enabled.

To enable OpenGL OMTC go to about:config and set:

layers.acceleration.force-enabled true
layers.offmainthreadcomposition.enabled true (default)
Though it says in note that it has been enabled since version 40 they keep turning it on and off again , not sure about the latest 47.01 version of firefox.

Apparently Mozilla keep enabling/disabling H264. support as well so i assume that also has ongoing issues that is hard to fix.
WebM and Youtube

If WebM MSE is enabled when Youtube is set to use the HTML5 player by default, Youtube will use VP9 video by default to save bandwidth. However, hardware acceleration is not available for VP9, if you want to use hardware acceleration with youtube video especially if you have less capable hardware consider setting media.mediasource.webm.enabled to false to make youtube stream H.264 video for which hardware acceleration is widely available.

To verify if WebM (VP9) is enabled go to youtube.com/html5. If "MSE & WebM VP9" is not supported, youtube will use H264

Ascaris
Level 2
Level 2
Posts: 57
Joined: Sun Jun 19, 2016 11:56 pm

Re: Why is GPU acceleration disabled in Linux Firefox?

Post by Ascaris » Wed Jul 20, 2016 1:48 am

Just setting those two prefs wasn't enough to get it to work for me. I also had to start Firefox with this (in a link):

env MOZ_USE_OMTC=1 firefox

There are other means of setting the enviroment variable, but this one is quick and easy.

This has been the only way to get FF to stop tearing in Linux. I tried all the usual stuff, and none of it worked permanently; this fix (along with the two prefs as listed above) did.
Main PC: Mint 18.3 Cinnamon & Windows 8.1/ Asus P8P67 Deluxe/i5-2500k @ 4.5Ghz
Laptop: Mint 19 Xfce/ Acer Swift 1 13.3"
Older laptop: Mint 19 Cinnamon & Windows 8.1/ Asus F8Sn with 8GB, SSD, GT220m GPU

User avatar
Lucap
Level 5
Level 5
Posts: 913
Joined: Tue May 24, 2016 1:40 am

Re: Why is GPU acceleration disabled in Linux Firefox?

Post by Lucap » Wed Jul 20, 2016 3:15 am

odd how it being disabled fixes problems for some but being enabled fixes for others , sounds like a right mess.

I also wonder if it is different between AMD or Nvidia cards.

Post Reply

Return to “Software & Applications”