You are not logged in.

#1 2017-02-19 02:52:01

myon
Member
From: Tokyo, Japan
Registered: 2017-02-19
Posts: 4
Website

[SOLVED] Firefox fullscreen video "tearing"

Hello,

On my laptop, HTML5 videos "tear" severly when fullscreen. I wasn't sure whether this is called tearing, so I attached a test video and screenshot of it.

Test video generation script
1920x1080 fps60 test video (129K)
Firefox fullscreen screenshot (143K)

This happens only on Firefox, even with compton. Mpv and Chromium doesn't tear at all with compton. Without compton, they will tear normally (The video will be displayed split in two)

Does anyone have some experience with this kind of weird tearing?

Thanks in advance.

PC: Lenovo Thinkpad X240
GPU: Intel Integrated (Haswell)
Display server: X11, DDX: modesetting
Window manager: icewm
Using compton with no options
Xorg log

Last edited by myon (2017-02-21 09:59:40)

Offline

#2 2017-02-19 11:11:34

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,679
Website

Re: [SOLVED] Firefox fullscreen video "tearing"

myon wrote:

Using compton with no options

I find this works best with my Haswell hardware:

compton -b --backend glx --vsync opengl-mswc

YMMV smile

Last edited by Head_on_a_Stick (2017-02-19 11:12:48)

Offline

#3 2017-02-19 11:36:29

tux.lector
Member
From: Serbia
Registered: 2017-02-19
Posts: 17

Re: [SOLVED] Firefox fullscreen video "tearing"

@myuon

All of Your problems can be easily solved and are already very well covered and documented on ArchWIki.

Just read all step-by-step and install all required Intel GPU packages. mesa, libgl related, etc.

Pay attention to Note: sections.

By looking at your log file, I can see that there some font dir issues (xserver it self has solution for that, You need to create some directories by using `mkfontdir`) ...

You also need to provide support for synaptic (that covers mouse, touchpad, etc.) most probably you haven't installed that package at all.

Than, there's :

Open ACPI failed (/var/run/acpid.socket) (No such file or directory)

.. for which You can find solution -> here

etc..

There is no tear-free without additional 20-intel.conf in /ect/X11/xorg.conf.d

Something like this should do:

Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
   Option "TearFree" 	"true"
   Option "AccelMethod" "sna"
   Option "DRI" "3"
EndSection

Search for dri documentation on wiki as well.

Last edited by tux.lector (2017-02-19 11:38:43)


Did You knew that there are more airplanes in the oceans, than submarines in the sky .. ?
PHP powered applications pipe-menu for Openbox Window Manager

Offline

#4 2017-02-19 11:44:41

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,679
Website

Re: [SOLVED] Firefox fullscreen video "tearing"

tux.lector wrote:

There is no tear-free without additional 20-intel.conf in /ect/X11/xorg.conf.d

Something like this should do:

The OP is not using xf86-video-intel:

OP wrote:

DDX: modesetting

Offline

#5 2017-02-19 11:46:48

tux.lector
Member
From: Serbia
Registered: 2017-02-19
Posts: 17

Re: [SOLVED] Firefox fullscreen video "tearing"

whoops ... ! :S


Did You knew that there are more airplanes in the oceans, than submarines in the sky .. ?
PHP powered applications pipe-menu for Openbox Window Manager

Offline

#6 2017-02-19 12:35:18

myon
Member
From: Tokyo, Japan
Registered: 2017-02-19
Posts: 4
Website

Re: [SOLVED] Firefox fullscreen video "tearing"

Thank you very much, Head_on_a_Stick and tux.lector, for replying to my first post at this forum.

@Head_on_a_stick
I tried many combinations of options, and after reading your post I tried yours too, but unfortunately the tearing didn't change.

@tux.lector
I had some trouble using xf86-video-intel driver some time ago, and I uninstalled it. I tried using xf86-video-intel again, but firefox still tears. (tears normally, a bit better than on modesetting)
And thank you for pointing out errors found in Xorg.log smile I just don't look at my logs carefully...


I had this problem from long ago, and I could always just switch to chromium when watching videos, so it's not a big problem. I just wanted to know if someone on this forum had the same problem.
And unfortunately I don't know anything about internals of firefox or X11, so digging in to the source seems too difficult for me.
I guess I'll have to mark this thread as solved. Thanks anyways!

Offline

#7 2017-02-20 22:07:27

Czarnodziej
Member
From: Poland
Registered: 2017-02-20
Posts: 11
Website

Re: [SOLVED] Firefox fullscreen video "tearing"

Add

unredir-if-possible-exclude = [ "name *= 'Firefox'" ]

to compton config.

Default setting is to unredirect the screen when there’s a full-screen opaque window. So compton will basically "ignore" fullscreen video in firefox. With above config entry compton will keep working, and tearing should be gone.

https://github.com/chjj/compton/wiki/pe … erformance

Offline

#8 2017-02-21 01:23:28

tux.lector
Member
From: Serbia
Registered: 2017-02-19
Posts: 17

Re: [SOLVED] Firefox fullscreen video "tearing"

Before anything You try with compton/firefox, there is one thing I have discovered regarding firefox and fullscreen and video tearing issue.

I am using ATI HD 4650 video card that still has all the necessary power to play any video in 1080p and works well in Chrome/chromium just with proper xorg settings and required mesa/gl packages installed, where with firefox it's simply not a scenario. No matter which codec or `conf` gymnastics I try, I always get 2 frames in 3 seconds when I switch to full-screen and my PC becomes  totally unresponsive.

Before one decides to fix video tearing issues in Firefox, that one should check the following :

Type about:config, confirm "Accepting the risk" then search for layers.acceleration.force-enabled.

By defaults this option is set to false (and I have no idea why ... ) Toggle that boolean option to true, restart firefox and try fullscreen video again.

The results will make one's jaw to hit the ground in a very positive manner.

This `fix` is a must for all firefox users.

After this is done, tearing will be no more such an issue to solve.

In fact, it is solved - Archwiki.

Last edited by tux.lector (2017-02-21 01:25:01)


Did You knew that there are more airplanes in the oceans, than submarines in the sky .. ?
PHP powered applications pipe-menu for Openbox Window Manager

Offline

#9 2017-02-21 09:57:58

myon
Member
From: Tokyo, Japan
Registered: 2017-02-19
Posts: 4
Website

Re: [SOLVED] Firefox fullscreen video "tearing"

Czarnodziej wrote:

Add

unredir-if-possible-exclude = [ "name *= 'Firefox'" ]

to compton config.

I didn't realize that compton was unredirecting. I thought that compton will not unredirect windows when

--unredir-if-possible

option was not passed, but that was wrong.

tux.lector wrote:

Type about:config, confirm "Accepting the risk" then search for layers.acceleration.force-enabled.

By defaults this option is set to false (and I have no idea why ... ) Toggle that boolean option to true, restart firefox and try fullscreen video again.

Thank you for your recommendation. Enabling Firefox compositing also solved the tearing.
However, on my PC, enabling both compton (disabling unredirection) and Firefox compositing seems to make video playback stutter badly.

I guess I will use compton normally with options provided by Head_on_a_Stick (unredirecting Firefox fullscreen), and enable Firefox compositing to prevent tearing when fullscreen.

Thank you very much for all of you smile I'm happy to see Firefox finally rendering videos beautifully in 60fps without tearing.

Offline

#10 2017-02-21 12:02:42

tux.lector
Member
From: Serbia
Registered: 2017-02-19
Posts: 17

Re: [SOLVED] Firefox fullscreen video "tearing"

In my case ... I am not even using compton, but basic `xcompmgr -Cn &` in Openbox autostart file alongside with 20-radeon.conf and the ff trick above. No tearing, no glitches, nothing unwanted.

And here's my current 20-radeon.conf *(copy-pasted directly from Wiki) smile

Section "Device"
	Identifier  "Radeon"
	Driver "radeon"
	Option "AccelMethod" "glamor"
	Option "DRI" "3"
	Option "TearFree" "on"
	Option "ColorTiling" "on"
	Option "ColorTiling2D" "on"
EndSection

Last edited by tux.lector (2017-02-21 12:03:38)


Did You knew that there are more airplanes in the oceans, than submarines in the sky .. ?
PHP powered applications pipe-menu for Openbox Window Manager

Offline

#11 2017-02-21 15:59:06

Czarnodziej
Member
From: Poland
Registered: 2017-02-20
Posts: 11
Website

Re: [SOLVED] Firefox fullscreen video "tearing"

tux.lector wrote:

Type about:config, confirm "Accepting the risk" then search for layers.acceleration.force-enabled.

By defaults this option is set to false (and I have no idea why ... ) Toggle that boolean option to true, restart firefox and try fullscreen video again.

AFAIK it is enabled in nightly builds.
It is not stable yet and can cause visual glitches/crashing.

Offline

#12 2017-02-21 16:38:28

tux.lector
Member
From: Serbia
Registered: 2017-02-19
Posts: 17

Re: [SOLVED] Firefox fullscreen video "tearing"

Have you ever saw how much `stable and responsive`, any machine with ATI HD card and opensource drivers, with this option set to false, in FF/FS video mode becomes ... ?
In my case, for good amount of time already, no glitches nor crashes of any kind, only 101% improvement. Composite managers are way more prone to devastate the overall experience I would say.


Did You knew that there are more airplanes in the oceans, than submarines in the sky .. ?
PHP powered applications pipe-menu for Openbox Window Manager

Offline

#13 2019-04-09 20:06:38

LinusCDE98
Member
Registered: 2016-05-24
Posts: 5

Re: [SOLVED] Firefox fullscreen video "tearing"

tux.lector wrote:

Before anything You try with compton/firefox, there is one thing I have discovered regarding firefox and fullscreen and video tearing issue.

I am using ATI HD 4650 video card that still has all the necessary power to play any video in 1080p and works well in Chrome/chromium just with proper xorg settings and required mesa/gl packages installed, where with firefox it's simply not a scenario. No matter which codec or `conf` gymnastics I try, I always get 2 frames in 3 seconds when I switch to full-screen and my PC becomes  totally unresponsive.

Before one decides to fix video tearing issues in Firefox, that one should check the following :

Type about:config, confirm "Accepting the risk" then search for layers.acceleration.force-enabled.

By defaults this option is set to false (and I have no idea why ... ) Toggle that boolean option to true, restart firefox and try fullscreen video again.

The results will make one's jaw to hit the ground in a very positive manner.

This `fix` is a must for all firefox users.

After this is done, tearing will be no more such an issue to solve.

In fact, it is solved - Archwiki.

Two years later that still does work.
Just for anyone stumbling across this thread.
(Btw I'm using proprietary Nvidia drivers on Plasma and had no problems with other video players or chrome based browsers.)

Offline

#14 2019-04-09 20:28:57

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,410

Re: [SOLVED] Firefox fullscreen video "tearing"

This is also documented in the wiki.

Closing this old topic.

Online

Board footer

Powered by FluxBB