Update for the Wayland tearing protocol
Feature summary
The Wayland tearing protocol has been wanted by many members of the Linux (gaming) community for a while now, and it just recently (3 hours ago) got merged. KWin, Gamescope, Mesa (VulkanWSI) and Xwayland have MRs in place to implement this, and it seems that now, only Xwayland and GNOME have to implement it.
Several options would ideally be available:
- Tear all the time
- Tear when an application is fullscreen
- Bit more advanced, tear when below the monitor refresh rate and display a full frame otherwise.
- Again, more advanced, use VRR when below the monitor refresh rate (!1154 (merged)) and tear when above.
You can probably figure out some more options that would be done based on these.
This logic should be based on the content-type protocol.
The main thing to worry about is enabling tearing when a game is running, if tearing is enabled. Since the protocol currently only otherwise supports game
, photo
, video
, and none types, it probably shouldn't be worried about too much. Just enable tearing when the none
or game
content types are set.
Resources:
https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/65
(individual implementations for each compositor)
https://invent.kde.org/plasma/kwin/-/merge_requests/927 https://github.com/Plagman/gamescope/pull/597
(Mesa and Xwayland)
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18268 https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/665 https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/58 https://gitlab.freedesktop.org/xorg/proto/xcbproto/-/merge_requests/38 https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19125