为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

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

  • 3 个回答
  • 1 人有此问题
  • 1 次查看
  • 最后回复者为 BedHedd

more options

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

所有回复 (3)

more options

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.

more options

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?

more options

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.


```