How to Enable Wayland Screen Sharing in OBS Studio
Sharing your screen in OBS Studio on a Linux desktop running Wayland can sometimes result in a blank or black screen due to Wayland’s strict security model. This guide provides a straightforward, step-by-step walkthrough on how to enable Wayland screen sharing for OBS Studio using PipeWire and XDG Desktop Portals, ensuring seamless video capture on modern Linux distributions like Ubuntu, Fedora, and Arch Linux.
Step 1: Install PipeWire and XDG Desktop Portal
Wayland does not allow applications to directly read screen contents. Instead, it relies on PipeWire and the XDG Desktop Portal to securely share your desktop or individual windows.
You must install the portal backend appropriate for your specific desktop environment. Open your terminal and run the command matching your distribution and desktop:
Ubuntu / Debian (GNOME):
sudo apt update sudo apt install pipewire xdg-desktop-portal xdg-desktop-portal-gnomeFedora (GNOME):
sudo dnf install pipewire xdg-desktop-portal xdg-desktop-portal-gnomeArch Linux (GNOME):
sudo pacman -S pipewire xdg-desktop-portal xdg-desktop-portal-gnomeKDE Plasma (All Distributions): Replace
xdg-desktop-portal-gnomewithxdg-desktop-portal-kdein the commands above.
After installing these packages, restart your computer to ensure the background services launch correctly.
Step 2: Use the Flatpak Version of OBS Studio (Recommended)
The Flatpak version of OBS Studio is sandboxed and comes pre-configured with the necessary permissions to communicate with PipeWire and Wayland portals out of the box.
Install Flatpak on your system if it is not already installed.
Install OBS Studio from Flathub by running the following command:
flatpak install flathub com.obsproject.Studio
If you prefer using your distribution’s native package manager (like
apt, dnf, or pacman), ensure your
installed version of OBS Studio is version 27.0 or newer, as this is the
minimum version required for native Wayland support.
Step 3: Add the PipeWire Screen Capture Source
Once the prerequisites are installed and your system has been restarted, you can set up screen capture inside the application:
- Launch OBS Studio.
- Go to the Sources dock at the bottom of the window.
- Click the + (Add) button.
- Select Screen Capture (PipeWire) from the dropdown menu.
- Give the source a name and click OK.
- A system-level pop-up dialog will appear asking for permission to share your screen. Select the monitor or window you want to capture, then click Share or Allow.
Your Wayland desktop will now be visible and ready for recording or streaming in OBS Studio.