Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Black screen when screen sharing in OBS studio #132

Open
zeionara opened this issue Nov 20, 2023 · 15 comments
Open

Black screen when screen sharing in OBS studio #132

zeionara opened this issue Nov 20, 2023 · 15 comments

Comments

@zeionara
Copy link

zeionara commented Nov 20, 2023

Hey, I am trying to set up Hyprland to work with OBS Studio through pipewire to cast screen, but unfortunately it doesn't work. I am not an expert in pipewire, but my guess is that it somehow can't create a session. I use Gentoo Linux. Here is the xdgh version I use:

xdg-desktop-portal-hyprland-1.2.2

Pipewire and wireplumber versions:

pipewire
Compiled with libpipewire 0.3.80
Linked with libpipewire 0.3.80
wireplumber
Compiled with libwireplumber 0.4.14
Linked with libwireplumber 0.4.14

Here is the head of OBS log when I run it on Hyprland:

debug: Found portal inhibitor
debug: Attempted path: share/obs/obs-studio/locale/en-US.ini
debug: Attempted path: /usr/share/obs/obs-studio/locale/en-US.ini
debug: Attempted path: share/obs/obs-studio/locale.ini
debug: Attempted path: /usr/share/obs/obs-studio/locale.ini
debug: Attempted path: share/obs/obs-studio/themes/Yami.qss
debug: Attempted path: /usr/share/obs/obs-studio/themes/Yami.qss
info: Command Line Arguments: --verbose
info: Platform: Wayland
info: CPU Name: AMD A8-6410 APU with AMD Radeon R5 Graphics
info: CPU Speed: 2322.750MHz
info: Physical Cores: 4, Logical Cores: 4
info: Physical Memory: 14948MB Total, 11296MB Free
info: Kernel Version: Linux 6.1.57-gentoo-x86_64
info: Distribution: Gentoo "2.14"
info: Desktop Environment: Hyprland (Hyprland)
info: Session Type: wayland
info: Qt Version: 5.15.11 (runtime), 5.15.11 (compiled)
info: Portable mode: false
debug: Attempted path: share/obs/obs-studio/themes/Dark/no_sources.svg
debug: Attempted path: /usr/share/obs/obs-studio/themes/Dark/no_sources.svg
info: OBS 29.1.3 (linux)
info: ---------------------------------
info: ---------------------------------
info: audio settings reset:
	samples per sec: 48000
	speakers:        2
	max buffering:   960 milliseconds
	buffering type:  dynamically increasing
info: ---------------------------------
info: Initializing OpenGL...
info: Using EGL/Wayland
info: Initialized EGL 1.5
debug: Supported EGL Extensions: EGL_ANDROID_blob_cache EGL_EXT_buffer_age EGL_EXT_create_context_robustness EGL_EXT_image_dma_buf_import EGL_EXT_image_dma_buf_import_modifiers EGL_EXT_present_opaque EGL_EXT_swap_buffers_with_damage EGL_KHR_cl_event2 EGL_KHR_config_attribs EGL_KHR_context_flush_control EGL_KHR_create_context EGL_KHR_create_context_no_error EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses EGL_KHR_gl_colorspace EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_image_base EGL_KHR_no_config_context EGL_KHR_reusable_sync EGL_KHR_surfaceless_context EGL_KHR_swap_buffers_with_damage EGL_EXT_pixel_format_float EGL_KHR_wait_sync EGL_MESA_configless_context EGL_MESA_drm_image EGL_MESA_image_dma_buf_export EGL_MESA_query_driver EGL_WL_bind_wayland_display EGL_WL_create_wayland_buffer_from_image 
info: Loading up OpenGL on adapter AMD KABINI (, LLVM 16.0.6, DRM 2.50, 6.1.57-gentoo-x86_64)
info: OpenGL loaded successfully, version 4.5 (Core Profile) Mesa 23.1.8, shading language 4.50
info: ---------------------------------
info: video settings reset:
	base resolution:   1366x768
	output resolution: 1364x768
	downscale filter:  Bicubic
	fps:               60/1
	format:            NV12
	YUV mode:          Rec. 709/Partial
info: NV12 texture support not available
info: P010 texture support not available
info: Audio monitoring device:
	name: Default
	id: default
info: ---------------------------------
debug: ---------------------------------
debug: Loading module: frontend-tools.so
debug: ---------------------------------
debug: Loading module: image-source.so
debug: ---------------------------------
debug: Loading module: linux-alsa.so
debug: ---------------------------------
debug: Loading module: linux-capture.so
debug: ---------------------------------
debug: Loading module: linux-pipewire.so
info: [pipewire] Available captures:
info: [pipewire]     - Desktop capture
info: [pipewire]     - Window capture
debug: ---------------------------------
debug: Loading module: linux-pulseaudio.so
debug: ---------------------------------
debug: Loading module: linux-v4l2.so
warning: v4l2loopback not installed, virtual camera disabled
debug: ---------------------------------
debug: Loading module: obs-ffmpeg.so
info: FFmpeg VAAPI H264 encoding not supported
info: FFmpeg VAAPI HEVC encoding not supported
debug: ---------------------------------
debug: Loading module: obs-filters.so
debug: ---------------------------------
debug: Loading module: obs-outputs.so
debug: ---------------------------------
debug: Loading module: obs-transitions.so
debug: ---------------------------------
debug: Loading module: obs-vst.so
debug: ---------------------------------
debug: Loading module: obs-x264.so
debug: ---------------------------------
debug: Loading module: rtmp-services.so
debug: ---------------------------------
debug: Loading module: text-freetype2.so
debug: ---------------------------------
debug: Loading module: vlc-video.so
info: [vlc-video]: VLC 3.0.18 Vetinari found, VLC video source enabled
info: ---------------------------------
info:   Loaded Modules:
info:     vlc-video.so
info:     text-freetype2.so
info:     rtmp-services.so
info:     obs-x264.so
info:     obs-vst.so
info:     obs-transitions.so
info:     obs-outputs.so
info:     obs-filters.so
info:     obs-ffmpeg.so
info:     linux-v4l2.so
info:     linux-pulseaudio.so
info:     linux-pipewire.so
info:     linux-capture.so
info:     linux-alsa.so
info:     image-source.so
info:     frontend-tools.so
info: ---------------------------------
info: ==== Startup complete ===============================================
debug: service 'default_service' (rtmp_common) created
debug: encoder 'simple_video_stream' (obs_x264) created
debug: Fallback encoder bitrates:
	 64 kbit/s:
	 96 kbit/s:
	128 kbit/s:
	160 kbit/s:
	192 kbit/s:
	224 kbit/s:
	256 kbit/s:
	288 kbit/s:
	320 kbit/s:
	352 kbit/s:
	384 kbit/s:
	416 kbit/s:
	448 kbit/s:
	480 kbit/s:
	512 kbit/s:
	544 kbit/s:
	576 kbit/s:
	608 kbit/s:
	640 kbit/s:
	672 kbit/s:
	704 kbit/s:
	736 kbit/s:
	768 kbit/s:
	800 kbit/s:
	832 kbit/s:
	864 kbit/s:
	896 kbit/s:
	928 kbit/s:
	960 kbit/s:
	992 kbit/s:
	1024 kbit/s:
debug: FFmpeg PCM (16-bit) (ffmpeg_pcm_s16le) encoder bitrates:
	 64 kbit/s
	 96 kbit/s
	128 kbit/s
	160 kbit/s
	192 kbit/s
	224 kbit/s
	256 kbit/s
	288 kbit/s
	320 kbit/s
	352 kbit/s
	384 kbit/s
	416 kbit/s
	448 kbit/s
	480 kbit/s
	512 kbit/s
	544 kbit/s
	576 kbit/s
	608 kbit/s
	640 kbit/s
	672 kbit/s
	704 kbit/s
	736 kbit/s
	768 kbit/s
	800 kbit/s
	832 kbit/s
	864 kbit/s
	896 kbit/s
	928 kbit/s
	960 kbit/s
	992 kbit/s
	1024 kbit/s
debug: FFmpeg PCM (24-bit) (ffmpeg_pcm_s24le) encoder bitrates:
	 64 kbit/s
	 96 kbit/s
	128 kbit/s
	160 kbit/s
	192 kbit/s
	224 kbit/s
	256 kbit/s
	288 kbit/s
	320 kbit/s
	352 kbit/s
	384 kbit/s
	416 kbit/s
	448 kbit/s
	480 kbit/s
	512 kbit/s
	544 kbit/s
	576 kbit/s
	608 kbit/s
	640 kbit/s
	672 kbit/s
	704 kbit/s
	736 kbit/s
	768 kbit/s
	800 kbit/s
	832 kbit/s
	864 kbit/s
	896 kbit/s
	928 kbit/s
	960 kbit/s
	992 kbit/s
	1024 kbit/s
debug: FFmpeg PCM (32-bit float) (ffmpeg_pcm_f32le) encoder bitrates:
	 64 kbit/s
	 96 kbit/s
	128 kbit/s
	160 kbit/s
	192 kbit/s
	224 kbit/s
	256 kbit/s
	288 kbit/s
	320 kbit/s
	352 kbit/s
	384 kbit/s
	416 kbit/s
	448 kbit/s
	480 kbit/s
	512 kbit/s
	544 kbit/s
	576 kbit/s
	608 kbit/s
	640 kbit/s
	672 kbit/s
	704 kbit/s
	736 kbit/s
	768 kbit/s
	800 kbit/s
	832 kbit/s
	864 kbit/s
	896 kbit/s
	928 kbit/s
	960 kbit/s
	992 kbit/s
	1024 kbit/s
debug: FFmpeg ALAC (24-bit) (ffmpeg_alac) encoder bitrates:
	 64 kbit/s
	 96 kbit/s
	128 kbit/s
	160 kbit/s
	192 kbit/s
	224 kbit/s
	256 kbit/s
	288 kbit/s
	320 kbit/s
	352 kbit/s
	384 kbit/s
	416 kbit/s
	448 kbit/s
	480 kbit/s
	512 kbit/s
	544 kbit/s
	576 kbit/s
	608 kbit/s
	640 kbit/s
	672 kbit/s
	704 kbit/s
	736 kbit/s
	768 kbit/s
	800 kbit/s
	832 kbit/s
	864 kbit/s
	896 kbit/s
	928 kbit/s
	960 kbit/s
	992 kbit/s
	1024 kbit/s
debug: FFmpeg FLAC (16-bit) (ffmpeg_flac) encoder bitrates:
	 64 kbit/s
	 96 kbit/s
	128 kbit/s
	160 kbit/s
	192 kbit/s
	224 kbit/s
	256 kbit/s
	288 kbit/s
	320 kbit/s
	352 kbit/s
	384 kbit/s
	416 kbit/s
	448 kbit/s
	480 kbit/s
	512 kbit/s
	544 kbit/s
	576 kbit/s
	608 kbit/s
	640 kbit/s
	672 kbit/s
	704 kbit/s
	736 kbit/s
	768 kbit/s
	800 kbit/s
	832 kbit/s
	864 kbit/s
	896 kbit/s
	928 kbit/s
	960 kbit/s
	992 kbit/s
	1024 kbit/s
debug: AAC simple encoder bitrate mapping:
	 64 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	 96 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	128 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	160 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	192 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	224 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	256 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	288 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	320 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	352 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	384 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	416 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	448 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	480 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	512 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	544 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	576 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	608 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	640 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	672 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	704 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	736 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	768 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	800 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	832 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	864 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	896 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	928 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	960 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	992 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	1024 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
debug: encoder 'simple_aac' (ffmpeg_aac) created
debug: encoder 'simple_archive_audio' (ffmpeg_aac) created
debug: output 'simple_file_output' (ffmpeg_muxer) created
info: All scene data cleared
info: ------------------------------------------------
debug: private source 'Cut' (cut_transition) created
debug: private source 'Fade' (fade_transition) created
info: pulse-input: Server name: 'pulseaudio 16.1'
debug: pulse-input: Default output device: 'alsa_output.pci-0000_00_14.2.analog-stereo.monitor'
info: pulse-input: Audio format: s16le, 44100 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_output.pci-0000_00_14.2.analog-stereo.monitor' (default)
debug: source 'Desktop Audio' (pulse_output_capture) created
info: [Loaded global audio device]: 'Desktop Audio'
info: pulse-input: Server name: 'pulseaudio 16.1'
debug: pulse-input: Default input device: 'alsa_input.pci-0000_00_14.2.analog-stereo'
info: pulse-input: Audio format: s16le, 44100 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_input.pci-0000_00_14.2.analog-stereo' (default)
debug: source 'Mic/Aux' (pulse_input_capture) created
info: [Loaded global audio device]: 'Mic/Aux'
debug: source 'Scene' (scene) created
info: PipeWire initialized
debug: source 'Screen Capture (PipeWire)' (pipewire-desktop-capture-source) created
info: Switched to scene 'Scene'
info: ------------------------------------------------
info: Loaded scenes:
info: - scene 'Scene':
info:     - source: 'Screen Capture (PipeWire)' (pipewire-desktop-capture-source)
info: ------------------------------------------------
info: [pipewire] Screencast session created
debug: Attempted path: share/obs/obs-studio/images/overflow.png
debug: Attempted path: /usr/share/obs/obs-studio/images/overflow.png
debug: [pipewire] Response to select source received
info: [pipewire] Asking for desktop
info: [pipewire] desktop selected, setting up screencast
info: [pipewire] Server version: 0.3.80
info: [pipewire] Library version: 0.3.80
info: [pipewire] Header version: 0.3.80
debug: [pipewire] registered event 0x557225cc1b70
info: [pipewire] Created stream 0x557225cc1c30
info: [pipewire] Stream 0x557225cc1c30 state: "connecting" (error: none)
info: [pipewire] Playing stream 0x557225cc1c30
info: [pipewire] Stream 0x557225cc1c30 state: "paused" (error: none)
info: [pipewire] Negotiated format:
info: [pipewire]     Format: 8 (Spa:Enum:VideoFormat:BGRx)
info: [pipewire]     Modifier: 0x0
info: [pipewire]     Size: 1366x768
info: [pipewire]     Framerate: 0/1

Then the last 5 lines are printed again and again ad infinitum, and screen is black on the scene. Here is the output of wpctl status:

PipeWire 'pipewire-0' [0.3.80, cait@gen2, cookie:2212463480]
 └─ Clients:
        32. WirePlumber [export]                [0.3.80, cait@gen2, pid:2023]
        33. WirePlumber                         [0.3.80, cait@gen2, pid:2023]
        36. xdg-desktop-portal-hyprland         [0.3.80, cait@gen2, pid:2181]
        37. xdg-desktop-portal                  [0.3.80, cait@gen2, pid:2193]
        41. wpctl                               [0.3.80, cait@gen2, pid:5050]

Audio
 ├─ Devices:
 │
 ├─ Sinks:
 │
 ├─ Sink endpoints:
 │
 ├─ Sources:
 │
 ├─ Source endpoints:
 │
 └─ Streams:

Video
 ├─ Devices:
 │
 ├─ Sinks:
 │
 ├─ Sink endpoints:
 │
 ├─ Sources:
 │  *   28. xdg-desktop-portal-hyprland
 │      39. xdg-desktop-portal-hyprland
 │
 ├─ Source endpoints:
 │
 └─ Streams:

Settings
 └─ Default Configured Node Names:

Here is the head of OBS log when running it on gnome (when using gnome the screen recording works perfectly):

debug: Found portal inhibitor
debug: Attempted path: share/obs/obs-studio/locale/en-US.ini
debug: Attempted path: /usr/share/obs/obs-studio/locale/en-US.ini
debug: Attempted path: share/obs/obs-studio/locale.ini
debug: Attempted path: /usr/share/obs/obs-studio/locale.ini
debug: Attempted path: share/obs/obs-studio/themes/Yami.qss
debug: Attempted path: /usr/share/obs/obs-studio/themes/Yami.qss
info: Command Line Arguments: --verbose
info: Platform: Wayland
info: CPU Name: AMD A8-6410 APU with AMD Radeon R5 Graphics
info: CPU Speed: 2395.569MHz
info: Physical Cores: 4, Logical Cores: 4
info: Physical Memory: 14948MB Total, 10945MB Free
info: Kernel Version: Linux 6.1.57-gentoo-x86_64
info: Distribution: Gentoo "2.14"
info: Desktop Environment: GNOME (gnome)
info: Session Type: wayland
info: Qt Version: 5.15.11 (runtime), 5.15.11 (compiled)
info: Portable mode: false
debug: Attempted path: share/obs/obs-studio/themes/Dark/no_sources.svg
debug: Attempted path: /usr/share/obs/obs-studio/themes/Dark/no_sources.svg
info: OBS 29.1.3 (linux)
info: ---------------------------------
info: ---------------------------------
info: audio settings reset:
	samples per sec: 48000
	speakers:        2
	max buffering:   960 milliseconds
	buffering type:  dynamically increasing
info: ---------------------------------
info: Initializing OpenGL...
info: Using EGL/Wayland
info: Initialized EGL 1.5
debug: Supported EGL Extensions: EGL_ANDROID_blob_cache EGL_EXT_buffer_age EGL_EXT_create_context_robustness EGL_EXT_image_dma_buf_import EGL_EXT_image_dma_buf_import_modifiers EGL_EXT_present_opaque EGL_EXT_swap_buffers_with_damage EGL_KHR_cl_event2 EGL_KHR_config_attribs EGL_KHR_context_flush_control EGL_KHR_create_context EGL_KHR_create_context_no_error EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses EGL_KHR_gl_colorspace EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_image_base EGL_KHR_no_config_context EGL_KHR_reusable_sync EGL_KHR_surfaceless_context EGL_KHR_swap_buffers_with_damage EGL_EXT_pixel_format_float EGL_KHR_wait_sync EGL_MESA_configless_context EGL_MESA_drm_image EGL_MESA_image_dma_buf_export EGL_MESA_query_driver EGL_WL_bind_wayland_display EGL_WL_create_wayland_buffer_from_image 
info: Loading up OpenGL on adapter AMD KABINI (, LLVM 16.0.6, DRM 2.50, 6.1.57-gentoo-x86_64)
info: OpenGL loaded successfully, version 4.5 (Core Profile) Mesa 23.1.8, shading language 4.50
info: ---------------------------------
info: video settings reset:
	base resolution:   1366x768
	output resolution: 1364x768
	downscale filter:  Bicubic
	fps:               60/1
	format:            NV12
	YUV mode:          Rec. 709/Partial
info: NV12 texture support not available
info: P010 texture support not available
info: Audio monitoring device:
	name: Default
	id: default
info: ---------------------------------
debug: ---------------------------------
debug: Loading module: frontend-tools.so
debug: ---------------------------------
debug: Loading module: image-source.so
debug: ---------------------------------
debug: Loading module: linux-alsa.so
debug: ---------------------------------
debug: Loading module: linux-capture.so
debug: ---------------------------------
debug: Loading module: linux-pipewire.so
info: [pipewire] Available captures:
info: [pipewire]     - Desktop capture
info: [pipewire]     - Window capture
debug: ---------------------------------
debug: Loading module: linux-pulseaudio.so
debug: ---------------------------------
debug: Loading module: linux-v4l2.so
warning: v4l2loopback not installed, virtual camera disabled
debug: ---------------------------------
debug: Loading module: obs-ffmpeg.so
info: FFmpeg VAAPI H264 encoding not supported
info: FFmpeg VAAPI HEVC encoding not supported
debug: ---------------------------------
debug: Loading module: obs-filters.so
debug: ---------------------------------
debug: Loading module: obs-outputs.so
debug: ---------------------------------
debug: Loading module: obs-transitions.so
debug: ---------------------------------
debug: Loading module: obs-vst.so
debug: ---------------------------------
debug: Loading module: obs-x264.so
debug: ---------------------------------
debug: Loading module: rtmp-services.so
debug: ---------------------------------
debug: Loading module: text-freetype2.so
debug: ---------------------------------
debug: Loading module: vlc-video.so
info: [vlc-video]: VLC 3.0.18 Vetinari found, VLC video source enabled
info: ---------------------------------
info:   Loaded Modules:
info:     vlc-video.so
info:     text-freetype2.so
info:     rtmp-services.so
info:     obs-x264.so
info:     obs-vst.so
info:     obs-transitions.so
info:     obs-outputs.so
info:     obs-filters.so
info:     obs-ffmpeg.so
info:     linux-v4l2.so
info:     linux-pulseaudio.so
info:     linux-pipewire.so
info:     linux-capture.so
info:     linux-alsa.so
info:     image-source.so
info:     frontend-tools.so
info: ---------------------------------
info: ==== Startup complete ===============================================
debug: service 'default_service' (rtmp_common) created
debug: encoder 'simple_video_stream' (obs_x264) created
debug: Fallback encoder bitrates:
	 64 kbit/s:
	 96 kbit/s:
	128 kbit/s:
	160 kbit/s:
	192 kbit/s:
	224 kbit/s:
	256 kbit/s:
	288 kbit/s:
	320 kbit/s:
	352 kbit/s:
	384 kbit/s:
	416 kbit/s:
	448 kbit/s:
	480 kbit/s:
	512 kbit/s:
	544 kbit/s:
	576 kbit/s:
	608 kbit/s:
	640 kbit/s:
	672 kbit/s:
	704 kbit/s:
	736 kbit/s:
	768 kbit/s:
	800 kbit/s:
	832 kbit/s:
	864 kbit/s:
	896 kbit/s:
	928 kbit/s:
	960 kbit/s:
	992 kbit/s:
	1024 kbit/s:
debug: FFmpeg PCM (16-bit) (ffmpeg_pcm_s16le) encoder bitrates:
	 64 kbit/s
	 96 kbit/s
	128 kbit/s
	160 kbit/s
	192 kbit/s
	224 kbit/s
	256 kbit/s
	288 kbit/s
	320 kbit/s
	352 kbit/s
	384 kbit/s
	416 kbit/s
	448 kbit/s
	480 kbit/s
	512 kbit/s
	544 kbit/s
	576 kbit/s
	608 kbit/s
	640 kbit/s
	672 kbit/s
	704 kbit/s
	736 kbit/s
	768 kbit/s
	800 kbit/s
	832 kbit/s
	864 kbit/s
	896 kbit/s
	928 kbit/s
	960 kbit/s
	992 kbit/s
	1024 kbit/s
debug: FFmpeg PCM (24-bit) (ffmpeg_pcm_s24le) encoder bitrates:
	 64 kbit/s
	 96 kbit/s
	128 kbit/s
	160 kbit/s
	192 kbit/s
	224 kbit/s
	256 kbit/s
	288 kbit/s
	320 kbit/s
	352 kbit/s
	384 kbit/s
	416 kbit/s
	448 kbit/s
	480 kbit/s
	512 kbit/s
	544 kbit/s
	576 kbit/s
	608 kbit/s
	640 kbit/s
	672 kbit/s
	704 kbit/s
	736 kbit/s
	768 kbit/s
	800 kbit/s
	832 kbit/s
	864 kbit/s
	896 kbit/s
	928 kbit/s
	960 kbit/s
	992 kbit/s
	1024 kbit/s
debug: FFmpeg PCM (32-bit float) (ffmpeg_pcm_f32le) encoder bitrates:
	 64 kbit/s
	 96 kbit/s
	128 kbit/s
	160 kbit/s
	192 kbit/s
	224 kbit/s
	256 kbit/s
	288 kbit/s
	320 kbit/s
	352 kbit/s
	384 kbit/s
	416 kbit/s
	448 kbit/s
	480 kbit/s
	512 kbit/s
	544 kbit/s
	576 kbit/s
	608 kbit/s
	640 kbit/s
	672 kbit/s
	704 kbit/s
	736 kbit/s
	768 kbit/s
	800 kbit/s
	832 kbit/s
	864 kbit/s
	896 kbit/s
	928 kbit/s
	960 kbit/s
	992 kbit/s
	1024 kbit/s
debug: FFmpeg ALAC (24-bit) (ffmpeg_alac) encoder bitrates:
	 64 kbit/s
	 96 kbit/s
	128 kbit/s
	160 kbit/s
	192 kbit/s
	224 kbit/s
	256 kbit/s
	288 kbit/s
	320 kbit/s
	352 kbit/s
	384 kbit/s
	416 kbit/s
	448 kbit/s
	480 kbit/s
	512 kbit/s
	544 kbit/s
	576 kbit/s
	608 kbit/s
	640 kbit/s
	672 kbit/s
	704 kbit/s
	736 kbit/s
	768 kbit/s
	800 kbit/s
	832 kbit/s
	864 kbit/s
	896 kbit/s
	928 kbit/s
	960 kbit/s
	992 kbit/s
	1024 kbit/s
debug: FFmpeg FLAC (16-bit) (ffmpeg_flac) encoder bitrates:
	 64 kbit/s
	 96 kbit/s
	128 kbit/s
	160 kbit/s
	192 kbit/s
	224 kbit/s
	256 kbit/s
	288 kbit/s
	320 kbit/s
	352 kbit/s
	384 kbit/s
	416 kbit/s
	448 kbit/s
	480 kbit/s
	512 kbit/s
	544 kbit/s
	576 kbit/s
	608 kbit/s
	640 kbit/s
	672 kbit/s
	704 kbit/s
	736 kbit/s
	768 kbit/s
	800 kbit/s
	832 kbit/s
	864 kbit/s
	896 kbit/s
	928 kbit/s
	960 kbit/s
	992 kbit/s
	1024 kbit/s
debug: AAC simple encoder bitrate mapping:
	 64 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	 96 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	128 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	160 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	192 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	224 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	256 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	288 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	320 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	352 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	384 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	416 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	448 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	480 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	512 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	544 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	576 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	608 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	640 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	672 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	704 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	736 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	768 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	800 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	832 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	864 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	896 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	928 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	960 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	992 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
	1024 kbit/s: 'FFmpeg AAC' (ffmpeg_aac)
debug: encoder 'simple_aac' (ffmpeg_aac) created
debug: encoder 'simple_archive_audio' (ffmpeg_aac) created
debug: output 'simple_file_output' (ffmpeg_muxer) created
info: All scene data cleared
info: ------------------------------------------------
debug: private source 'Cut' (cut_transition) created
debug: private source 'Fade' (fade_transition) created
info: pulse-input: Server name: 'pulseaudio 16.1'
debug: pulse-input: Default output device: 'alsa_output.pci-0000_00_14.2.analog-stereo.monitor'
info: pulse-input: Audio format: s16le, 44100 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_output.pci-0000_00_14.2.analog-stereo.monitor' (default)
debug: source 'Desktop Audio' (pulse_output_capture) created
info: [Loaded global audio device]: 'Desktop Audio'
info: pulse-input: Server name: 'pulseaudio 16.1'
debug: pulse-input: Default input device: 'alsa_input.pci-0000_00_14.2.analog-stereo'
info: pulse-input: Audio format: s16le, 44100 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_input.pci-0000_00_14.2.analog-stereo' (default)
debug: source 'Mic/Aux' (pulse_input_capture) created
info: [Loaded global audio device]: 'Mic/Aux'
debug: source 'Scene' (scene) created
info: PipeWire initialized
debug: source 'Screen Capture (PipeWire)' (pipewire-desktop-capture-source) created
info: Switched to scene 'Scene'
info: ------------------------------------------------
info: Loaded scenes:
info: - scene 'Scene':
info:     - source: 'Screen Capture (PipeWire)' (pipewire-desktop-capture-source)
info: ------------------------------------------------
info: [pipewire] Screencast session created
debug: Attempted path: share/obs/obs-studio/images/overflow.png
debug: Attempted path: /usr/share/obs/obs-studio/images/overflow.png
debug: [pipewire] Response to select source received
info: [pipewire] Asking for desktop
info: [pipewire] desktop selected, setting up screencast
info: [pipewire] Server version: 0.3.80
info: [pipewire] Library version: 0.3.80
info: [pipewire] Header version: 0.3.80
debug: [pipewire] registered event 0x558a59809510
info: [pipewire] Created stream 0x558a5b5598f0
info: [pipewire] Stream 0x558a5b5598f0 state: "connecting" (error: none)
info: [pipewire] Playing stream 0x558a5b5598f0
info: [pipewire] Stream 0x558a5b5598f0 state: "paused" (error: none)
info: [pipewire] Negotiated format:
info: [pipewire]     Format: 8 (Spa:Enum:VideoFormat:BGRx)
info: [pipewire]     Modifier: 0xffffffffffffff
info: [pipewire]     Size: 1366x768
info: [pipewire]     Framerate: 0/1
info: [pipewire] Stream 0x558a5b5598f0 state: "streaming" (error: none)

Here is the output of wpctl status when using gnome:

PipeWire 'pipewire-0' [0.3.80, cait@gen2, cookie:2101058780]
 └─ Clients:
        32. WirePlumber                         [0.3.80, cait@gen2, pid:6283]
        33. WirePlumber [export]                [0.3.80, cait@gen2, pid:6283]
        36. xdg-desktop-portal                  [0.3.80, cait@gen2, pid:6410]
        37. gnome-shell                         [0.3.80, cait@gen2, pid:5894]
        40. obs                                 [0.3.80, cait@gen2, pid:7661]
        44. wpctl                               [0.3.80, cait@gen2, pid:7990]

Audio
 ├─ Devices:
 │
 ├─ Sinks:
 │
 ├─ Sink endpoints:
 │
 ├─ Sources:
 │
 ├─ Source endpoints:
 │
 └─ Streams:

Video
 ├─ Devices:
 │
 ├─ Sinks:
 │
 ├─ Sink endpoints:
 │
 ├─ Sources:
 │
 ├─ Source endpoints:
 │
 └─ Streams:
        38. gnome-shell
             39. output_1        > obs:input_1	[active]
        41. obs
             42. input_1         < gnome-shell:output_1	[active]

Settings
 └─ Default Configured Node Names:

I assume the problem is not in pipewire, but rather in xdgh, because screen sharing works on gnome with the same pipewire installation. Have tried this, with no effect

@zeionara zeionara changed the title Black screen when recording screen in OBS studio Black screen when screen sharing in OBS studio Nov 20, 2023
@vaxerski
Copy link
Member

image

image

maybe update?

@zeionara
Copy link
Author

zeionara commented Nov 20, 2023

image

image

maybe update?

Updated to the latest version (compiled from master) - the problem is not solved, but the output of wpctl status is changed a bit:

PipeWire 'pipewire-0' [0.3.80, cait@gen2, cookie:3156284514]
 └─ Clients:
        32. WirePlumber [export]                [0.3.80, cait@gen2, pid:3330]
        33. WirePlumber                         [0.3.80, cait@gen2, pid:3330]
        36. xdg-desktop-portal-hyprland         [0.3.80, cait@gen2, pid:3505]
        37. xdg-desktop-portal                  [0.3.80, cait@gen2, pid:3555]
        41. obs                                 [0.3.80, cait@gen2, pid:6244]
        43. wpctl                               [0.3.80, cait@gen2, pid:6808]

Audio
 ├─ Devices:
 │
 ├─ Sinks:
 │
 ├─ Sink endpoints:
 │
 ├─ Sources:
 │
 ├─ Source endpoints:
 │
 └─ Streams:

Video
 ├─ Devices:
 │
 ├─ Sinks:
 │
 ├─ Sink endpoints:
 │
 ├─ Sources:
 │  *   39. xdg-desktop-portal-hyprland
 │
 ├─ Source endpoints:
 │
 └─ Streams:
        28. obs
             38. input_1         < xdg-desktop-portal-hyprland:capture_1	[negotiating]

Settings
 └─ Default Configured Node Names:

After some time it changes to init:

PipeWire 'pipewire-0' [0.3.80, cait@gen2, cookie:3156284514]
 └─ Clients:
        32. WirePlumber [export]                [0.3.80, cait@gen2, pid:3330]
        33. WirePlumber                         [0.3.80, cait@gen2, pid:3330]
        36. xdg-desktop-portal-hyprland         [0.3.80, cait@gen2, pid:3505]
        37. xdg-desktop-portal                  [0.3.80, cait@gen2, pid:3555]
        41. obs                                 [0.3.80, cait@gen2, pid:6244]
        43. wpctl                               [0.3.80, cait@gen2, pid:7416]

Audio
 ├─ Devices:
 │
 ├─ Sinks:
 │
 ├─ Sink endpoints:
 │
 ├─ Sources:
 │
 ├─ Source endpoints:
 │
 └─ Streams:

Video
 ├─ Devices:
 │
 ├─ Sinks:
 │
 ├─ Sink endpoints:
 │
 ├─ Sources:
 │  *   39. xdg-desktop-portal-hyprland
 │
 ├─ Source endpoints:
 │
 └─ Streams:
        28. obs
             38. input_1         < xdg-desktop-portal-hyprland:capture_1	[init]

Settings
 └─ Default Configured Node Names:

Then back to negotiating. At the same time pipewire is making some intensive computations loading one of cpu cores to 100%.

@zeionara
Copy link
Author

pipewire log:

[2023-11-20T16:28:47MSK] Starting PipeWire.
[W][01410.573831] mod.x11-bell | [module-x11-bell.:  312 x11_io_error_handler()] X11 I/O error handler called on display :0
[W][01410.573915] mod.x11-bell | [module-x11-bell.:  153 x11_io_error_exit_handler()] X11 display (:0) has encountered a fatal I/O error

wireplumber log:

[2023-11-20T16:28:48MSK] Starting WirePlumber.
M 16:28:48.345404          wp-device ../wireplumber-0.4.14/lib/wp/device.c:619:wp_spa_device_new_from_spa_factory: SPA handle 'api.libcamera.enum.manager' could not be loaded; is it installed?
M 16:28:48.345559   script/libcamera libcamera.lua:173:chunk: PipeWire's libcamera SPA missing or broken. libcamera not supported.
M 16:28:48.346232          wp-device ../wireplumber-0.4.14/lib/wp/device.c:619:wp_spa_device_new_from_spa_factory: SPA handle 'api.v4l2.enum.udev' could not be loaded; is it installed?
M 16:28:48.346267        script/v4l2 v4l2.lua:164:chunk: PipeWire's V4L SPA missing or broken. Video4Linux not supported.
W 16:28:53.144266 m-portal-permissio ../wireplumber-0.4.14/modules/module-portal-permissionstore.c:63:wp_portal_permissionstore_plugin_lookup: <WpPortalPermissionStorePlugin:0x559ac06b05c0> Failed to call Lookup: GDBus.Error:org.freedesktop.portal.Error.NotFound: No entry for camera

The last message is printed every time I add pipewire screen capture in obs

@zeionara
Copy link
Author

More logs from wireplumber regarding the m-portal-permission error:

W 17:26:00.029054 m-portal-permissio ../wireplumber-0.4.14/modules/module-portal-permissionstore.c:63:wp_portal_permissionstore_plugin_lookup: <WpPortalPermissionStorePlugin:0x55a50fb15c40> Failed to call Lookup: GDBus.Error:org.freedesktop.portal.Error.NotFound: No entry for camera
I 17:26:00.029338 script/access-port access-portal.lua:64:updateClientPermissions: <WpClient:39:0x55a50fba37f0> Ignoring portal check for non-sandboxed client
I 17:26:00.029386 script/access-port access-portal.lua:31:setPermissions: <WpClient:39:0x55a50fba37f0> Granting ALL access to client 39
I 17:26:00.041225 script/restore-str restore-stream.lua:386:restoreStream: <WpNode:40:0x55a50fc02720> restore values from Input/Video:media.role:Screen
I 17:26:00.042533 script/create-item create-item.lua:85:chunk: <WpSiNode:0x55a50fb85be0> activated item for node 40
I 17:26:00.042723 script/policy-node policy-node.lua:676:handleLinkable: <WpSiNode:0x55a50fb85be0> handling item: obs (40)
I 17:26:00.043034 script/policy-node policy-node.lua:79:createLink: link obs <-> xdg-desktop-portal-hyprland passive:nil, passthrough:false, exclusive:nil
I 17:26:00.043434        pw.metadata ../pipewire-0.3.80/src/pipewire/impl-metadata.c:186:impl_set_property: 0x55a50fb72e30: add id:40 key:target.node type:Spa:Id value:-1
I 17:26:00.043586 script/restore-str restore-stream.lua:178:saveTarget: <WpNode:40:0x55a50fc02720> saving stream target for obs -> nil
I 17:26:00.044091 script/policy-node policy-node.lua:676:handleLinkable: <WpSiNode:0x55a50fb85be0> handling item: obs (40)
I 17:26:00.044519 script/policy-node policy-node.lua:545:findUndefinedTarget: ... default target picked: xdg-desktop-portal-hyprland (28), can_passthrough:false
I 17:26:00.044912 script/policy-node policy-node.lua:654:checkFollowDefault: <WpSiNode:0x55a50fb85be0> ... set metadata to follow default
I 17:26:00.046965 script/policy-node policy-node.lua:150:chunk: <WpSiStandardLink:0x55a50fbd0ae0> activated si-standard-link
I 17:26:00.047250 script/policy-node policy-node.lua:676:handleLinkable: <WpSiNode:0x55a50fb85be0> handling item: obs (40)
I 17:26:00.047747 script/policy-node policy-node.lua:545:findUndefinedTarget: ... default target picked: xdg-desktop-portal-hyprland (28), can_passthrough:false
I 17:26:00.049467 script/restore-str restore-stream.lua:297:chunk: <WpNode:40:0x55a50fc02720> saving stream props for obs
I 17:26:00.050303 script/restore-str restore-stream.lua:297:chunk: <WpNode:40:0x55a50fc02720> saving stream props for obs
I 17:26:00.050882 script/restore-str restore-stream.lua:297:chunk: <WpNode:40:0x55a50fc02720> saving stream props for obs
I 17:26:00.052200 script/restore-str restore-stream.lua:297:chunk: <WpNode:40:0x55a50fc02720> saving stream props for obs
I 17:26:00.052875 script/restore-str restore-stream.lua:297:chunk: <WpNode:40:0x55a50fc02720> saving stream props for obs

And then line script/restore-str restore-stream.lua:297:chunk: <WpNode:40:0x55a50fc02720> saving stream props for obs is repeated in the log again and again

@vaxerski
Copy link
Member

an xdph log with -v would be more useful

@zeionara
Copy link
Author

zeionara commented Nov 20, 2023

an xdph log with -v would be more useful

Off course. Here is the full xdph log. Without got poll event: xdph-log-filtered.txt. It seems to me the following lines are the main ones:

Creation of the pipewire screen capture:

[TRACE] [pw] New stream name xdph-streaming-360885
[TRACE] [pw] build_modifierlist: count 1
[LOG] [pw] Building modifiers for dma
[TRACE] [pw] pwStreamStateChange on 0x5624c107d0b0 from unconnected to connecting, node id 4294967295
[TRACE] [pw] Stream got nodeid 4294967295
[TRACE] [pw] pwStreamStateChange on 0x5624c107d0b0 from connecting to paused, node id 28
[LOG] [screencopy] Sharing initialized
[TRACE] [sc] queued frame in 16.666666666666668ms

Then something happens:

[TRACE] [pw] pwStreamParamChanged on 0x5624c107d0b0
[TRACE] [pw] invalid call in pwStreamParamChanged

Then comes the message that obs traces repeatedly:

[TRACE] [pw] pwStreamParamChanged on 0x5624c107d0b0
[TRACE] [pipewire] pw requested dmabuf
[TRACE] [pw] don't fixate
[TRACE] [pw] unable to allocate a dmabuf with modifiers. Falling back to the old api
[TRACE] [pw] build_modifierlist: count 1
[LOG] [pw] Building modifiers for dma
[TRACE] [pw] Format fixated:
[TRACE] [pw]  | buffer_type DMA (No fixate)
[TRACE] [pw]  | format: 8
[TRACE] [pw]  | modifier: 0
[TRACE] [pw]  | size: 1366x768
[TRACE] [pw]  | framerate 60

Then I delete the pipewire screen capture:

[TRACE] [internal] Close Session 0x5624c1097040
[TRACE] [pw] pwStreamParamChanged on 0x5624c107d0b0
[TRACE] [pw] invalid call in pwStreamParamChanged
[TRACE] [pw] pwStreamParamChanged on 0x5624c107d0b0
[TRACE] [pw] invalid call in pwStreamParamChanged
[TRACE] [pw] pwStreamStateChange on 0x5624c107d0b0 from paused to unconnected, node id 4294967295
[LOG] [screencopy] Stream destroyed
[LOG] [screencopy] Session destroyed

Also I am attaching pipewire and wireplumber logs for hyprland and gnome:

  1. pipewire-hypr.txt
  2. wireplumber-hypr.txt
  3. pipewire-gnome.txt
  4. wireplumber-gnome.txt

@vaxerski
Copy link
Member

vaxerski commented Nov 21, 2023

odd, looks like pipewire being stuck in some endless loop. No clue. Does xdpw work?

@zeionara
Copy link
Author

odd, looks like pipewire being stuck in some endless loop. No clue. Does xdpw work?

Can't actually figure out how to test in on xdpw. Here is how I start xdpw:

#!/bin/bash

sleep 1

killall xdg-desktop-portal-hyprland
killall xdg-desktop-portal-gnome
killall xdg-desktop-portal-wlr
killall xdg-desktop-portal
logger 'killed all xdg-desktop'

sleep 1
/usr/libexec/xdg-desktop-portal-wlr -l TRACE >> /home/cait/xdpw-log.txt 2>&1 &
logger 'xdg-desktop-portal-wlr started'

sleep 2
/usr/libexec/xdg-desktop-portal &
logger 'xdg-desktop-portal started'

Here is the output of wpctl status:

PipeWire 'pipewire-0' [0.3.80, cait@gen2, cookie:2706589679]
 └─ Clients:
        32. WirePlumber [export]                [0.3.80, cait@gen2, pid:5954]
        33. WirePlumber                         [0.3.80, cait@gen2, pid:5954]
        36. wpctl                               [0.3.80, cait@gen2, pid:13751]
        37. xdg-desktop-portal                  [0.3.80, cait@gen2, pid:6129]
        38. xdg-desktop-portal-wlr              [0.3.80, cait@gen2, pid:6193]

Audio
 ├─ Devices:
 │
 ├─ Sinks:
 │
 ├─ Sink endpoints:
 │
 ├─ Sources:
 │
 ├─ Source endpoints:
 │
 └─ Streams:

Video
 ├─ Devices:
 │
 ├─ Sinks:
 │
 ├─ Sink endpoints:
 │
 ├─ Sources:
 │
 ├─ Source endpoints:
 │
 └─ Streams:

Settings
 └─ Default Configured Node Names:

Here is the message in OBS log saying that pipewire wants to use xdg-desktop-portal-hyprland, which is not available:

error: [pipewire] Error creating screencast session: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ExecFailed: Error calling StartServiceByName for org.freedesktop.impl.portal.desktop.hyprland: Failed to execute program org.freedesktop.impl.portal.desktop.hyprland: No such file or directory

Here is xdpw log:

2023/11/21 08:42:35 [TRACE] - config: trying config file /home/cait/.config/xdg-desktop-portal-wlr/Hyprland
2023/11/21 08:42:35 [TRACE] - config: trying config file /home/cait/.config/xdg-desktop-portal-wlr/config
2023/11/21 08:42:35 [TRACE] - config: trying config file /etc/xdg/xdg-desktop-portal-wlr/Hyprland
2023/11/21 08:42:35 [TRACE] - config: trying config file /etc/xdg/xdg-desktop-portal-wlr/config
2023/11/21 08:42:35 [ERROR] - config: no config file found
2023/11/21 08:42:35 [DEBUG] - config: outputname:  (null)
2023/11/21 08:42:35 [DEBUG] - config: max_fps:  0.000000
2023/11/21 08:42:35 [DEBUG] - config: exec_before:  (null)
2023/11/21 08:42:35 [DEBUG] - config: exec_after:  (null)
2023/11/21 08:42:35 [DEBUG] - config: chooser_cmd: (null)
2023/11/21 08:42:35 [DEBUG] - config: chooser_type: default
2023/11/21 08:42:35 [DEBUG] - dbus: connected
2023/11/21 08:42:35 [DEBUG] - wlroots: wl_display connected
2023/11/21 08:42:35 [DEBUG] - pipewire: pw_loop created
2023/11/21 08:42:35 [DEBUG] - pipewire: establishing connection to core
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register wl_shm  (Version: 1)
2023/11/21 08:42:35 [DEBUG] - wlroots: |-- registered to interface wl_shm (Version 1)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register wl_drm  (Version: 2)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register zwp_linux_dmabuf_v1  (Version: 4)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register wl_compositor  (Version: 6)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register wl_subcompositor  (Version: 1)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register wl_data_device_manager  (Version: 3)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register zwlr_export_dmabuf_manager_v1  (Version: 1)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register zwlr_data_control_manager_v1  (Version: 2)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register zwp_primary_selection_device_manager_v1  (Version: 1)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register wp_viewporter  (Version: 1)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register zwlr_gamma_control_manager_v1  (Version: 1)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register zwlr_output_power_manager_v1  (Version: 1)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register xdg_wm_base  (Version: 5)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register wl_seat  (Version: 8)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register wp_presentation  (Version: 1)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register ext_idle_notifier_v1  (Version: 1)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register zwlr_layer_shell_v1  (Version: 4)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register org_kde_kwin_server_decoration_manager  (Version: 1)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register zxdg_decoration_manager_v1  (Version: 1)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register zwlr_output_manager_v1  (Version: 4)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register zwlr_input_inhibit_manager_v1  (Version: 1)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register zwp_keyboard_shortcuts_inhibit_manager_v1  (Version: 1)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register zwp_pointer_constraints_v1  (Version: 1)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register zwp_relative_pointer_manager_v1  (Version: 1)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register zwp_virtual_keyboard_manager_v1  (Version: 1)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register zwlr_virtual_pointer_manager_v1  (Version: 2)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register zwlr_foreign_toplevel_manager_v1  (Version: 3)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register wp_drm_lease_device_v1  (Version: 1)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register zwp_tablet_manager_v2  (Version: 1)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register zwp_idle_inhibit_manager_v1  (Version: 1)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register zxdg_exporter_v1  (Version: 1)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register zxdg_importer_v1  (Version: 1)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register zxdg_exporter_v2  (Version: 1)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register zxdg_importer_v2  (Version: 1)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register zwp_pointer_gestures_v1  (Version: 3)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register zwp_text_input_manager_v3  (Version: 1)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register zwp_input_method_manager_v2  (Version: 1)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register xdg_activation_v1  (Version: 1)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register ext_session_lock_manager_v1  (Version: 1)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register wp_cursor_shape_manager_v1  (Version: 1)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register wp_tearing_control_manager_v1  (Version: 1)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register wp_single_pixel_buffer_manager_v1  (Version: 1)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register xwayland_shell_v1  (Version: 1)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register hyprland_toplevel_export_manager_v1  (Version: 2)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register wp_fractional_scale_manager_v1  (Version: 1)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register zwp_text_input_manager_v1  (Version: 1)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register hyprland_global_shortcuts_manager_v1  (Version: 1)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register zwlr_screencopy_manager_v1  (Version: 3)
2023/11/21 08:42:35 [DEBUG] - wlroots: |-- registered to interface zwlr_screencopy_manager_v1 (Version 3)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register zxdg_output_manager_v1  (Version: 3)
2023/11/21 08:42:35 [DEBUG] - wlroots: |-- registered to interface zxdg_output_manager_v1 (Version 3)
2023/11/21 08:42:35 [DEBUG] - wlroots: interface to register wl_output  (Version: 4)
2023/11/21 08:42:35 [DEBUG] - wlroots: |-- registered to interface wl_output (Version 1)
2023/11/21 08:42:35 [DEBUG] - wayland: registry listeners run
2023/11/21 08:42:35 [DEBUG] - wayland: xdg output listeners run
2023/11/21 08:42:35 [TRACE] - event-loop: got pipewire event
2023/11/21 08:42:35 [TRACE] - event-loop: got pipewire event
2023/11/21 08:42:37 [TRACE] - event-loop: got pipewire event
2023/11/21 08:42:40 [TRACE] - event-loop: got pipewire event
2023/11/21 08:42:55 [TRACE] - event-loop: got pipewire event
2023/11/21 08:43:23 [TRACE] - event-loop: got pipewire event
2023/11/21 08:43:24 [TRACE] - event-loop: got pipewire event
2023/11/21 08:43:24 [TRACE] - event-loop: got pipewire event
2023/11/21 08:43:24 [TRACE] - event-loop: got pipewire event
2023/11/21 08:43:24 [TRACE] - event-loop: got pipewire event
2023/11/21 08:44:08 [TRACE] - event-loop: got pipewire event
2023/11/21 08:44:33 [TRACE] - event-loop: got pipewire event
2023/11/21 08:44:52 [TRACE] - event-loop: got pipewire event
2023/11/21 08:45:06 [TRACE] - event-loop: got pipewire event
2023/11/21 08:45:11 [TRACE] - event-loop: got pipewire event
2023/11/21 08:45:17 [TRACE] - event-loop: got pipewire event
2023/11/21 08:45:18 [TRACE] - event-loop: got pipewire event
2023/11/21 08:45:18 [TRACE] - event-loop: got pipewire event
2023/11/21 08:45:18 [TRACE] - event-loop: got pipewire event
2023/11/21 08:45:18 [TRACE] - event-loop: got pipewire event
2023/11/21 08:45:20 [TRACE] - event-loop: got pipewire event
2023/11/21 08:47:06 [TRACE] - event-loop: got pipewire event
2023/11/21 08:47:13 [TRACE] - event-loop: got pipewire event
2023/11/21 08:47:23 [TRACE] - event-loop: got pipewire event
2023/11/21 08:47:35 [TRACE] - event-loop: got pipewire event
2023/11/21 08:47:37 [TRACE] - event-loop: got pipewire event
2023/11/21 09:00:21 [TRACE] - event-loop: got pipewire event

For some reason pipewire doesn't want to use xdpw

@vaxerski
Copy link
Member

edit /usr/share/xdg-desktop-portal/hyprland-portals.conf

@zeionara
Copy link
Author

odd, looks like pipewire being stuck in some endless loop. No clue. Does xdpw work?

xdpw doesn't work. I've added wlr to the /usr/share/xdg-desktop-portal/hyprland-portals.conf, now when starting OBS pipewire says that no captures available:

info: [pipewire] No captures available

Even though xdpw is indentified as a pipewire client:

PipeWire 'pipewire-0' [0.3.80, cait@gen2, cookie:337157589]
 └─ Clients:
        28. wpctl                               [0.3.80, cait@gen2, pid:18386]
        32. WirePlumber                         [0.3.80, cait@gen2, pid:9305]
        33. WirePlumber [export]                [0.3.80, cait@gen2, pid:9305]
        36. xdg-desktop-portal                  [0.3.80, cait@gen2, pid:9483]
        37. xdg-desktop-portal-wlr              [0.3.80, cait@gen2, pid:9534]

@alexhraber
Copy link

I have what I believe is an identical issue on gentoo using hyprland.

In obs startup I see a glimpse of the hyprland default wallpaper which quickly disappears, then it’s just a black screen.

I can select the monitor I wish to share, by adding the screen source (pipewire) which takes a moment to load up and then I select my monitor, but it stays black in preview and on any streams.

I get the following in the terminal when I add my screen as described in the paragraph above ^:
warning: [pipewire] Failed to start screencast, denied or cancelled by user.

I’ve confirmed my user settings, permissions, env, dependencies, etc. it seems xdgh is presenting momentarily (hence the splash screen of the default hyprland wallpaper), but pipewire doesn’t seem to know what to do.

Possibly unrelated — I get the default wallpaper splash on reboots too — so this makes me wonder if pipewire simply fails due to my wallpaper overriding default… 🤔

@alexhraber
Copy link

I just disabled hyprpaper, rebooted, and that did not fix the issue, so it definitely seems to be xdgh.

Right when I launch obs, in the preview section I see the hyprland default wallpaper ever so briefly, and it goes away… so it is showing the screen, it just thinks the screen is blank/black — even with the default wallpaper, or when I override with hyprpaper.

@alexhraber
Copy link

alexhraber commented Feb 7, 2024

I might even be taking xdgw pre-wallpaper (thus black)

I don’t know enough about these layers, but it seems obs (via pipewire) is showing xdgw at a lower stage than wallpaper being set (via hyprpaper through xdgh).

I have confirmed that I’m using xdgw, but the blank/black screen I’m seeing seems identical to OP, or at least is similar enough that the info I shared might lead to a fix

@alexhraber
Copy link

Sorry to highjack this issue — I solved my problem by updating my xdgw config to use DMA-BUF.

@zeionara
Copy link
Author

Sorry to highjack this issue — I solved my problem by updating my xdgw config to use DMA-BUF.

Can you please provide more details how you did this? I will try to do the same and check if it solves the problem for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants