OBS Studio Window Capture Black Screen (wayland/pipewire)

A common problem it seems. You can see the system info at the beginning of the included OBS log file. My capture card works fine and displays a preview correctly, but a pipewire window or screen capture just shows a black screen. It seems that xdg-desktop-portal is installed, along with the gtk and gnome backends. It looks like pipewire creates the stream without error and then pauses it for some reason also with no error. I may be overlooking some obvious thing, so any suggestions would be appreciated.I’m not very smart sometimes :smiley:

19:44:47.348: Platform: Wayland
19:44:47.348: CPU Name: 12th Gen Intel(R) Core™ i5-12400F
19:44:47.348: CPU Speed: 2212.848MHz
19:44:47.349: Physical Cores: 6, Logical Cores: 12
19:44:47.349: Physical Memory: 15858MB Total, 4065MB Free
19:44:47.349: Kernel Version: Linux 6.1.1-1-MANJARO
19:44:47.349: Distribution: “Manjaro Linux” Unknown
19:44:47.349: Session Type: wayland
19:44:47.354: Qt Version: 6.4.1 (runtime), 6.4.1 (compiled)
19:44:47.354: Portable mode: false
19:44:47.378: OBS 28.1.2-2 (linux)
19:44:47.378: ---------------------------------
19:44:47.379: ---------------------------------
19:44:47.379: audio settings reset:
19:44:47.379: samples per sec: 48000
19:44:47.379: speakers: 2
19:44:47.379: max buffering: 960 milliseconds
19:44:47.379: buffering type: dynamically increasing
19:44:47.379: ---------------------------------
19:44:47.379: Initializing OpenGL…
19:44:47.379: Using EGL/Wayland
19:44:47.402: Initialized EGL 1.5
19:44:47.414: Loading up OpenGL on adapter Intel Mesa Intel(R) Arc™ A750 Graphics (DG2)
19:44:47.414: OpenGL loaded successfully, version 4.6 (Core Profile) Mesa 22.3.1, shading language 4.60
19:44:47.434: ---------------------------------
19:44:47.434: video settings reset:
19:44:47.434: base resolution: 1920x1080
19:44:47.434: output resolution: 1280x720
19:44:47.434: downscale filter: Bicubic
19:44:47.434: fps: 30/1
19:44:47.434: format: NV12
19:44:47.434: YUV mode: Rec. 709/Partial
19:44:47.434: NV12 texture support not available
19:44:47.434: P010 texture support not available
19:44:47.436: Audio monitoring device:
19:44:47.436: name: Default
19:44:47.436: id: default
19:44:47.436: ---------------------------------
19:44:47.440: Failed to load ‘en-US’ text for module: ‘decklink-captions.so’
19:44:47.444: Failed to load ‘en-US’ text for module: ‘decklink-output-ui.so’
19:44:47.447: A DeckLink iterator could not be created. The DeckLink drivers may not be installed
19:44:47.447: Failed to initialize module ‘decklink.so’
19:44:47.516: [pipewire] Available captures:
19:44:47.516: [pipewire] - Desktop capture
19:44:47.516: [pipewire] - Window capture
19:44:47.525: v4l2loopback not installed, virtual camera disabled
19:44:47.534: FFMPEG VAAPI supported
19:44:47.564: ---------------------------------
19:44:47.564: Loaded Modules:
19:44:47.564: text-freetype2.so
19:44:47.564: rtmp-services.so
19:44:47.564: obs-x264.so
19:44:47.564: obs-vst.so
19:44:47.564: obs-transitions.so
19:44:47.564: obs-outputs.so
19:44:47.564: obs-libfdk.so
19:44:47.564: obs-filters.so
19:44:47.564: obs-ffmpeg.so
19:44:47.564: linux-v4l2.so
19:44:47.564: linux-pulseaudio.so
19:44:47.564: linux-pipewire.so
19:44:47.564: linux-jack.so
19:44:47.564: linux-capture.so
19:44:47.564: linux-alsa.so
19:44:47.564: image-source.so
19:44:47.564: frontend-tools.so
19:44:47.564: decklink-output-ui.so
19:44:47.564: decklink-captions.so
19:44:47.564: ---------------------------------
19:44:47.564: ==== Startup complete ===============================================
19:44:47.571: All scene data cleared
19:44:47.571: ------------------------------------------------
19:44:47.573: pulse-input: Server name: ‘pulseaudio 16.1’
19:44:47.573: pulse-input: Audio format: s16le, 48000 Hz, 2 channels
19:44:47.573: pulse-input: Started recording from ‘alsa_output.pci-0000_00_1f.3.analog-stereo.monitor’
19:44:47.574: pulse-am: Prevented feedback-loop in ‘alsa_output.pci-0000_00_1f.3.analog-stereo.monitor’
19:44:47.574: pulse-input: Server name: ‘pulseaudio 16.1’
19:44:47.574: pulse-input: Audio format: s16le, 48000 Hz, 2 channels
19:44:47.574: pulse-input: Started recording from ‘alsa_input.usb-eEver_Live_Streaming_USB_Device_20000130041415-02.analog-stereo’
19:44:47.575: pulse-am: Server name: ‘pulseaudio 16.1’
19:44:47.575: pulse-am: Audio format: s16le, 48000 Hz, 2 channels
19:44:47.575: pulse-am: Started Monitoring in ‘alsa_output.pci-0000_00_1f.3.analog-stereo.monitor’
19:44:47.575: v4l2-input: Start capture from /dev/video0
19:44:47.576: v4l2-input: Input: 0
19:44:48.126: adding 42 milliseconds of audio buffering, total audio buffering is now 42 milliseconds (source: Flint Audio In)
19:44:48.126:
19:44:49.305: v4l2-input: Resolution: 1920x1080
19:44:49.305: v4l2-input: Pixelformat: YUYV
19:44:49.305: v4l2-input: Linesize: 3840 Bytes
19:44:49.305: v4l2-input: Framerate: 60.00 fps
19:44:49.311: v4l2-input: /dev/video0: select timeout set to 83333 (5x frame periods)
19:44:49.312: Switched to scene ‘Steam Journey’
19:44:49.312: ------------------------------------------------
19:44:49.312: Loaded scenes:
19:44:49.312: - scene ‘Console Games’:
19:44:49.312: - source: ‘Flint 4KP’ (v4l2_input)
19:44:49.312: - source: ‘Flint Audio In’ (pulse_input_capture)
19:44:49.312: - monitoring: monitor and output
19:44:49.312: - scene ‘Steam Journey’:
19:44:49.312: - source: ‘Desktop Audio’ (pulse_output_capture)
19:44:49.312: - monitoring: monitor and output
19:44:49.312: ------------------------------------------------
19:45:27.766: PipeWire initialized
19:45:27.771: User added source ‘Window Capture (PipeWire)’ (pipewire-window-capture-source) to scene ‘Steam Journey’
19:45:27.997: [pipewire] Failed to create session, denied or cancelled by user
19:45:43.375: PipeWire initialized
19:45:43.383: [pipewire] Screencast session created
19:45:43.388: [pipewire] Asking for window
19:46:03.605: [pipewire] window selected, setting up screencast
19:46:03.610: [pipewire] Server version: 0.3.63
19:46:03.611: [pipewire] Library version: 0.3.63
19:46:03.611: [pipewire] Header version: 0.3.61
19:46:03.611: [pipewire] Created stream 0x563397c49d10
19:46:03.611: [pipewire] Stream 0x563397c49d10 state: “connecting” (error: none)
19:46:03.611: [pipewire] Playing stream 0x563397c49d10
19:46:03.611: [pipewire] Stream 0x563397c49d10 state: “paused” (error: none)

Just a side note: When I installed OBS from the "Add/Remove Software"application, it would not start. There was a working icon for a few seconds then nothing. I found out that the qt6-wayland package was not installed and apparently OBS needed it to run. After that it started OK. Something to check if you have the same issue with new OBS install.

Fixed! - It seems the pipewire-media-session.service is not installed by default, and needed when an application needs to share a window or screen. The screencast gets stuck in a paused state without this session manager or possibly wireplumber as an alternative. Installed the service, started it, and OBS is happy now. Hope this helps someone someday.