The Intel driver updates broke TearFree option at some point, here is a workaround

Arto Pekkanen isoa at kapsi.fi
Tue Apr 25 12:46:46 UTC 2017


Oh yeah I forgot to mention that you also need to start compton with:
compton -b

Add the above command to your .xinitrc

On 25.4.2017 15:26, Arto Pekkanen wrote:
> So, I updated base system and ports weekly, and at some point I found
> out that while playing videos full screen, the video would jump back to
> some previously played frame every now and then.
> 
> My X.org was configured as such:
> 
> Section "Device"
>     Driver "intel"
>     Option "AccelMethod" "SNA"
>     Option "TearFree" "True"
> EndSection
> 
> The above configuration previously yield a tear-free VSynced video
> output with all applications (including video playback via VAAPI). But
> this broke, and video playback started flickering with some video player
> applications, namely mpv.
> 
> After mucking around I realized that the TearFree option is NOT even
> listed in the current intel man page! You can see it for yourself, no
> TearFree option there. I dug around in Google, and it seem the option
> has been deprecated for quite some time. The reasoning for this
> deprecation mostly seems to be that it should be up to the application
> to use VSync, either via OpenGL extensions (which there are at least 3)
> or by using the DRI specific device IOCTLs.
> 
> Unfortunately, mpv and many other video players do not VSync. They just
> ... don't. Probably the developers decided that it was up to graphics
> drivers and/or X.org.
> 
> Yet again, drivers devs think one thing, app devs think other. And thing
> break horribly for the end user. My brilliant and simple solution has
> been deemed obsolete yet again by the Linux graphics driver developers.
> I was not pleased.
> 
> Then I decided to fix the problem with a standard method used in most
> Linuxen: run a compositor, and let compositor do VSync for you.
> 
> Thus, I reconfigured file /usr/local/etc/X11/xorg.conf.d/10-intel.conf
> 
> Section "Device"
>     Driver "intel"
>     Option "AccelMethod" "SNA"
> EndSection
> 
> Use SNA, no TearFree. The default in FreeBSD is UXA, and we don't want
> that, SNA works better for IGPUs in Sandy Bridge and newer.
> 
> Then as root:
> pkg install compton
> 
> Then I created configuration for Compton, file ~/.compton.conf
> backend = "glx";
> paint-on-overlay = true;
> glx-swap-method = 1;
> glx-no-stencil = true;
> sw-opti = true;
> vsync = "opengl-mswc";
> shadow = false;
> fading = false;
> unredir-if-possible = true;
> 
> Then I just restarted X (pkill xorg)
> 
> After this the Compton compositor will buffer every frame from every
> application and sync them on vertical blank. Basically the same as
> TearFree, but CPU usage is a bit higher.
> 

-- 
Arto Pekkanen

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-x11/attachments/20170425/7562bf4d/attachment.sig>


More information about the freebsd-x11 mailing list