Home | News | Download | Packages | Forum | Wiki | Github

Why don't Chromium & Firefox have any screen tearing?


(diego) #1

I enabled tearfree on the x config for the video driver. And I don’t have any screen tearing playing videos in SMPlayer (mpv backend).

However, I have 4 browsers running on Void glibc 64bit: Firefox, Chromium, Google-Chrome (manual install), Opera.
Firefox and Chromium don’t tear playing mp4/html5 video and Netflix.com. Google-Chrome and Opera do tear, whether or not I use a compositor.

I was curious as to what the browsers (Chromium, Firefox in void packages) are doing to avoid tearing compared to the ones that do. Is it an optimization during compilation? Or are they using different libraries and packages compare to Opera & Google Chrome?


#2

See the templates:

Chromium, Firefox or Firefox-ESR are compiled from source.

Opera and Google-chrome are pre-compiled binaries extracted from .deb packages.


(diego) #3

Thanks @cr6, but I already looked at the templates.

I was just curious about the compilation process that prevented the tearing. I’m guessing it has to do with one of these host dependencies:

  libXcomposite-devel
  libXdamage-devel

The others are:

 nss-devel libjpeg-turbo-devel gtk+-devel icu-devel pixman-devel
 libevent-devel libnotify-devel libvpx-devel libXrender-devel
 hunspell-devel libXcomposite-devel libSM-devel libXt-devel libXdamage-devel
 libpng-devel gtk+-devel gtk+3-devel nss-devel pciutils-devel
 libXi-devel libgcrypt-devel   elfutils-devel
 libXcomposite-devel  libXrandr-devel mit-krb5-devel
 libXScrnSaver-devel  snappy-devel
 libxml2-devel libxslt-devel  nss-devel libexif-devel
 libXcursor-devel libflac-devel speex-devel libmtp-devel libwebp-devel
 libjpeg-turbo-devel libevent-devel json-c-devel harfbuzz-devel
 minizip-devel jsoncpp-devel zlib-devel libcap-devel libXdamage-devel

(diego) #4

Based on: https://stackoverflow.com/questions/40472961/webgl-unavailable-gpu-process-unable-to-boot

Note: The following is considered experimental. So I have no idea on the consequences of browser stability/security of enabling the following features/“fixes”.

In Google-Chrome, go to: chrome://gpu. In section “Graphics Feature Status”, most of the options should start with: Software only.....

Open a new tab and go to chrome://flags. Under Experiements, the first option should be Override software rendering list.. Click Enable. Relaunch Google Chrome.

Check chrome://gpu. There should be more features that say Hardware accelerated. This should eliminate tearing on html5 and Netflix.

For Opera: do the same because Opera is based on Chromium. Open tab: chrome://flags or opera://flags (either one). In search box on top: type override. The top result should be Override software rendering list. Click Enable. Relaunch Opera. The tearing should be gone.

(To watch Netflix on Opera: install a user-agent switch and make sure the agent string is for an up-to-date browser, or else it won’t work. This one works: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36)


#5

:clapper: And what video driver / version are you using ?


(diego) #6

xf86-video-ati-7.9.0_2
AMD/ATI RV730 PRO [Radeon HD 4650]


#7

I have heard some complaints about “Vsync”, can you see this option in your Radeon driver configuration?
I have also heard some complaints about the compositor program your are using (or not) with your window manager, for example compton


#8

I have screen tearing in xbps chromium, at least on text/script pages. Not sure if videos cause some change in tearing, but it is noticeable when smooth scrolling. Using modesetting intel driver.

EDIT: on closer inspection, this doesn’t seem to happen in fullscreen. So maybe there’s a strange interaction with X11 or even dwm.