platforms/x11: Always set swap interval to 1
With the new compositing scheduling, we want the screen to be redrawn as close as possible to the next vblank. Furthermore, compositing is no longer driven by a timer. This change removes the NoSwapEncourage swap strategy as it doesn't make sense now, in addition to that it just does not work on Wayland.
This broke Zoom screen sharing for me. Previously I had disabled vsync because screen sharing through Zoom caused terrible screen flickering for people watching my screen. No I can't turn it off and thus I cannot use screen sharing with Zoom.
It doesn't seem like a correct way to fix the issue. But if you want to disable sync'ing to vblank, you can set an environment variable, see https://invent.kde.org/plasma/kwin/-/wikis/Environment-Variables#kwin_x11_no_sync_to_vblank
What would be the correct way to fix the issue?
I can no longer use OBS to record clips because of the tearing and in the OBS forum the recommended solution is to disable VSync.
I can also set the rendering backend to XRender on the composition settings to prevent the flickering, but it doesn't have transparency.
If you want to disable vsync, try setting the following environment variables
KWIN_X11_REFRESH_RATE=60000 KWIN_X11_NO_SYNC_TO_VBLANK=1 KWIN_X11_FORCE_SOFTWARE_VSYNC=1
However, disabling vsync to fix flickering in obs doesn't sound right. I suggest to report this issue to OBS developers.
Thanks for the quick response!
I'll report the issue with OBS developers.