Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Html5 videoplayback is choppy on Fedora Linux when using Folding on GPU

  • 3 பதிலளிப்புகள்
  • 1 இந்த பிரச்சனை உள்ளது
  • 1 view
  • Last reply by BedHedd

When I am running folding at home on my desktop in fedora linux, html5 video playback is very choppy when played locally and when streamed.

If I play the same video in vlc or google chrome while folding on my gpu, I do not have choppy playback.

When I disable GPU folding, video playback is smooth.

Disabling hardware acceleration and webgl did not solve the problem. I don't understand what's causing the issue. If video playback does not use hardware acceleration (GPU), it should be smooth, but this doesn't occur.

I think it might be a issue with how firefox handles html5 video playback since I don't have the same issues in vlc or google chrome.

Thing's I have tried, but have resulted in smooth video playback

  1. uninstalling firefox, deleting my mozilla directory
  2. updating firefox
  3. reinstalling firefox
  4. updating fedora linux
  5. updating nvidia proprietary graphics drivers
  6. playing a video with all plugins disabled
When I am running folding at home on my desktop in fedora linux, html5 video playback is very choppy when played locally and when streamed. If I play the same video in vlc or google chrome while folding on my gpu, I do not have choppy playback. When I disable GPU folding, video playback is smooth. Disabling hardware acceleration and webgl did not solve the problem. I don't understand what's causing the issue. If video playback does not use hardware acceleration (GPU), it should be smooth, but this doesn't occur. I think it might be a issue with how firefox handles html5 video playback since I don't have the same issues in vlc or google chrome. Thing's I have tried, but have resulted in smooth video playback # uninstalling firefox, deleting my mozilla directory # updating firefox # reinstalling firefox # updating fedora linux # updating nvidia proprietary graphics drivers # playing a video with all plugins disabled

All Replies (3)

Hello,

You may have seen a post or received a notification regarding support for Firefox or Thunderbird with a link to another site or a phone number being posted. This is a scam and is not a method to receive support from Mozilla. Mozilla does not have telephone or email support. Please do not click on the link and do not interact by calling any phone numbers or email addresses listed. I apologize for any inconvenience caused. You are currently posting on the official Mozilla website and will receive assistance here.

oh ok, I didn't get a post or notification with a link/phone number. I came here from the help and support pages linked below. https://support.mozilla.org/en-US/

Is there anything else I can list that would help diagnose this issue?

After doing some research I seemed to solve the issue.

I accidentally had `webgl.disabled` set to true in `about:config`

following these instructions from a r/linux firefox suggestion seems to have solved the issue

https://old.reddit.com/r/linux/comments/39q6xt/some_useful_firefox_tips_to_fix_choppy_scrolling/

```

Off Main Thread Compositing (OMTC)

The main goal is to improve responsiveness. this architecture has the following advantages over our on-the-main-thread approach:

   Reduce main thread contention
   Asynchronous scrolling
   Preventing tearing
   Asynchronous video
   Asynchronous CSS animation

This feature is shipped on all platforms except Linux. Read more about it on Mozilla's Wiki and BenWa's blog.


On my system Firefox crashes on start if OMTC enabled, but it's not hard to try.


Before any steps, let’s check if GPU acceleration is already on.

   Open about:support in Firefox.
   Navigate to Graphics section.
   Check the GPU Accelerated Windows field.

If it’s 1/1 or 1/2 or 2/2 or whatever, anyway, the first number must be greater than 0, then Firefox is already hardware accelerated. And you don’t need to take following procedures to force-enable it. Otherwise, let’s do a few modifications.


   Open about:config in Firefox.
   Set webgl.force-enabled to true. This will force-enable WebGL for us.
   Set layers.acceleration.force-enabled to true. This will force-enable Layers Acceleration.
   Set layers.offmainthreadcomposition.enabled to true. This will enable Off Main Thread Composition (OMTC), which should contributes to a faster and smoother composition.

If you want to enable more testing OMTC features, you could set layers.offmainthreadcomposition.async-animations to true as well. Other properties such as layers.async-video.enabled should already be true by default now. Therefore, you don’t need to mess with other values.


Also don't forget to turn on "Use hardware acceleration when available" on Advanced > General tab in about:preferences.


Another trivial yet important step is to set an environment variable. Before we set it for entire system, let’s check if Firefox can behave well with force-enabled GPU acceleration.

   Close all firefox processes.
   Run export MOZ_USE_OMTC=1 && firefox in terminal.

Now go to about:support to check if GPU acceleration is turned on. And test if Firefox still function well without glitches. The GPU Accelerated Windows field should show something like "1/1 OpenGL (OMTC)".


If you’re satisfied with the result, let’s set this environment variable globally. Instruction for Fedora. On other distribution may be different.


Create a new file /etc/X11/xinit/xinitrc.d/90-x11-common.sh (you need root privilege) and fill in this file with following lines.

  1. !/bin/sh
  2. force GPU acceleration for firefox

export MOZ_USE_OMTC=1

Now reboot your system, run Firefox as usual.


```