From ArchWiki
Revision as of 17:50, 10 May 2017 by Aufkrawall (talk | contribs) (→‎Avoid screen tearing: discussion about tearing workarounds)
Jump to navigation Jump to search

Avoid screen tearing

Some advice to fight tearing likely turns out bad for most users:

  • ForceFullCompositionPipeline introduces additional input latency and will cause new issues with certain applications.
  • Setting triple buffering in the xorg.conf doesn't "enable" triple buffering, but also forces it for every application, even if it wants just double buffering (breaks Vsync of Firefox OpenGL).
  • Setting triple buffering (no matter if in xorg.conf or KDE Plasma config) introduces stuttering in even most lightweight games such as Counter-Strike 1.6.

-> the only method that doesn't come with nasty side effects seems to be the environment variable export __GL_YIELD="USLEEP" on KDE Plasma. I have benchmarked several games on a GTX 1070 and there was no real performance impact by it. It wouldn't really matter anyway since compositing should be turned off for gaming (it is turned off by most games automatically). Since it can be set up in a config file of Plasma, I think we should just link to this:

Aufkrawall (talk) 20:59, 8 May 2017 (UTC)

I'm not sure if it should be removed entirely, but it definitely demands some investigation. I see a lot of stuff on the web about ForceCompositionPipeline (no "Full") fixing tearing issues, with no mention of forcing triple buffering. There seem to be a lot of anecdotes from people saying it helps. So the effects may be specific to different setups.
Silverhammermba (talk) 15:02, 10 May 2017 (UTC)
ForceCompositionPipeline definitely fixes the tearing for good, but probably many users simply don't notice the drawbacks it brings. For example the increased latency even affects the mouse cursor and stuttering issues may only occur occasionally or briefly. If I'm not mistaken, X also doesn't run with vsync by definition and the vsync should be done by the compositor. This works ootb with Gnome Mutter, but on Nvidia only with bad performance (and from my experience, not any of the tweaks help against that).
Good for testing is the website vsynctester. As soon as I set up triple buffering for either the driver, KWin or both, I'm not able anymore to get clean vsync in Firefox with OpenGL rendering, there is occasional stutter. There is no stutter with either no compositor and rely solely on Firefox own OGL vsync, or set up KWin compositing with export __GL_YIELD="USLEEP" on top of it to have a smooth result and window compositing at the same time.
I've tested this with a GTX 1070 and different drivers in detail, but a GTX 780 Ti didn't seem to behave differently.
Aufkrawall (talk) 17:50, 10 May 2017 (UTC)