How to Fix OBS Studio Black Screen under Wayland and PipeWire
When running OBS Studio on modern Linux distributions powered by Wayland display servers (such as GNOME, KDE Plasma, Hyprland, or Sway), users frequently encounter a black screen when adding a "Screen Capture" or "Window Capture" source. Unlike legacy X11, Wayland security policies prevent applications from directly reading raw framebuffer memory, relying instead on PipeWire media streams routed through XDG Desktop Portal.
Quick Diagnostics
xdg-desktop-portal service or desktop-specific portal backend is missing or crashedobs-xdg-portal plugin or OBS is being forced to run under Xwayland/X11 compatibility modepipewire and wireplumber user services without rebooting the systemStep-by-Step Solution
-
1
Step 1: Install XDG Desktop Portal and Desktop Backends
For OBS to request screen captures from Wayland, both the core portal daemon and your specific desktop compositor backend must be present:
BASH# On Arch Linux / Manjaro / CachyOS sudo pacman -S xdg-desktop-portal pipewire wireplumber # Install your specific desktop environment backend: # For GNOME: sudo pacman -S xdg-desktop-portal-gnome # For KDE Plasma: sudo pacman -S xdg-desktop-portal-kde # For Hyprland / Sway / wlroots: sudo pacman -S xdg-desktop-portal-hyprland # or xdg-desktop-portal-wlr # On Ubuntu / Debian / Pop!_OS sudo apt install xdg-desktop-portal pipewire xdg-desktop-portal-gnome -
2
Step 2: Restart Portal and PipeWire User Services
If portals were recently installed or experienced a daemon socket disconnect, restart the corresponding
systemduser units:BASH# Restart the PipeWire audio/video daemon and WirePlumber session manager systemctl --user restart pipewire wireplumber # Reset the XDG Desktop Portal daemon systemctl --user stop xdg-desktop-portal systemctl --user start xdg-desktop-portal -
3
Step 3: Enforce Native Wayland Execution in OBS Studio
Launching OBS Studio with environment variables forcing X11 fallback (
QT_QPA_PLATFORM=xcb) will break PipeWire portal integration. Pass the Wayland platform flag explicitly:BASH# Launch OBS using native Wayland Qt platform plugin QT_QPA_PLATFORM=wayland obs # For Flatpak installations of OBS Studio, grant wayland socket access: flatpak override --user --socket=wayland com.obsproject.StudioInside OBS Studio, remove legacy "Screen Capture (XSHM)" or "Window Capture (Xcomposite)" sources, then add a new Screen Capture (PipeWire) source. The system will prompt a native portal dialog asking you to select the screen or window to stream.
Prevention Advice
Recommended security practices:
- Avoid Forcing Xwayland on OBS: Run OBS with native Wayland/Qt6 flags to prevent frame pacing issues, stuttering, and duplicate cursor artifacts.
- Configure Portal Configuration Files: On wlroots compositors (Sway/Hyprland), define explicit portal handlers in
~/.config/xdg-desktop-portal/portals.confto prevent backend collisions between GNOME and wlroots portals. - Keep Flatpak Permissions Updated: If running OBS via Flatpak, keep runtime dependencies up to date with
flatpak updateto ensure portal DBus interface compatibility.