Don't want to see articles from a certain category? When logged in, go to your User Settings and adjust your feed in the Content Preferences section where you can block tags!
We do often include affiliate links to earn us some pennies. See more here.

One of the issues cropping up in the migration from Xorg to Wayland is the desire to capture part or all of your screen for recording and/or streaming to others - in many cases, applications designed for Xorg simply capture a black screen, with few workarounds.

However, for games and applications that can run with the Vulkan API, there's a new plugin from David Rosca (nowrep) for OBS Studio called obs-vkcapture (OBS Plugin Forum | GitHub) that aims to work around the issue and get your gameplay ingested directly, bypassing the built-in Xorg 'Window Capture'.

Bonus - it should even work under Xorg, provided you have a new build of OBS with EGL support and pass it the environment variable:OBS_USE_EGL=1

Similarly, you'll need to run your game (or other Vulkan application), one at a time (e.g. in your Steam launch options), with:OBS_VKCAPTURE=1

Now, this is a very new development (nowrep's initial commits here are barely 4 days old as of writing), but in my initial testing last night, I managed to play a 4 hour session of 7 Days to Die (using the experimental Vulkan backend), while streaming and recording it just fine.  That said, I did compile and install it by hand myself, on a git master build of OBS, and it is of course still under active development, so the usual caveat holds here: Your Mileage May Vary.

Still, they're looking at potentially adding OpenGL support in the future, so this is definitely one to watch.

Article taken from GamingOnLinux.com.
25 Likes
About the author -
author picture
I'm a multi-platform gamer who's tinkered with Linux and FreeBSD for over 20 years, excited about the recent uptake of native (or nearly-native) gaming on open platforms, and what that means for the future of gaming and the democratization of technology as a whole.
See more from me
The comments on this article are closed.
13 comments
Page: «2/2
  Go to:

Xpander Mar 26, 2021
Quoting: BrisseCool! Ultimately we need PipeWire-support though. Personally I have always been able to capture xwayland surfaces but for some reason the frame-rate in the captured footage is terrible. When I switch to GNOME on x.org I can capture smooth 60fps footage.

Whats wrong with pipewire? you mean direct support? Cause it work fine for me with pipewire atm. If i want to capture specific game audio only i will use qjackctl and connect the needed inputs/outputs with OBS.
Shmerl Mar 26, 2021
Quoting: KithopSo I think that's why EGL comes into play, here.

I don't think Wayland is tied to EGL? Wayland is a protocol, it's not really tied to a specific implementation. It can work with WSI.

QuoteThe Vulkan WSI (Window System Interface) is a set of API calls serve a similar purpose as EGL does for OpenGL ES or GLX for OpenGL. Vulkan WSI includes support for Wayland from day one: VK_USE_PLATFORM_WAYLAND_KHR. Vulkan clients can run on unmodified Wayland servers, including Weston, GENIVI LayerManager, Mutter / GNOME Shell, Enlightenment, and more. The WSI allows applications to discover the different GPUs on the system, and display the results of GPU rendering to a window system.

https://en.wikipedia.org/wiki/Wayland_(display_server_protocol)

So that's why I was asking why they are using EGL instead of let's say WSI.


Last edited by Shmerl on 26 March 2021 at 6:25 pm UTC
Kithop Mar 26, 2021
Quoting: Shmerl
Quoting: KithopSo I think that's why EGL comes into play, here.

I don't think Wayland is tied to EGL? Wayland is a protocol, it's not really tied to a specific implementation. It can work with WSI.

QuoteThe Vulkan WSI (Window System Interface) is a set of API calls serve a similar purpose as EGL does for OpenGL ES or GLX for OpenGL. Vulkan WSI includes support for Wayland from day one: VK_USE_PLATFORM_WAYLAND_KHR. Vulkan clients can run on unmodified Wayland servers, including Weston, GENIVI LayerManager, Mutter / GNOME Shell, Enlightenment, and more. The WSI allows applications to discover the different GPUs on the system, and display the results of GPU rendering to a window system.

https://en.wikipedia.org/wiki/Wayland_(display_server_protocol)

So that's why I was asking why they are using EGL instead of let's say WSI.

I'm not a developer, so I can't say I've looked at it in any sort of depth, but my hunch is that Vulkan + WSI would be used in e.g. a game wanting to draw its Vulkan backend to Wayland, without using XWayland as a path (i.e. a Vulkan + Wayland native game), while EGL is being used for 'normal day-to-day applications', i.e. OBS, to render *its* window and preview to Wayland.

I'm guessing that OBS could totally be written to support WSI, but that means having OBS itself use Vulkan to render its UI directly, and I have a feeling it's abstracting that out through Qt for the most part, so this is a function of 'OBS supports EGL output but not necessarily Vulkan (yet)', separate from whether the game you're *inputting* is on Vulkan or not. But again, just a semi-educated guess here.
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.
Buy Games
Buy games with our affiliate / partner links: