← Back to context

Comment by simoncion

1 day ago

> ...or is that a class of performance we just have to sacrifice for the frame-perfect rendering of wayland?

I think I know what "frame perfect" means, and I'm pretty sure that you've been able to get that for ages on X11... at least with AMD/ATi hardware. Enable (or have your distro enable) the TearFree option, and there you go.

I read somewhere that TearFree is triple buffering, so -if true- it's my (perhaps mistaken) understanding that this adds a frame of latency.

> I read somewhere that TearFree is triple buffering, so -if true- it's my (perhaps mistaken) understanding that this adds a frame of latency.

True triple buffering doesn't add one frame of latency, but since it enforces only whole frames be sent to the display instead of tearing, it can cause partial frames of latency. (It's hard to come up with a well-defined measure of frame latency when tearing is allowed.)

But there have been many systems that abused the term "triple buffering" to refer to a three-frame queue, which always does add unnecessary latency, making it almost always the wrong choice for interactive systems.

only on the primary display. once you had more than one display there were only workarounds.

  • I don't know what "workarounds" you're talking about, or what unwanted behavior that I presume you're talking about. Would you be more specific?

    I ask because just a few minutes ago, I ran VRRTest [0] on my dual-monitor machine and saw no screen tearing on either monitor. Because VRR is disabled in multi-monitor setups, I saw juddering on both monitors when I commanded VRRTest render rates that weren't a multiple of the monitor's refresh rate, but no tearing at all.

    My setup:

    * Both monitors hooked up via DisplayPort

    * Radeon 9070 (non-XT)

    * Gentoo Linux, running almost all ~amd64 packages.

    * x11-base/xorg-server-21.1.20

    * x11-drivers/xf86-video-amdgpu-25.0.0-r1

    * x11-drivers/xf86-video-ati-22.0.0

    * sys-kernel/gentoo-sources-6.18.5

    * KDE and Plasma packages are either version 6.22.0 or 6.5.5. I CBA to get a complete list, as there are so many relevant packages.

    [0] <https://github.com/Nixola/VRRTest>

    • (I'm posting in a reply in part because the edit window is long since past.)

      Yeah. I'm actually quite interested in hearing what "workarounds" and/or misbehavior you're talking about. 'amdgpu(4)' says this about the TearFree property:

             Option "TearFree" "boolean"
                    Set the default value  of  the  per-output  ’TearFree’  property,
                    which  controls  tearing prevention using the hardware page flip‐
                    ping mechanism.  TearFree is on for any CRTC associated with  one
                    or  more  outputs with TearFree on.  Two separate scanout buffers
                    need to be allocated for each CRTC with TearFree on.  If this op‐
                    tion is set, the default value of the property is ’on’  or  ’off’
                    accordingly.   If this option isn’t set, the default value of the
                    property is auto, which means that TearFree  is  on  for  rotated
                    outputs,  outputs  with  RandR  transforms applied, for RandR 1.4
                    secondary outputs, and if ’VariableRefresh’ is enabled, otherwise
                    it’s off.
                    

      The explicit mention that the "auto" enables TearFree only for secondary outputs and rotated and/or transformed outputs if 'VariableRefresh' is disabled seems to directly contradict what I think you're saying. And if "auto" enables TearFree on secondary displays, my recommendation of "on" certainly also does. But, yeah. I await clarification.