Created attachment 172691 [details] Recording of me triggering the bug SUMMARY foot (https://codeberg.org/dnkl/foot) exhibits strange rendering issues that can't be reproduced with other Wayland compositors. STEPS TO REPRODUCE 1. Install and open foot. 2. Run some commands that produce enough output to start scrolling. 3. Quickly scroll around a bit (see attached video). OBSERVED RESULT Certain lines are drawn multiple times, without a clear pattern. EXPECTED RESULT The terminal contents render as expected. SOFTWARE/OS VERSIONS Operating System: Gentoo Linux 2.15 KDE Plasma Version: 6.1.4 KDE Frameworks Version: 6.5.0 Qt Version: 6.7.2 Kernel Version: 6.6.41-gentoo-dist (64-bit) ADDITIONAL INFORMATION I've initially filed a bug about this to foot directly: https://codeberg.org/dnkl/foot/issues/1715, but we've reached the conclusion that it's unlikely to be a bug in foot itself.
> warn: render.c:2694: compositor is not releasing buffers immediately; expect lower rendering performance It's true that kwin may require double buffering sometimes. We have had a couple of clients in the past that handled it incorrectly: they just repainted what changed in the current frame instead of ensuring that the _whole_ buffer contains valid data. You would normally observe it by the app contents flipping back and forth between old and new contents. For the debugging purposes, I made kwin dump every shared memory client buffer to see what foot submits. From what I see is that some text can be missing in two consecutive frames, i.e. frame N ``` ❯ mkfs.ext2 test.img mke2fs 1.47.1 (20-May-2024) test.img contains created on Wed Sep 18 14:19:46 2024 Proceed anyway? (y,N) ^C⏎ ~ ❯ mkfs.ext2 test.img mke2fs 1.47.1 (20-May-2024) test.img contains created on Wed Sep 18 14:19:46 2024 Proceed anyway? (y,N) ``` frame N + 1 ``` ❯ mkfs.ext2 test.img mke2fs 1.47.1 (20-May-2024) test.img contains a ext2 file system created on Wed Sep 18 14:19:46 2024 Proceed anyway? (y,N) ^C⏎ ~ ❯ mkfs.ext2 test.img mke2fs 1.47.1 (20-May-2024) test.img contains a ext2 file system created on Wed Sep 18 14:19:46 2024 Proceed anyway? (y,N) ``` However, every shared memory client buffer is expected to have a complete frame. It points to foot committing shared memory client buffers with partial frame contents, which is a protocol violation.