Tearing/VSync in xfwm4-compositor due to XRender

Da Fox da.fox.mail at gmail.com
Wed Sep 28 10:43:23 CEST 2011


Dear All,

I am sending this email to the xfce4-dev mailing-list by request on
IRC, on the suggestion that the mailing-list is better suited to the
discussion at hand.

The following is an (edited) version of a discussion I had on the
#xfce(-dev) IRC channel(s).



Recently I was having a discussion with the kind people in #intel-gfx
on the topic of V-Sync, video-tearing and related issues. This started
out because lately there have been are some issues with the
Intel-driver on the SandyBridge architecture which causes
video-tearing (unrelated to Xfce). These issues are now nearly
resolved, and we managed to obtain tear-free video using MPlayer's
OpenGL output driver(s). However this only works so long as I don't
enable compositing in Xfce's 'Window Manager Tweaks'. There are
numerous bugs on the subject, including one on which I've commented
already last year (see https://bugzilla.xfce.org/show_bug.cgi?id=6371
). As far as I can understand from the discussion on both those
bug-reports and with the Intel-driver developers, the point of view
for the Xfce developers is that this is a problem with the
XRender-extension which apparently does not implement V-Sync. After a
lengthy discussion the issue more or less came down to the fact that
the Intel/xorg developers never implemented V-Sync in XRender because
nobody asked, and from the bug-reports I gather that the
Xfce-developers were/are waiting for someone to add proper V-Sync
support to XRender. So basically both sides are waiting on each-other,
oblivious that the other-side was waiting for them to make the first
move, with the users stuck in the middle.

However (very) recently one the Intel-developers has started some work
on supporting V-Sync with XRender, but it was suggested that it would
be best if the Xfce-developers were to contact the X.org/Intel-driver
developers to coordinate and discuss exactly what is required. Please
note that all compositing window managers that uses XRender are
affected by this issue, so this would improve not only Xfce, but other
XRender-based window-managers like XCompMgr and Metacity, or KWin in
XRender mode, too. One objection stated in #xfce was that
V-Sync-support for Xfwm4 was not "on the roadmap to 4.10 and xfce
doesn't have so much devs". However I believe that if you can
coordinate with the X.org/Intel-driver developers the actual changes
required to Xfwm4 would be very small. I don't quite know what the
exact changes would entail, but the Intel-driver developer kindly told
me that it entails "add[ing] a VSync property to a Picture", which
sounds to me as-if the changes to xfwm4 could be as simple as adding
an 'enable-vsync-flag' to the final blitting of the image (but please
keep in mind that really I am more of a user than a developer).

Therefore my request to you (the Xfce-developers) is as follows:
please take a moment to contact the X.org-developers (either by email,
or in #xorg-dev, or however you usually get in touch) to work out a
specification for XRender V-Sync, so that soon everybody we can enjoy
tear-free compositing. :)



I hope you take a moment to read through all that, and consider
working together with the X.org/Intel-driver developers on making a
V-Synced XRender a reality. I (and surely many with me) would greatly
appreciate it!
I do understand that there are some more issues here, such as for
example what happens with the other drivers besides Intel (Radeon,
Nouveau, fglrx, and nividia-blob) and Window Managers. My personal
hope is that once this works for the Intel+Xfce combo, extending
support to the other drivers and Window Managers becomes
straight-forward. On the other-hand perhaps it would be good to get
other people involved from the start. I don't know, but it is
something worth considering.

Finally I would like to thank you for taking the time to consider all
this, for making Xfce what it is and for all the great work you do.

Best regards,
  Da Fox


More information about the Xfce4-dev mailing list