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.
-
Author Developer
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.
-
Author Developer
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.
-
I agree with Vlad that env variables are not a solution. I run into the issue that Spectacle will show screenshots from 2 to 4 hours prior but not what was currently expected. If I disable the compositor it works fine but breaks quite a few other things. I put in the env variables to disable vsync and I've had no issues. Is there a better solution?
-
yes, i also think an option should still be readily available in the dropdown menu.
im on x11 with nvidia-proprietary drivers and 2 screens, im using https://wiki.archlinux.org/title/NVIDIA/Troubleshooting#Multi-monitor to completely eliminate screen-tearing without outside vsync, but having both ForceCompositionPipeline=On and kwin vsync makes certain games have extremely bizzare FPS and lag issues, disabling kwin's vsync with the environment variables eliminates that.
it should at least continue to be an option for x11
-
I agree that the option to keep vsync off on X11 should be kept. I don't have any application specific issues but I greatly prefer screen tearing over the experience of having the desktop drop frames constantly which makes mouse movement, animations and programs feel clunky and unresponsive.
-
This is a definite downgrade. The dropdown menu being readily available was good, and the KWin "Suspend Compositing" shortcut was even faster, now none of them work.