Why OBS Screen Recording Fails on Ubuntu Desktop
If OBS Studio is showing a black screen, failing to capture your display, or crashing when you try to start recording on Ubuntu Desktop, the root cause is almost always the switch from X11 to Wayland. Ubuntu 22.04 and later versions use Wayland as the default display server, and the old X11-based screen capture methods that OBS relied on no longer work on Wayland without additional configuration.
This guide covers every working fix for 2026 — from the fast PipeWire portal setup to fallback X11 options and GNOME's built-in recording alternative — so you can start capturing your screen regardless of your setup.
Understanding the Problem: Wayland vs X11 Screen Capture
On X11, any application could read screen pixels directly. Wayland is more secure and blocks this — applications must request screen access through the XDG Desktop Portal, which uses PipeWire to share the display safely. If OBS is missing PipeWire support or the portal isn't installed, you'll get a black capture window or an error saying "Failed to open VLC input."
The fix is installing the right PipeWire components and selecting the correct capture source in OBS.
Fix 1: Install PipeWire and XDG Desktop Portal (The Core Fix)
This is the primary fix for OBS black screen on Wayland Ubuntu. Run these commands in Terminal:
sudo apt update
sudo apt install pipewire wireplumber xdg-desktop-portal xdg-desktop-portal-gnome
After installation, reboot your system:
sudo reboot
Once rebooted, open OBS Studio. When you add a new source, select Screen Capture (PipeWire) instead of "Screen Capture (XSHM)" — the XSHM source is X11 only and will show a black screen on Wayland.
Fix 2: Add a Screen Capture Source Using PipeWire in OBS
Even with PipeWire installed, you need to select the right source type in OBS:
- Open OBS Studio.
- In the Sources panel, click the + button.
- Select Screen Capture (PipeWire). If you only see "Screen Capture (XSHM)", PipeWire support isn't active yet — complete Fix 1 first.
- A portal dialog will appear asking for screen share permission. Select your monitor and click Share.
- Click OK in OBS — your screen should now appear in the preview.
Fix 3: Install OBS PipeWire Plugin Manually (if Screen Capture (PipeWire) is Missing)
On some Ubuntu versions, the PipeWire capture plugin isn't bundled with the default OBS package. Install it directly:
sudo apt install obs-pipewire-audio-capture
Or if you installed OBS via Flatpak (common for Ubuntu 24.04 users):
flatpak install flathub com.obsproject.Studio
The Flatpak version of OBS has PipeWire support built in and is the most reliable option on modern Ubuntu. After installing, restart OBS and look for the Screen Capture (PipeWire) source.
Fix 4: Fall Back to X11 Mode (Quick Workaround)
If you need to record right now without configuring PipeWire, you can switch Ubuntu back to X11 for your session at login:
- Log out of your Ubuntu session.
- On the login screen, click your username but do NOT enter your password yet.
- Click the gear icon in the bottom-right corner.
- Select Ubuntu on Xorg.
- Log in normally — you'll now be on X11.
In OBS on X11, Screen Capture (XSHM) will work correctly. Note: This is a per-session workaround. Wayland will be selected again on your next login unless you change the default.
Fix 5: Check OBS Studio Version and Update It
OBS versions before 28.0 have limited PipeWire support. Ubuntu's default repositories sometimes ship older OBS versions. Install the latest via the official PPA:
sudo add-apt-repository ppa:obsproject/obs-studio
sudo apt update
sudo apt install obs-studio
OBS 30.x (current in 2026) has full PipeWire support and handles Wayland screen capture without additional plugins on Ubuntu 22.04+.
Fix 6: Fix OBS Audio Not Recording on Ubuntu
If OBS captures the screen but not audio, PipeWire audio routing may be missing:
sudo apt install pipewire-pulse
Then restart PipeWire:
systemctl --user restart pipewire pipewire-pulse
In OBS, add an Audio Input Capture or Audio Output Capture source and select your audio device from the PipeWire device list.
Alternative: Use GNOME's Built-In Screen Recorder
For simple recordings without OBS, GNOME 45+ (included in Ubuntu 23.10 and later) has a built-in screen recorder:
- Press Ctrl + Alt + Shift + R to start recording. A red dot appears in the top-right of the top bar.
- Press the same shortcut again to stop. The recording saves to your Videos folder as a
.webmfile.
If the shortcut doesn't work, install the GStreamer PipeWire plugin:
sudo apt install gstreamer1.0-pipewire
Then log out and back in, and try the shortcut again.
Still Can't Record Your Screen on Ubuntu?
If OBS still shows a black screen or crashes after all these steps, the issue may be with your GPU driver (especially with NVIDIA cards on Wayland), a conflicting portal backend, or a custom Ubuntu spin with different desktop components. Debugging PipeWire permission chains can get complex quickly. CloudHouse Technologies' pay-per-ticket remote support can connect to your Ubuntu system, identify the exact component blocking screen capture, and configure it correctly — with no subscription required.
Frequently Asked Questions
Why does OBS show a black screen on Ubuntu 22.04 or later?
Ubuntu 22.04+ defaults to Wayland, which blocks the X11 screen capture method OBS historically used. You need PipeWire and XDG Desktop Portal installed, and you must select "Screen Capture (PipeWire)" as your source type instead of XSHM. Run: sudo apt install pipewire xdg-desktop-portal xdg-desktop-portal-gnome and reboot.
How do I know if I'm running Wayland or X11 on Ubuntu?
Open a Terminal and run: echo $XDG_SESSION_TYPE. If it prints "wayland," you're on Wayland. If it prints "x11," you're on X11 and the XSHM screen capture source in OBS should work normally.
Does OBS work better on X11 or Wayland for Ubuntu recording?
Both work well when properly configured. Wayland with PipeWire is more secure and is the correct modern setup. X11 mode is simpler to configure but is gradually being phased out. For new setups in 2026, configure PipeWire and use Screen Capture (PipeWire) in OBS.
Can I use OBS Flatpak for screen recording on Ubuntu Wayland?
Yes — the OBS Flatpak from Flathub has PipeWire support built in and is often the easiest installation path on Ubuntu 22.04+. Install with: flatpak install flathub com.obsproject.Studio. It will automatically use the PipeWire portal for screen capture.
Why is there no audio in my OBS recording on Ubuntu?
Audio capture on Ubuntu Wayland requires PipeWire audio backend. Install pipewire-pulse and restart the PipeWire service. Then in OBS, add an Audio Output Capture source and select your PipeWire audio device.
