Present is a way to get new window content from a pixmap to the screen in a VBLANK-synchronized way. In other words, it can make xfwm4 tear-free. There's a couple talks on it: http://www.youtube.com/watch?v=nr02o8yvcr4 Zero-Copy Compositing — Research to Reality [linux.conf.au 2014] http://www.x.org/videos/XDC2013/keith_packard_dri3.avi As well as a couple articles/posts: http://lwn.net/Articles/569701/ https://www.mail-archive.com/xorg-devel@lists.x.org/msg39495.html The protocols are documented at: http://cgit.freedesktop.org/xorg/proto/dri3proto/tree/dri3proto.txt http://cgit.freedesktop.org/xorg/proto/presentproto/tree/presentproto.txt Finally, there's some example code out there: http://cgit.freedesktop.org/~ajax/xcm/ git://keithp.com/git/metacity.git
Way ahead of you. https://github.com/ali1234/xfwm4/tree/present This is based on Keith Packard's metacity patches (linked in previous comment.) Since metacity and Xfwm both use a compositor derived from XCompMgr, porting it over was trivial. It might be out of date now though, since I did it 7 months ago!
So the one thing I can't do with this is test if it actually solves tearing. If your X server supports Present but your DDX does not support DRI3 (eg because you use Nvidia) then Present works exactly like XRender, i.e. it tears.
Looks like nouveau has DRI3 and initial Present support starting with 1.0.11. http://cgit.freedesktop.org/nouveau/xf86-video-nouveau/commit/?id=3cd4c8494c296c7583dfa7f0823a272c9e932e03
Since implementing this may cost money to buy hardware to test with, I've added a bounty on this bug: https://www.bountysource.com/issues/6655651-add-support-for-dri3-present
https://bugzilla.xfce.org/show_bug.cgi?id=11642 seems to be fixed in this issue. One little problem - you have to reactivate compositor after suspend, login and VT switching
This is not necessarily incompatible with the implementation of bug 11642 so Present is still interesting for what we want - Keith's patches for metacity are of particular interest.
For those who use NVidia there is a solution, that fixes tearing in any compositor: Generate /etc/X11/xorg.conf via sudo nvidia-xconfig Write to /etc/X11/xorg.conf Section "Device" Identifier "Device0" Driver "nvidia" Option "Metamodes" "HDMI-0: 1920x1080 { ForceCompositionPipeline = On }" VendorName "NVIDIA Corporation" EndSection HDMI-0: 1920x1080 is for my configuration. If you configuration differs - edit this line https://devtalk.nvidia.com/default/topic/823711/linux/tearing-add-frame-buffer-please/?offset=7#4503217 I'm sure AMD has something similar. Try Option "TrippleBuffer" "True" too.
Experimental support for Present using double buffering has been added to git master. Please note is seems some driver may claim Present support but don't actually wait for VSync, in which case tearing remains...
I think Olivier can grab Bounty from boutysource https://www.bountysource.com/issues/6655651-add-support-for-dri3-present/developers
*** Bug 14169 has been marked as a duplicate of this bug. ***