Support us on Patreon to keep GamingOnLinux alive. This ensures all of our main content remains free for everyone. Just good, fresh content! Alternatively, you can donate through PayPal. You can also buy games using our partner links for GOG and Humble Store.
We do often include affiliate links to earn us some pennies. See more here.

Wayland gets DRM lease protocol support to help VR on Linux

By - | Views: 15,203

Another tick in the box for Wayland to eventually properly replace X11 for all workloads, as the work on DRM lease protocol support aimed at VR has been merged in.

From the merge request that was open for a few months here's how they explain it:

DRM leasing is a feature which allows the DRM master to "lease" a subset of its DRM resources to another DRM master via drmModeCreateLease, which returns a file descriptor for the new DRM master. We use this protocol to negotiate the terms of the lease and transfer this file descriptor to clients.

In less DRM-specific terms: this protocol allows Wayland compositors to give over their GPU resources (like displays) to a Wayland client to exclusively control.

The primary use-case for this is Virtual Reality headsets, which via the non-desktop DRM property are generally not used as desktop displays by Wayland compositors, and for latency reasons (among others) are most useful to games et al if they have direct control over the DRM resources associated with it. Basically, these are peripherals which are of no use to the compositor and may be of use to a client, but since they are tied up in DRM we need to use DRM leasing to get them into client's hands.

This work has been ongoing for years overall, with the needed Vulkan extension only landing back in June this year with the Vulkan 1.2.182 spec update.

For this to actually be properly usable though it needs wider testing, and it also needs support to be merged into the various Wayland compositors. Currently it's in staging, to eventually make it into a stable update of the Wayland protocols. So we're still a little while away before it's going to be fully supported across all the various distributions. Good news though, since Wayland is gradually becoming the default and having good VR support is needed.

Article taken from GamingOnLinux.com.
16 Likes
About the author -
author picture
I am the owner of GamingOnLinux. After discovering Linux back in the days of Mandrake in 2003, I constantly came back to check on the progress of Linux until Ubuntu appeared on the scene and it helped me to really love it. You can reach me easily by emailing GamingOnLinux directly. Find me on Mastodon.
See more from me
The comments on this article are closed.
4 comments

bubexel Aug 9, 2021
nice news!
jens Aug 9, 2021
  • Supporter
Does SteamVR needs to support this explicitly as well or is it enough for VR on Wayland once compositors (Gnome Mutter etc) have implemented this?
haagch Aug 9, 2021
Currently SteamVR has no explicit wayland support, it only works through xwayland.

Direct mode with xwayland is part of this current effort and people have been successful in using SteamVR with direct mode with xwayland. Not sure what exactly is needed for it to work but I believe it's the wayland protocol support, the protocol implementation in the wayland compositors and an implementation in xwayland.
jens Aug 10, 2021
  • Supporter
Quoting: haagchCurrently SteamVR has no explicit wayland support, it only works through xwayland.

Direct mode with xwayland is part of this current effort and people have been successful in using SteamVR with direct mode with xwayland. Not sure what exactly is needed for it to work but I believe it's the wayland protocol support, the protocol implementation in the wayland compositors and an implementation in xwayland.

Thanks a lot for your insights. Cool to read that the missing bits and pieces are likely in the open source area.
While you're here, please consider supporting GamingOnLinux on:

Reward Tiers: Patreon. Plain Donations: PayPal.

This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
The comments on this article are closed.