Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: OBS studio not working in pipewire with wireplumber in Plasma. (Read 586 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

OBS studio not working in pipewire with wireplumber in Plasma.

OBS studio after installing the base package works in Xorg mode which somehow only appears in sudo. I use Plasma

But when running screen/window capture in pipewire it doesn't work. I've got all the libraries installed.

that is, xdg portals kde(including user-dirs, and xdg-utils)
qt6-wayland
intel-media-sdk for quick sync.
Anything else I missed?

When I run with sudo, it's like this:
I tested for a while and played around with XHSM(not sure if I spelled that right) recording before trying to use pipewire.

Code: [Select]
admin2@Kelly-PC:~$ sudo obs
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/locale/en-GB.ini
debug: Attempted path: /usr/share/obs/obs-studio/locale/en-GB.ini
info: Using preferred locale 'en-GB'
debug: Attempted path: share/obs/obs-studio/themes
debug: Attempted path: /usr/share/obs/obs-studio/themes
debug: Attempted path: share/obs/obs-studio/themes/Yami.qss
debug: Attempted path: /usr/share/obs/obs-studio/themes/Yami.qss
warning: [Safe Mode] Unclean shutdown detected!
warning: [Safe Mode] User elected to launch normally.
info: Using EGL/X11
info: CPU Name: Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz
info: CPU Speed: 800.001MHz
info: Physical Cores: 4, Logical Cores: 4
info: Physical Memory: 7841MB Total, 3253MB Free
info: Kernel Version: Linux 6.9.2-zen1-1-zen
info: Distribution: "Artix Linux" Unknown
info: Desktop Environment: KDE
info: Window System: X11.0, Vendor: The X.Org Foundation, Version: 1.24.1
info: Qt Version: 6.7.1 (runtime), 6.7.0 (compiled)
info: Portable mode: false
info: OBS 30.1.2-1 (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: Loading up OpenGL on adapter Intel Mesa Intel(R) HD Graphics 530 (SKL GT2)
info: OpenGL loaded successfully, version 4.6 (Core Profile) Mesa 24.1.1-arch1.1, shading language 4.60
info: ---------------------------------
info: video settings reset:
        base resolution:   1600x900
        output resolution: 1280x720
        downscale filter:  Bicubic
        fps:               30/1
        format:            NV12
        YUV mode:          Rec. 709/Partial
info: NV12 texture support enabled
info: P010 texture support not available
info: Audio monitoring device:
        name: Default
        id: default
info: ---------------------------------
warning: Failed to load 'en-US' text for module: 'decklink-captions.so'
warning: Failed to load 'en-US' text for module: 'decklink-output-ui.so'
libDeckLinkAPI.so: cannot open shared object file: No such file or directory
warning: A DeckLink iterator could not be created.  The DeckLink drivers may not be installed
warning: Failed to initialize module 'decklink.so'
info: [pipewire] Available captures:
info: [pipewire]     - Desktop capture
info: [pipewire]     - Window capture
warning: Failed to load 'en-GB' text for module: 'linux-vkcapture.so'
info: [linux-vkcapture] plugin loaded successfully (version 1.5.0)
info: VAAPI: API version 1.21
info: FFmpeg VAAPI H264 encoding supported
info: FFmpeg VAAPI AV1 encoding not supported
info: FFmpeg VAAPI HEVC encoding supported
info: ---------------------------------
info:   Loaded Modules:
info:     text-freetype2.so
info:     rtmp-services.so
info:     obs-x264.so
info:     obs-webrtc.so
info:     obs-vst.so
info:     obs-transitions.so
info:     obs-qsv11.so
info:     obs-outputs.so
info:     obs-libfdk.so
info:     obs-filters.so
info:     obs-ffmpeg.so
info:     linux-vkcapture.so
info:     linux-v4l2.so
info:     linux-pulseaudio.so
info:     linux-pipewire.so
info:     linux-jack.so
info:     linux-capture.so
info:     linux-alsa.so
info:     image-source.so
info:     frontend-tools.so
info:     decklink-output-ui.so
info:     decklink-captions.so
info: ---------------------------------
warning: QWidget::setTabOrder: 'first' and 'second' must be in the same window
info: ==== Startup complete ===============================================
info: All scene data cleared
info: ------------------------------------------------
info: Switched to scene 'Scene'
info: ------------------------------------------------
info: Loaded scenes:
info: - scene 'Scene':
info: ------------------------------------------------
warning: env says KDE is running but SNI unavailable -- check KDE_FULL_SESSION and XDG_CURRENT_DESKTOP
info: PipeWire initialized
info: User added source 'Window Capture (PipeWire)' (pipewire-window-capture-source) to scene 'Scene'
warning: [pipewire] Failed to create session, denied or cancelled by user
info: PipeWire initialized
warning: [pipewire] Failed to create session, denied or cancelled by user
info: User Removed source 'Window Capture (PipeWire)' (pipewire-window-capture-source) from scene 'Scene'
info: PipeWire initialized
info: User added source 'Screen Capture (PipeWire)' (pipewire-desktop-capture-source) to scene 'Scene'
warning: [pipewire] Failed to create session, denied or cancelled by user
info: User Removed source 'Screen Capture (PipeWire)' (pipewire-desktop-capture-source) from scene 'Scene'
info: xshm-input: Geometry 1600x900 @ 0,0
info: User added source 'Screen Capture (XSHM)' (xshm_input) to scene 'Scene'
info: xshm-input: Geometry 1600x900 @ 0,0
info: [window-capture: 'Window Capture (Xcomposite)'] update settings:
        title: OBS 30.1.2-1 - Profile: Untitled - Scenes: Untitled
        class: obs

info: User added source 'Window Capture (Xcomposite)' (xcomposite_input) to scene 'Scene'
info: [window-capture: 'Window Capture (Xcomposite)'] update settings:
        title: OBS 30.1.2-1 - Profile: Untitled - Scenes: Untitled
        class: obs

info: User Removed source 'Screen Capture (XSHM)' (xshm_input) from scene 'Scene'
info: ---------------------------------
info: [x264 encoder: 'simple_video_stream'] preset: veryfast
info: [x264 encoder: 'simple_video_stream'] settings:
        rate_control: CBR
        bitrate:      2500
        buffer size:  2500
        crf:          23
        fps_num:      30
        fps_den:      1
        width:        1280
        height:       720
        keyint:       250

info: libfdk_aac encoder created
info: libfdk_aac bitrate: 160, channels: 2
info: ==== Recording Start ===============================================
info: [ffmpeg muxer: 'simple_file_output'] Writing file '/root/2024-06-18 11-35-44.mkv'...
info: [ffmpeg muxer: 'simple_file_output'] Output of file '/root/2024-06-18 11-35-44.mkv' stopped
info: Output 'simple_file_output': stopping
info: Output 'simple_file_output': Total frames output: 196
info: Output 'simple_file_output': Total drawn frames: 216
info: ==== Recording Stop ================================================
info: libfdk_aac encoder destroyed
info: User Removed source 'Window Capture (Xcomposite)' (xcomposite_input) from scene 'Scene'
info: xshm-input: Geometry 1600x900 @ 0,0
info: User added source 'Screen Capture (XSHM)' (xshm_input) to scene 'Scene'
info: xshm-input: Geometry 1600x900 @ 0,0
info: xshm-input: Geometry 1600x900 @ 0,0
info: User Removed source 'Screen Capture (XSHM)' (xshm_input) from scene 'Scene'
info: [window-capture: 'Window Capture (Xcomposite)'] update settings:
        title: OBS 30.1.2-1 - Profile: Untitled - Scenes: Untitled
        class: obs

info: User added source 'Window Capture (Xcomposite)' (xcomposite_input) to scene 'Scene'
info: [window-capture: 'Window Capture (Xcomposite)'] update settings:
        title: OBS 30.1.2-1 - Profile: Untitled - Scenes: Untitled
        class: obs

info: [window-capture: 'Window Capture (Xcomposite)'] update settings:
        title: Properties for 'Window Capture (Xcomposite)'
        class: obs

info: [window-capture: 'Window Capture (Xcomposite)'] update settings:
        title: OBS 30.1.2-1 - Profile: Untitled - Scenes: Untitled
        class: obs

info: User Removed source 'Window Capture (Xcomposite)' (xcomposite_input) from scene 'Scene'
info: [Media Source 'Media Source']: settings:
        input:                  
        input_format:            (null)
        speed:                   100
        is_looping:              no
        is_linear_alpha:         no
        is_hw_decoding:          no
        is_clear_on_media_end:   yes
        restart_on_activate:     yes
        close_when_inactive:     no
        full_decode:             no
        ffmpeg_options:         
info: User added source 'Media Source' (ffmpeg_source) to scene 'Scene'
info: User Removed source 'Media Source' (ffmpeg_source) from scene 'Scene'
info: [window-capture: 'Window Capture (Xcomposite)'] update settings:
        title: OBS 30.1.2-1 - Profile: Untitled - Scenes: Untitled
        class: obs

info: User added source 'Window Capture (Xcomposite)' (xcomposite_input) to scene 'Scene'
info: [window-capture: 'Window Capture (Xcomposite)'] update settings:
        title: OBS 30.1.2-1 - Profile: Untitled - Scenes: Untitled
        class: obs

info: ==== Shutting down ==================================================
info: All scene data cleared
info: ------------------------------------------------
info: [linux-vkcapture] plugin unloaded
info: [Scripting] Total detached callbacks: 0
info: Freeing OBS context data
info: == Profiler Results =============================
info: run_program_init: 2752.37 ms
info:  ┣OBSApp::AppInit: 6.224 ms
info:  ┃ ┗OBSApp::InitLocale: 1.141 ms
info:  ┗OBSApp::OBSInit: 725.23 ms
info:    ┣obs_startup: 5.281 ms
info:    ┗OBSBasic::OBSInit: 669.567 ms
info:      ┣OBSBasic::InitBasicConfig: 0.193 ms
info:      ┣OBSBasic::ResetAudio: 0.267 ms
info:      ┣OBSBasic::ResetVideo: 99.023 ms
info:      ┃ ┗obs_init_graphics: 88.322 ms
info:      ┃   ┗shader compilation: 43.306 ms
info:      ┣OBSBasic::InitOBSCallbacks: 0.013 ms
info:      ┣OBSBasic::InitHotkeys: 0.073 ms
info:      ┣obs_load_all_modules2: 395.752 ms
info:      ┃ ┣obs_init_module(decklink-captions.so): 0.001 ms
info:      ┃ ┣obs_init_module(decklink-output-ui.so): 0 ms
info:      ┃ ┣obs_init_module(decklink.so): 0.243 ms
info:      ┃ ┣obs_init_module(frontend-tools.so): 23.965 ms
info:      ┃ ┣obs_init_module(image-source.so): 0.014 ms
info:      ┃ ┣obs_init_module(linux-alsa.so): 0.005 ms
info:      ┃ ┣obs_init_module(linux-capture.so): 1.267 ms
info:      ┃ ┣obs_init_module(linux-jack.so): 0.004 ms
info:      ┃ ┣obs_init_module(linux-pipewire.so): 26.337 ms
info:      ┃ ┣obs_init_module(linux-pulseaudio.so): 0.011 ms
info:      ┃ ┣obs_init_module(linux-v4l2.so): 6.127 ms
info:      ┃ ┣obs_init_module(linux-vkcapture.so): 0.111 ms
info:      ┃ ┣obs_init_module(obs-ffmpeg.so): 6.912 ms
info:      ┃ ┃ ┗nvenc_check: 0.633 ms
info:      ┃ ┣obs_init_module(obs-filters.so): 0.032 ms
info:      ┃ ┣obs_init_module(obs-libfdk.so): 0.003 ms
info:      ┃ ┣obs_init_module(obs-outputs.so): 0.008 ms
info:      ┃ ┣obs_init_module(obs-qsv11.so): 3.311 ms
info:      ┃ ┣obs_init_module(obs-transitions.so): 0.012 ms
info:      ┃ ┣obs_init_module(obs-vst.so): 0.007 ms
info:      ┃ ┣obs_init_module(obs-webrtc.so): 0.018 ms
info:      ┃ ┣obs_init_module(obs-x264.so): 0.003 ms
info:      ┃ ┣obs_init_module(rtmp-services.so): 0.763 ms
info:      ┃ ┗obs_init_module(text-freetype2.so): 0.016 ms
info:      ┣OBSBasic::InitService: 1.869 ms
info:      ┣OBSBasic::ResetOutputs: 0.298 ms
info:      ┣OBSBasic::CreateHotkeys: 0.034 ms
info:      ┣OBSBasic::InitPrimitives: 0.209 ms
info:      ┗OBSBasic::Load: 37.358 ms
info: obs_hotkey_thread(25 ms): min=0.065 ms, median=0.754 ms, max=14.487 ms, 99th percentile=2.31 ms, 100% below 25 ms
info: audio_thread(Audio): min=0.007 ms, median=0.043 ms, max=18.428 ms, 99th percentile=0.454 ms
info:  ┗receive_audio: min=0.002 ms, median=0.197 ms, max=5.142 ms, 99th percentile=0.732 ms, 0.00788567 calls per parent call
info:    ┣buffer_audio: min=0 ms, median=0.001 ms, max=0.03 ms, 99th percentile=0.013 ms
info:    ┗do_encode: min=0.073 ms, median=0.193 ms, max=5.132 ms, 99th percentile=0.725 ms
info:      ┣encode(simple_aac): min=0.068 ms, median=0.183 ms, max=1.52 ms, 99th percentile=0.507 ms
info:      ┗send_packet: min=0.002 ms, median=0.008 ms, max=4.873 ms, 99th percentile=0.133 ms
info: obs_graphics_thread(33.3333 ms): min=0.058 ms, median=3.99 ms, max=47.862 ms, 99th percentile=8.928 ms, 99.9892% below 33.333 ms
info:  ┣tick_sources: min=0.001 ms, median=0.731 ms, max=39.733 ms, 99th percentile=6.058 ms
info:  ┣output_frame: min=0.023 ms, median=0.426 ms, max=37.838 ms, 99th percentile=1.398 ms
info:  ┃ ┣gs_context(video->graphics): min=0.023 ms, median=0.424 ms, max=37.835 ms, 99th percentile=1.24 ms
info:  ┃ ┃ ┣render_video: min=0.016 ms, median=0.196 ms, max=37.55 ms, 99th percentile=0.606 ms
info:  ┃ ┃ ┃ ┣render_main_texture: min=0.012 ms, median=0.187 ms, max=6.27 ms, 99th percentile=0.58 ms
info:  ┃ ┃ ┃ ┣render_output_texture: min=0.017 ms, median=0.079 ms, max=28.034 ms, 99th percentile=0.631 ms, 0.00784186 calls per parent call
info:  ┃ ┃ ┃ ┣render_convert_texture: min=0.022 ms, median=0.051 ms, max=7.999 ms, 99th percentile=0.28 ms, 0.00784186 calls per parent call
info:  ┃ ┃ ┃ ┗stage_output_texture: min=0.014 ms, median=0.03 ms, max=1.312 ms, 99th percentile=0.351 ms, 0.00784186 calls per parent call
info:  ┃ ┃ ┣gs_flush: min=0.003 ms, median=0.183 ms, max=4.717 ms, 99th percentile=0.422 ms
info:  ┃ ┃ ┗download_frame: min=0 ms, median=0.126 ms, max=4.481 ms, 99th percentile=1.709 ms, 0.00784186 calls per parent call
info:  ┃ ┗output_video_data: min=0.186 ms, median=0.353 ms, max=2.87 ms, 99th percentile=2.613 ms, 0.00780572 calls per parent call
info:  ┗render_displays: min=0.003 ms, median=1.854 ms, max=23.946 ms, 99th percentile=4.936 ms
info: video_thread(video): min=1.513 ms, median=2.625 ms, max=12.346 ms, 99th percentile=10.326 ms
info:  ┗receive_video: min=1.511 ms, median=2.621 ms, max=12.344 ms, 99th percentile=10.324 ms
info:    ┗do_encode: min=1.51 ms, median=2.618 ms, max=12.342 ms, 99th percentile=10.322 ms
info:      ┣encode(simple_video_stream): min=1.44 ms, median=2.561 ms, max=11.905 ms, 99th percentile=9.03 ms
info:      ┗send_packet: min=0.006 ms, median=0.053 ms, max=9.857 ms, 99th percentile=0.451 ms, 0.912037 calls per parent call
info: =================================================
info: == Profiler Time Between Calls ==================
info: obs_hotkey_thread(25 ms): min=25.139 ms, median=25.908 ms, max=40.032 ms, 8.65009% within ±2% of 25 ms (0% lower, 91.3499% higher)
info: obs_graphics_thread(33.3333 ms): min=6.337 ms, median=33.334 ms, max=47.897 ms, 98.7496% within ±2% of 33.333 ms (0.636045% lower, 0.614362% higher)
info: =================================================
info: Number of memory leaks: 0


With regular  user mode, it's like this:

Code: [Select]
admin2@Kelly-PC:~$obs
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/locale/en-GB.ini
debug: Attempted path: /usr/share/obs/obs-studio/locale/en-GB.ini
info: Using preferred locale 'en-GB'
debug: Attempted path: share/obs/obs-studio/themes
debug: Attempted path: /usr/share/obs/obs-studio/themes
debug: Attempted path: share/obs/obs-studio/themes/Yami.qss
debug: Attempted path: /usr/share/obs/obs-studio/themes/Yami.qss
info: Platform: Wayland
info: CPU Name: Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz
info: CPU Speed: 3199.994MHz
info: Physical Cores: 4, Logical Cores: 4
info: Physical Memory: 7841MB Total, 4599MB Free
info: Kernel Version: Linux 6.9.2-zen1-1-zen
info: Distribution: "Artix Linux" Unknown
info: Desktop Environment: KDE
info: Session Type: wayland
info: Qt Version: 6.7.1 (runtime), 6.7.0 (compiled)
info: Portable mode: false
info: OBS 30.1.2-1 (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
info: Loading up OpenGL on adapter Intel Mesa Intel(R) HD Graphics 530 (SKL GT2)
info: OpenGL loaded successfully, version 4.6 (Core Profile) Mesa 24.1.1-arch1.1, shading language 4.60
info: ---------------------------------
info: video settings reset:
        base resolution:   1600x900
        output resolution: 1280x720
        downscale filter:  Bicubic
        fps:               60/1
        format:            NV12
        YUV mode:          Rec. 709/Partial
info: NV12 texture support enabled
info: P010 texture support not available
info: Audio monitoring device:
        name: Default
        id: default
info: ---------------------------------
warning: Failed to load 'en-US' text for module: 'decklink-captions.so'
warning: Failed to load 'en-US' text for module: 'decklink-output-ui.so'
libDeckLinkAPI.so: cannot open shared object file: No such file or directory
warning: A DeckLink iterator could not be created.  The DeckLink drivers may not be installed
warning: Failed to initialize module 'decklink.so'
info: [pipewire] Available captures:
info: [pipewire]     - Desktop capture
info: [pipewire]     - Window capture
warning: Failed to load 'en-GB' text for module: 'linux-vkcapture.so'
info: [linux-vkcapture] plugin loaded successfully (version 1.5.0)
info: VAAPI: API version 1.21
info: FFmpeg VAAPI H264 encoding supported
info: FFmpeg VAAPI AV1 encoding not supported
info: FFmpeg VAAPI HEVC encoding supported
info: ---------------------------------
info:   Loaded Modules:
info:     text-freetype2.so
info:     rtmp-services.so
info:     obs-x264.so
info:     obs-webrtc.so
info:     obs-vst.so
info:     obs-transitions.so
info:     obs-qsv11.so
info:     obs-outputs.so
info:     obs-libfdk.so
info:     obs-filters.so
info:     obs-ffmpeg.so
info:     linux-vkcapture.so
info:     linux-v4l2.so
info:     linux-pulseaudio.so
info:     linux-pipewire.so
info:     linux-jack.so
info:     linux-capture.so
info:     linux-alsa.so
info:     image-source.so
info:     frontend-tools.so
info:     decklink-output-ui.so
info:     decklink-captions.so
info: ---------------------------------
warning: QWidget::setTabOrder: 'first' and 'second' must be in the same window
info: ==== Startup complete ===============================================
info: All scene data cleared
info: ------------------------------------------------
info: pulse-input: Server name: 'PulseAudio (on PipeWire 1.0.7) 15.0.0'
info: pulse-input: Audio format: s32le, 48000 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_output.pci-0000_00_1f.3.analog-stereo.monitor' (default)
info: [Loaded global audio device]: 'Desktop Audio'
info: pulse-input: Server name: 'PulseAudio (on PipeWire 1.0.7) 15.0.0'
info: pulse-input: Audio format: s32le, 48000 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_output.pci-0000_00_1f.3.analog-stereo.monitor' (default)
info: [Loaded global audio device]: 'Mic/Aux'
info: PipeWire initialized
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
info: [pipewire] Asking for desktop
info: adding 21 milliseconds of audio buffering, total audio buffering is now 21 milliseconds (source: Desktop Audio)

warning: [pipewire] Failed to start screencast, denied or cancelled by user
info: PipeWire initialized
info: [pipewire] Screencast session created
info: [pipewire] Asking for desktop
warning: [pipewire] Failed to start screencast, denied or cancelled by user
info: PipeWire initialized
info: [pipewire] Screencast session created
info: [pipewire] Asking for desktop
warning: [pipewire] Failed to start screencast, denied or cancelled by user
info: PipeWire initialized
info: [pipewire] Screencast session created
info: [pipewire] Asking for desktop
warning: [pipewire] Failed to start screencast, denied or cancelled by user
info: PipeWire initialized
info: [pipewire] Screencast session created
info: [pipewire] Asking for desktop
warning: [pipewire] Failed to start screencast, denied or cancelled by user
info: PipeWire initialized
info: [pipewire] Screencast session created
info: [pipewire] Asking for desktop
warning: [pipewire] Failed to start screencast, denied or cancelled by user
info: User Removed source 'Screen Capture (PipeWire)' (pipewire-desktop-capture-source) from scene 'Scene'
info: ==== Shutting down ==================================================
info: pulse-input: Stopped recording from 'alsa_output.pci-0000_00_1f.3.analog-stereo.monitor'
info: pulse-input: Got 7020 packets with 8424000 frames
info: pulse-input: Stopped recording from 'alsa_output.pci-0000_00_1f.3.analog-stereo.monitor'
info: pulse-input: Got 7015 packets with 8418000 frames
info: All scene data cleared
info: ------------------------------------------------
info: [linux-vkcapture] plugin unloaded
info: [Scripting] Total detached callbacks: 0
info: Freeing OBS context data
info: == Profiler Results =============================
info: run_program_init: 1222.57 ms
info:  ┣OBSApp::AppInit: 12.081 ms
info:  ┃ ┗OBSApp::InitLocale: 5.192 ms
info:  ┗OBSApp::OBSInit: 1026.58 ms
info:    ┣obs_startup: 5.959 ms
info:    ┗OBSBasic::OBSInit: 953.698 ms
info:      ┣OBSBasic::InitBasicConfig: 0.15 ms
info:      ┣OBSBasic::ResetAudio: 0.463 ms
info:      ┣OBSBasic::ResetVideo: 103.591 ms
info:      ┃ ┗obs_init_graphics: 95.018 ms
info:      ┃   ┗shader compilation: 53.5 ms
info:      ┣OBSBasic::InitOBSCallbacks: 0.004 ms
info:      ┣OBSBasic::InitHotkeys: 0.028 ms
info:      ┣obs_load_all_modules2: 687.656 ms
info:      ┃ ┣obs_init_module(decklink-captions.so): 0 ms
info:      ┃ ┣obs_init_module(decklink-output-ui.so): 0.01 ms
info:      ┃ ┣obs_init_module(decklink.so): 0.431 ms
info:      ┃ ┣obs_init_module(frontend-tools.so): 72.825 ms
info:      ┃ ┣obs_init_module(image-source.so): 0.039 ms
info:      ┃ ┣obs_init_module(linux-alsa.so): 0.005 ms
info:      ┃ ┣obs_init_module(linux-capture.so): 0.001 ms
info:      ┃ ┣obs_init_module(linux-jack.so): 0.01 ms
info:      ┃ ┣obs_init_module(linux-pipewire.so): 29.129 ms
info:      ┃ ┣obs_init_module(linux-pulseaudio.so): 0.009 ms
info:      ┃ ┣obs_init_module(linux-v4l2.so): 18.398 ms
info:      ┃ ┣obs_init_module(linux-vkcapture.so): 0.269 ms
info:      ┃ ┣obs_init_module(obs-ffmpeg.so): 27.13 ms
info:      ┃ ┃ ┗nvenc_check: 0.826 ms
info:      ┃ ┣obs_init_module(obs-filters.so): 0.059 ms
info:      ┃ ┣obs_init_module(obs-libfdk.so): 0.003 ms
info:      ┃ ┣obs_init_module(obs-outputs.so): 0.009 ms
info:      ┃ ┣obs_init_module(obs-qsv11.so): 4.175 ms
info:      ┃ ┣obs_init_module(obs-transitions.so): 0.017 ms
info:      ┃ ┣obs_init_module(obs-vst.so): 0.009 ms
info:      ┃ ┣obs_init_module(obs-webrtc.so): 0.008 ms
info:      ┃ ┣obs_init_module(obs-x264.so): 0.005 ms
info:      ┃ ┣obs_init_module(rtmp-services.so): 2.711 ms
info:      ┃ ┗obs_init_module(text-freetype2.so): 0.038 ms
info:      ┣OBSBasic::InitService: 3.759 ms
info:      ┣OBSBasic::ResetOutputs: 1 ms
info:      ┣OBSBasic::CreateHotkeys: 0.107 ms
info:      ┣OBSBasic::InitPrimitives: 0.251 ms
info:      ┗OBSBasic::Load: 75.223 ms
info: obs_hotkey_thread(25 ms): min=0 ms, median=0.001 ms, max=0.167 ms, 99th percentile=0.005 ms, 100% below 25 ms
info: audio_thread(Audio): min=0.009 ms, median=0.126 ms, max=3.181 ms, 99th percentile=0.481 ms
info: obs_graphics_thread(16.6667 ms): min=0.025 ms, median=0.848 ms, max=163.338 ms, 99th percentile=1.703 ms, 99.9716% below 16.667 ms
info:  ┣tick_sources: min=0 ms, median=0.015 ms, max=0.947 ms, 99th percentile=0.055 ms
info:  ┣output_frame: min=0.013 ms, median=0.276 ms, max=5.335 ms, 99th percentile=0.427 ms
info:  ┃ ┗gs_context(video->graphics): min=0.013 ms, median=0.275 ms, max=5.335 ms, 99th percentile=0.426 ms
info:  ┃   ┣render_video: min=0.002 ms, median=0.063 ms, max=0.454 ms, 99th percentile=0.149 ms
info:  ┃   ┃ ┗render_main_texture: min=0.002 ms, median=0.056 ms, max=0.438 ms, 99th percentile=0.132 ms
info:  ┃   ┗gs_flush: min=0.003 ms, median=0.18 ms, max=1.431 ms, 99th percentile=0.272 ms
info:  ┗render_displays: min=0.005 ms, median=0.473 ms, max=154.329 ms, 99th percentile=1.289 ms
info: =================================================
info: == Profiler Time Between Calls ==================
info: obs_hotkey_thread(25 ms): min=25.037 ms, median=25.142 ms, max=28.82 ms, 99.6152% within ±2% of 25 ms (0% lower, 0.384835% higher)
info: obs_graphics_thread(16.6667 ms): min=3.619 ms, median=16.668 ms, max=163.346 ms, 99.3949% within ±2% of 16.667 ms (0.302543% lower, 0.302543% higher)
info: =================================================
info: Number of memory leaks: 0

Can anyone help me with this and explain anything I did wrong. I already searched up the arch wiki for this too.
I also use wireplumber instead of pipewire-media-session. I've read some users got success with pipewire due to that, but I don't want to use it because it's deprecated.


Not sure if it leads to anything but I also remembered that I'm not in the video group. Do I have to add myself for this to work?
Many thanks for your help.

Re: OBS studio not working in pipewire with wireplumber in Plasma.

Reply #1
Can you run in a terminal:
Code: [Select]
env -u WAYLAND_DISPLAY obs

It should force Xorg mode without root.

This won't let you screencap native Wayland apps though. We need to know how Pipewire is set up on your machine; it seems it's a bit funky with KDE Plasma and requires some specific ordering to work correctly.

Re: OBS studio not working in pipewire with wireplumber in Plasma.

Reply #2
@capezotte I'll try that and reply to you when I can soon and how do I provide information on Pipewire? What do I need to do to get the necessary info?

 

Re: OBS studio not working in pipewire with wireplumber in Plasma.

Reply #3
@capezotte I just tried your suggestion. It didn't work..

Here's the log.

Code: [Select]
admin2@Kelly-PC:~$ env -u WAYLAND_DISPLAY obs
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/locale/en-GB.ini
debug: Attempted path: /usr/share/obs/obs-studio/locale/en-GB.ini
info: Using preferred locale 'en-GB'
debug: Attempted path: share/obs/obs-studio/themes
debug: Attempted path: /usr/share/obs/obs-studio/themes
debug: Attempted path: share/obs/obs-studio/themes/Yami.qss
debug: Attempted path: /usr/share/obs/obs-studio/themes/Yami.qss
info: Platform: Wayland
info: CPU Name: Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz
info: CPU Speed: 2199.939MHz
info: Physical Cores: 4, Logical Cores: 4
info: Physical Memory: 7841MB Total, 4341MB Free
info: Kernel Version: Linux 6.9.2-zen1-1-zen
info: Distribution: "Artix Linux" Unknown
info: Desktop Environment: KDE
info: Session Type: wayland
info: Qt Version: 6.7.1 (runtime), 6.7.0 (compiled)
info: Portable mode: false
info: OBS 30.1.2-1 (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
info: Loading up OpenGL on adapter Intel Mesa Intel(R) HD Graphics 530 (SKL GT2)
info: OpenGL loaded successfully, version 4.6 (Core Profile) Mesa 24.1.1-arch1.1, shading language 4.60
info: ---------------------------------
info: video settings reset:
        base resolution:   1600x900
        output resolution: 1280x720
        downscale filter:  Bicubic
        fps:               60/1
        format:            NV12
        YUV mode:          Rec. 709/Partial
info: NV12 texture support enabled
info: P010 texture support not available
info: Audio monitoring device:
        name: Default
        id: default
info: ---------------------------------
warning: Failed to load 'en-US' text for module: 'decklink-captions.so'
warning: Failed to load 'en-US' text for module: 'decklink-output-ui.so'
libDeckLinkAPI.so: cannot open shared object file: No such file or directory
warning: A DeckLink iterator could not be created.  The DeckLink drivers may not be installed
warning: Failed to initialize module 'decklink.so'
info: [pipewire] Available captures:
info: [pipewire]     - Desktop capture
info: [pipewire]     - Window capture
warning: Failed to load 'en-GB' text for module: 'linux-vkcapture.so'
info: [linux-vkcapture] plugin loaded successfully (version 1.5.0)
info: VAAPI: API version 1.21
info: FFmpeg VAAPI H264 encoding supported
info: FFmpeg VAAPI AV1 encoding not supported
info: FFmpeg VAAPI HEVC encoding supported
info: ---------------------------------
info:   Loaded Modules:
info:     text-freetype2.so
info:     rtmp-services.so
info:     obs-x264.so
info:     obs-webrtc.so
info:     obs-vst.so
info:     obs-transitions.so
info:     obs-qsv11.so
info:     obs-outputs.so
info:     obs-libfdk.so
info:     obs-filters.so
info:     obs-ffmpeg.so
info:     linux-vkcapture.so
info:     linux-v4l2.so
info:     linux-pulseaudio.so
info:     linux-pipewire.so
info:     linux-jack.so
info:     linux-capture.so
info:     linux-alsa.so
info:     image-source.so
info:     frontend-tools.so
info:     decklink-output-ui.so
info:     decklink-captions.so
info: ---------------------------------
warning: QWidget::setTabOrder: 'first' and 'second' must be in the same window
info: ==== Startup complete ===============================================
info: All scene data cleared
info: ------------------------------------------------
info: pulse-input: Server name: 'PulseAudio (on PipeWire 1.0.7) 15.0.0'
info: pulse-input: Audio format: s32le, 48000 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_output.pci-0000_00_1f.3.analog-stereo.monitor' (default)
info: [Loaded global audio device]: 'Desktop Audio'
info: pulse-input: Server name: 'PulseAudio (on PipeWire 1.0.7) 15.0.0'
info: pulse-input: Audio format: s32le, 48000 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_output.pci-0000_00_1f.3.analog-stereo.monitor' (default)
info: [Loaded global audio device]: 'Mic/Aux'
info: Switched to scene 'Scene'
info: ------------------------------------------------
info: Loaded scenes:
info: - scene 'Scene':
info: ------------------------------------------------
info: adding 21 milliseconds of audio buffering, total audio buffering is now 21 milliseconds (source: Desktop Audio)

info: adding 64 milliseconds of audio buffering, total audio buffering is now 85 milliseconds (source: Mic/Aux)

warning: This plugin supports grabbing the mouse only for popup windows
warning: This plugin supports grabbing the mouse only for popup windows
info: ==== Shutting down ==================================================
info: pulse-input: Stopped recording from 'alsa_output.pci-0000_00_1f.3.analog-stereo.monitor'
info: pulse-input: Got 1887 packets with 2264400 frames
info: pulse-input: Stopped recording from 'alsa_output.pci-0000_00_1f.3.analog-stereo.monitor'
info: pulse-input: Got 1885 packets with 2262000 frames
info: All scene data cleared
info: ------------------------------------------------
info: [linux-vkcapture] plugin unloaded
info: [Scripting] Total detached callbacks: 0
info: Freeing OBS context data
info: == Profiler Results =============================
info: run_program_init: 1210.06 ms
info:  ┣OBSApp::AppInit: 12.245 ms
info:  ┃ ┗OBSApp::InitLocale: 3.954 ms
info:  ┗OBSApp::OBSInit: 983.499 ms
info:    ┣obs_startup: 5.625 ms
info:    ┗OBSBasic::OBSInit: 906.887 ms
info:      ┣OBSBasic::InitBasicConfig: 0.182 ms
info:      ┣OBSBasic::ResetAudio: 0.444 ms
info:      ┣OBSBasic::ResetVideo: 98.644 ms
info:      ┃ ┗obs_init_graphics: 89.99 ms
info:      ┃   ┗shader compilation: 52.978 ms
info:      ┣OBSBasic::InitOBSCallbacks: 0.003 ms
info:      ┣OBSBasic::InitHotkeys: 0.045 ms
info:      ┣obs_load_all_modules2: 653.358 ms
info:      ┃ ┣obs_init_module(decklink-captions.so): 0 ms
info:      ┃ ┣obs_init_module(decklink-output-ui.so): 0.01 ms
info:      ┃ ┣obs_init_module(decklink.so): 0.245 ms
info:      ┃ ┣obs_init_module(frontend-tools.so): 64.449 ms
info:      ┃ ┣obs_init_module(image-source.so): 0.027 ms
info:      ┃ ┣obs_init_module(linux-alsa.so): 0.006 ms
info:      ┃ ┣obs_init_module(linux-capture.so): 0.001 ms
info:      ┃ ┣obs_init_module(linux-jack.so): 0.009 ms
info:      ┃ ┣obs_init_module(linux-pipewire.so): 30.862 ms
info:      ┃ ┣obs_init_module(linux-pulseaudio.so): 0.004 ms
info:      ┃ ┣obs_init_module(linux-v4l2.so): 18.54 ms
info:      ┃ ┣obs_init_module(linux-vkcapture.so): 0.112 ms
info:      ┃ ┣obs_init_module(obs-ffmpeg.so): 29.112 ms
info:      ┃ ┃ ┗nvenc_check: 0.691 ms
info:      ┃ ┣obs_init_module(obs-filters.so): 0.054 ms
info:      ┃ ┣obs_init_module(obs-libfdk.so): 0.003 ms
info:      ┃ ┣obs_init_module(obs-outputs.so): 0.013 ms
info:      ┃ ┣obs_init_module(obs-qsv11.so): 6.288 ms
info:      ┃ ┣obs_init_module(obs-transitions.so): 0.016 ms
info:      ┃ ┣obs_init_module(obs-vst.so): 0.009 ms
info:      ┃ ┣obs_init_module(obs-webrtc.so): 0.008 ms
info:      ┃ ┣obs_init_module(obs-x264.so): 0.004 ms
info:      ┃ ┣obs_init_module(rtmp-services.so): 1.87 ms
info:      ┃ ┗obs_init_module(text-freetype2.so): 0.026 ms
info:      ┣OBSBasic::InitService: 3.515 ms
info:      ┣OBSBasic::ResetOutputs: 1.325 ms
info:      ┣OBSBasic::CreateHotkeys: 0.086 ms
info:      ┣OBSBasic::InitPrimitives: 0.166 ms
info:      ┗OBSBasic::Load: 65.198 ms
info: obs_hotkey_thread(25 ms): min=0 ms, median=0.001 ms, max=0.024 ms, 99th percentile=0.005 ms, 100% below 25 ms
info: audio_thread(Audio): min=0.009 ms, median=0.126 ms, max=2.999 ms, 99th percentile=0.34 ms
info: obs_graphics_thread(16.6667 ms): min=0.022 ms, median=0.724 ms, max=111.975 ms, 99th percentile=1.293 ms, 99.9306% below 16.667 ms
info:  ┣tick_sources: min=0 ms, median=0.013 ms, max=0.1 ms, 99th percentile=0.024 ms
info:  ┣output_frame: min=0.009 ms, median=0.227 ms, max=2.308 ms, 99th percentile=0.429 ms
info:  ┃ ┗gs_context(video->graphics): min=0.009 ms, median=0.226 ms, max=2.303 ms, 99th percentile=0.428 ms
info:  ┃   ┣render_video: min=0.002 ms, median=0.051 ms, max=0.255 ms, 99th percentile=0.089 ms
info:  ┃   ┃ ┗render_main_texture: min=0.002 ms, median=0.044 ms, max=0.247 ms, 99th percentile=0.077 ms
info:  ┃   ┗gs_flush: min=0.001 ms, median=0.146 ms, max=1.648 ms, 99th percentile=0.337 ms
info:  ┗render_displays: min=0.005 ms, median=0.416 ms, max=111.664 ms, 99th percentile=0.929 ms
info: =================================================
info: == Profiler Time Between Calls ==================
info: obs_hotkey_thread(25 ms): min=25.045 ms, median=25.133 ms, max=27.974 ms, 99.4789% within ±2% of 25 ms (0% lower, 0.521105% higher)
info: obs_graphics_thread(16.6667 ms): min=4.677 ms, median=16.667 ms, max=111.989 ms, 99.2361% within ±2% of 16.667 ms (0.381944% lower, 0.381944% higher)
info: =================================================
info: Number of memory leaks: 0

Re: OBS studio not working in pipewire with wireplumber in Plasma.

Reply #4
@capezotte I'll try that and reply to you when I can soon and how do I provide information on Pipewire? What do I need to do to get the necessary info?

What guides did you follow? Have you set up artix-pipewire-launcher to run upon startup?

See this topic: https://forum.artixlinux.org/index.php/topic,6622.msg40376.html#msg40376

@capezotte I just tried your suggestion. It didn't work..

Here's the log.

[snip]

Try env -u WAYLAND_DISPLAY XDG_SESSION_TYPE=x11 obs

(forgot the XDG_SESSION_TYPE bit)

Re: OBS studio not working in pipewire with wireplumber in Plasma.

Reply #5
@capezotte I tried the env variable and yes now Window cpature Xcomposite and XSHM Screen capture are there and it's working. By working I mean the obs screen mirroring several times is shown, I have no idea how to make it record to the outside screen and apps which probably won't because I don't use x11 in the first place.  But since this is only running on X11 how do you make it run through wayland? And pipewire?

Also screen capture XSHM only shows my cursor and ablack screen but window capture Xcomposite works.

Also, there's an artix package for pipewire? Wow.
But I don't use it and instead my pipewire.conf is like this, with `pipwire &` as an autostart command:

Code: [Select]
context.exec = [
    { path = "/usr/bin/wireplumber" args = "" }
    { path = "/usr/bin/pipewire" args = "-c pipewire-pulse.conf"}
    #  condition = [ { exec.pipewire-pulse = null } { exec.pipewire-pulse = true } ] }
]

Is this okay? Or should I install the package?

Edit: I think pipewire pulse is working, here's pactl:
Code: [Select]
admin2@Kelly-PC:~$ pactl info
Server String: /run/user/1000/pulse/native
Library Protocol Version: 35
Server Protocol Version: 35
Is Local: yes
Client Index: 1482
Tile Size: 65472
User Name: admin2
Host Name: Kelly-PC
Server Name: PulseAudio (on PipeWire 1.0.7)
Server Version: 15.0.0
Default Sample Specification: float32le 2ch 48000Hz
Default Channel Map: front-left,front-right
Default Sink: alsa_output.pci-0000_00_1f.3.analog-stereo
Default Source: alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
Cookie: 83ad:f0cd

Further Edit:

Here's wpctl info:

Code: [Select]
admin2@Kelly-PC:~$ wpctl status
PipeWire 'pipewire-0' [1.0.7, admin2@Kelly-PC, cookie:2209214669]
 └─ Clients:
        31. xdg-desktop-portal                  [1.0.7, admin2@Kelly-PC, pid:613]
        32. WirePlumber                         [1.0.7, admin2@Kelly-PC, pid:848]
        33. pipewire                            [1.0.7, admin2@Kelly-PC, pid:851]
        34. xdg-desktop-portal                  [1.0.7, admin2@Kelly-PC, pid:10031]
        48. WirePlumber [export]                [1.0.7, admin2@Kelly-PC, pid:848]
        62. Chromium input                      [1.0.7, admin2@Kelly-PC, pid:309]
        64. Firefox                             [1.0.7, admin2@Kelly-PC, pid:10225]
        66. kwin_wayland                        [1.0.7, admin2@Kelly-PC, pid:10022]
        73. Firefox                             [1.0.7, admin2@Kelly-PC, pid:10225]
        77. Dolphin                             [1.0.7, admin2@Kelly-PC, pid:13232]
        80. Plasma PA                           [1.0.7, admin2@Kelly-PC, pid:10202]
        82. OBS                                 [1.0.7, admin2@Kelly-PC, pid:21045]
        83. plasmashell                         [1.0.7, admin2@Kelly-PC, pid:10202]
        84. libcanberra                         [1.0.7, admin2@Kelly-PC, pid:10202]
        86. wpctl                               [1.0.7, admin2@Kelly-PC, pid:26166]

Audio
 ├─ Devices:
 │      58. Built-in Audio                      [alsa]
 │ 
 ├─ Sinks:
 │  *   55. Built-in Audio Analog Stereo        [vol: 1.00]
 │ 
 ├─ Sources:
 │      44. Built-in Audio Analog Stereo        [vol: 1.00]
 │ 
 ├─ Filters:
 │ 
 └─ Streams:
        71. OBS                                                        
             65. input_FL        < ALC3234 Analog:monitor_FL    [active]
             70. input_FR        < ALC3234 Analog:monitor_FR    [active]
             74. monitor_FR    
             81. monitor_FL    
        75. OBS                                                        
             42. monitor_FR    
             63. input_FR        < ALC3234 Analog:monitor_FR    [active]
             67. monitor_FL    
             72. input_FL        < ALC3234 Analog:monitor_FL    [active]

Video
 ├─ Devices:
 │ 
 ├─ Sinks:
 │ 
 ├─ Sources:
 │ 
 ├─ Filters:
 │ 
 └─ Streams:

Settings
 └─ Default Configured Devices:

Re: OBS studio not working in pipewire with wireplumber in Plasma.

Reply #6
@capezotte  Don't know if you remember this thread still, but I fixed the problem by following this thread's solution

Unfortunately it didn't work fully although it does solve obs's screen sharing problem. Pipewire crashed while running obs and closing it and obs would get stuck while running it in console. However I fixed it myself via editing /etc/pipewire/pipewire.conf(copy from /usr/share/pipewire/pipewire.conf if not found) in the last section:

Code: [Select]
context.exec = [

    #{   path = <program-name>
    #    ( args = "<arguments>" )
    #    ( condition = [ { <key> = <value> ... } ... ] )
    #}
    #
    # Execute the given program with arguments.
    # If condition is given, the program is executed only when the context
    # properties all match the match rules.
    #
    # You can optionally start the session manager here,
    # but it is better to start it as a systemd service.
    # Run the session manager with -h for options.
    #
    #{ path = "/usr/bin/pipewire-media-session" args = ""
    #  condition = [ { exec.session-manager = null } { exec.session-manager = true } ] }
    #
    # You can optionally start the pulseaudio-server here as well
    # but it is better to start it as a systemd service.
    # It can be interesting to start another daemon here that listens
    # on another address with the -a option (eg. -a tcp:4713).
    #
    { path = "/usr/bin/pipewire-pulse" args = ""}
    #{ path = "/usr/bin/wireplumber" args = "" }
   # { path = "/usr/bin/pipewire" args = "-c pipewire-pulse.conf"
    condition = [ { exec.pipewire-pulse = null } { exec.pipewire-pulse = true } ] }
]

Marking as solved..
EDIT!(7/4/2024)= adding in some changes to the last two lines, because I saw two instances of pipewire happening once, looking into properties, one was "sleeping" and was executed from the last second argument, and the other was from the "pipewire &" startup script I wrote, which was active. With this change, that hopefully no longer happens. Even though it didn't happen with the line uncommented, ever. Probably a rare occurrence, but that shouldn't ever happen.  Although, I don't know if one can make use of the condition rule there. I don't understand what it does.