Bug 5715 - screen tearing on X11
Summary: screen tearing on X11
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: VNC (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: LowPrio
Assignee: Pierre Ossman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-17 08:15 CET by Pierre Ossman
Modified: 2023-06-07 14:46 CEST (History)
2 users (show)

See Also:
Acceptance Criteria:


Attachments

Description Pierre Ossman cendio 2015-11-17 08:15:01 CET
The rendering on X11 is unfortunately not synchronised with vblank/vsync. This can easily give a big horizontal tear when you have large continuous updates (e.g. video). It is also much worse with bug 5618 and a slow machine. At that point you'll get lots and lots of tears as the X server is still working on the previous XShmPutImage(), but we've already started updating the shared memory.

Unfortunately this is a fundamental problem in X11. Switching to OpenGL is the only way to get any kind of proper support for vsync. There might be things we can do to mitigate the problem until then though. Things to try are XSync(), Xdbe, and putting the data in a pixmap first and then doing XCopyArea().
Comment 1 Smokingwheels 2016-03-21 04:03:52 CET
I have had 2 servers running and found Ubuntu 14.04 is worse than Debian 8 using low end hardware playing videos.
Comment 2 Pierre Ossman cendio 2016-03-21 09:12:13 CET
Bug 5618 did add some synchronisation for XShmPutImage() which got rid of a lot of tearing, so the problem is a lot smaller now than what's in the description. Might be good enough until everyone has switched over to Wayland.
Comment 3 Pierre Ossman cendio 2023-06-07 14:46:47 CEST
There is also now the "Present" extension, which is explicitly designed to handle this use case. It simply schedules a pixmap drawing operation, so it's fairly simple in nature.

Note You need to log in before you can comment on or make changes to this bug.