Other Screen cast not working with OBS-studio in Hyprland "warning: [pipewire] Failed to start screencast, denied or cancelled by user"

Hello. I am new in FreeBSD and also BSD-based sytems too...

I have installed OBS-Studio, XWayland, wlroots, Hyprland and also `xdg-desktop-portal-hyprland` from `pkg install`.
But after trying to create a `Screen Capture (PipeWire)` source and choose the first my monitor - I have nothing.
And when I do it, this warning appears in the terminal.
```
info: PipeWire initialized
info: User added source 'Screen Capture (PipeWire)' (pipewire-screen-capture-source) to scene 'Scene'
info: [pipewire] Screencast session created
info: [pipewire] Asking for monitor and window
warning: [pipewire] Failed to start screencast, denied or cancelled by user
```
But I have NOT denied or cancelled screencast.
How to solve it?
 

Attachments

  • 20241027_07h24m37s_grim.png
    20241027_07h24m37s_grim.png
    116.4 KB · Views: 30
  • 20241027_07h24m46s_grim.png
    20241027_07h24m46s_grim.png
    97.6 KB · Views: 25
Hi Mate

im running obs studio on wayland using dwl on freebsd 14.1 p5

do you have dbus enabled in your rc.conf

Code:
/etc/rc.conf

Code:
dbus_enable="YES"

i use Wayland output (dmabuf)

20241027_14h41m57s_grim.png


20241027_14h42m10s_grim.png
 
do you have the following packages installed

Code:
seatd wayland-protocols wayland wlroots qt5-wayland

XWayland is for using X applications on wayland
 
On swayfx, this is what I do:
First I launch pipewire, then I launch /usr/local/libexec/xdg-desktop-portal-wlr.
Once all of this is done, I launch obs and use pipewire for screen capture.
 
On swayfx, this is what I do:
First I launch pipewire, then I launch /usr/local/libexec/xdg-desktop-portal-wlr.
Once all of this is done, I launch obs and use pipewire for screen capture.
I use pipewire too.
Btw I just tried to launch pipewire from term and see some errors, maybe it can be useful..
Code:
➜  ~ pipewire
N 15:30:16.936989 wp-internal-comp-l ../lib/wp/private/internal-comp-loader.c:945:wp_internal_comp_loader_load: Loading profile 'main'
N 15:30:16.954683          wp-device ../lib/wp/device.c:631:wp_spa_device_new_from_spa_factory: SPA handle 'api.alsa.enum.udev' could not be loaded; is it installed?
N 15:30:16.954699         s-monitors alsa.lua:324:createMonitor: PipeWire's ALSA SPA plugin is missing or broken. Sound cards will not be supported
N 15:30:16.955657 wp-internal-comp-l ../lib/wp/private/internal-comp-loader.c:590:on_component_loaded: <WpCore:0x2d8dce680030> optional component 'support.logind [module: libwireplumber-module-logind]' failed to load: Failed to locate module libwireplumber-module-logind
N 15:30:16.955667 wp-internal-comp-l ../lib/wp/private/internal-comp-loader.c:642:wp_component_array_load_task_execute_step: <WpCore:0x2d8dce680030> skipping component 'monitor.bluez.seat-monitoring [virtual]' because some of its dependencies were not loaded
N 15:30:16.956152          wp-device ../lib/wp/device.c:631:wp_spa_device_new_from_spa_factory: SPA handle 'api.bluez5.enum.dbus' could not be loaded; is it installed?
N 15:30:16.956163         s-monitors bluez.lua:386:createMonitor: PipeWire's BlueZ SPA plugin is missing or broken. Bluetooth devices will not be supported.
N 15:30:16.956496          wp-device ../lib/wp/device.c:631:wp_spa_device_new_from_spa_factory: SPA handle 'api.bluez5.midi.enum' could not be loaded; is it installed?
N 15:30:16.956506         s-monitors bluez-midi.lua:95:createMonitor: PipeWire's BlueZ MIDI SPA missing or broken. Bluetooth not supported.
E 15:30:16.956553        pw.resource ../src/pipewire/resource.c:255:pw_resource_errorf_id: can't create node: No such file or directory
W 15:30:16.956559            wp-node ../lib/wp/node.c:913:wp_impl_node_new_from_pw_factory: failed to create node from factory 'spa-node-factory'
N 15:30:16.956565         s-monitors bluez-midi.lua:130:createServers: Failed to create BLE MIDI server.
N 15:30:16.961530          wp-device ../lib/wp/device.c:631:wp_spa_device_new_from_spa_factory: SPA handle 'api.libcamera.enum.manager' could not be loaded; is it installed?
N 15:30:16.961541 s-monitors-libcame enumerate-device.lua:30:chunk: PipeWire's libcamera SPA plugin is missing or broken. Some camera types may not be supported.
 
then I launch /usr/local/libexec/xdg-desktop-portal-wlr.
Also. Just tried to launch it, and error said that some file just not exist.
Code:
➜  ~ doas /usr/local/libexec/xdg-desktop-portal-hyprland
[LOG] Initializing xdph...
[CRITICAL] Couldn't create the dbus connection ([org.freedesktop.DBus.Error.FileNotFound] Failed to open bus (No such file or directory))
 
hi mate

i dont manually start pipewire
you shouldnt need to

i found those errors as well with pipewire

this is how i start dwl

Code:
exec dbus-launch --exit-with-session dwl -s 'dwlb -font "monospace:size=16"' 2>/dev/null

can you start hyperland like this exec dbus-launch --exit-with-session
and see if that resolves the issue

Code:
exec dbus-launch --exit-with-session hyperland

i use a script called dwl-start to start dwl
i dont use a gui login manager

Code:
#!/bin/sh

# start dwl with dbus
exec dbus-launch --exit-with-session dwl -s 'dwlb -font "monospace:size=16"' 2>/dev/null


Also what version of Freebsd are you using

freebsd 14.1 automatically creates the XDG_RUNTIME_DIR and exports it
in previous version of freebsd you had to manually create the directory and export it in your shell

Code:
printenv

Code:
XDG_RUNTIME_DIR=/var/run/xdg/djwilcox
 
Don't run them as root, all of them should be on the same user, with the same dbus address.
The advantage of running pipewire on the foreground is to be able to see what is connecting directly.
So you can see if something happen when obs start.
Also does the screen capture work with a web browser ? If it does not, then the issue is not from obs.
 
You have to, if they are not started (in my case, pipewire is not started, so xdg-desktop-portal-wlr does not start, while xdg-desktop-portal-gtk does start).
Anyways, by looking at your screenshot, it appears that you use the wlr plugins for obs: multimedia/wlrobs.
This plugin is no longer necessary if you have a correct pipewire setup.
 
your right im using wlrobs packages

even with pipewire and the xdg-desktop-portal-wl started

Code:
pipewire &
/usr/local/libexec/xdg-desktop-portal-wlr &

the only 2 options i have for Wayland are

Wayland output (dmabuf)
Wayland output (scpy)

Video capture device (pipewire)
is for a camera not a screen capture

i did actually mention in a forum post a while ago if pipewire worked for screen capture
at that time it didnt

has something changed in the meantime

This plugin is no longer necessary if you have a correct pipewire setup.

i played around with pipewire and wireplumber on freebsd and a linux jail
but didnt have any luck

do you have another option listed for wayland screencapture in obs

maybe i dont have option because im using wlroots

obs log

Code:
[pipewire] No captures available


20241027_20h48m52s_grim.png
 
im using dwl which a wlroots wayland compositor

different wlroots compositors implement different wayland protocols
so the reason i dont have a pipewire screencapture option in obs may be because of the compositor im using

just checked with labwc
same issue no pipewire screencapture option in obs
 
start pipewire

Code:
daemon -f pipewire

wpctl pipewire status

Code:
wpctl status

Code:
PipeWire 'pipewire-0' [1.2.5, djwilcox@pollux, cookie:3194311115]
 └─ Clients:
        33. pipewire                            [1.2.5, djwilcox@pollux, pid:55986]
        34. WirePlumber                         [1.2.5, djwilcox@pollux, pid:56180]
        47. WirePlumber [export]                [1.2.5, djwilcox@pollux, pid:56180]
        48. wpctl                               [1.2.5, djwilcox@pollux, pid:58294]

Audio
 ├─ Devices:
 │
 ├─ Sinks:
 │  *   35. Dummy Output                        [vol: 1.00]
 │
 ├─ Sources:
 │
 ├─ Filters:
 │
 └─ Streams:

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

Settings
 └─ Default Configured Devices:


still no pipewire screen capture option in obs
 
Oh, guys. I know that this is off topic, but After installing PrismLauncher (Minecraft game launcher) and making some changes for opengl/openjdk (i forgot name..) which are recommends after installation in "Notes", I broke obs studio....

Also I tried to reinstall obs by just `pkg delete obs-studio` then `pkg install obs-studio`.
And also AMD GPU drm-kmod..

I don't use my system by root.
Also I use FreeBSD 14.1


Full log:
Code:
➜  ~ obs
debug: Found portal inhibitor
debug: Attempted path: /usr/local/bin/../share/obs/obs-studio/locale/en-US.ini
debug: Attempted path: /usr/local/bin/../share/obs/obs-studio/themes
debug: Attempted path: /usr/local/bin/../share/obs/obs-studio/themes/
warning: Get on org.freedesktop.portal.Settings returned an invalid reply
info: Platform: Wayland
info: CPU Name: AMD Ryzen 5 2600 Six-Core Processor           
info: CPU Speed: 3393.85MHz
info: Physical Cores: 2, Logical Cores: 12
info: Physical Memory: 15850MB Total, 14152MB Free
info: Kernel Version: FreeBSD 14.1-RELEASE
info: Distribution: FreeBSD "14.1"
info: Desktop Environment: Hyprland
info: Session Type: wayland
info: Qt Version: 6.7.3 (runtime), 6.7.3 (compiled)
info: Portable mode: false
info: OBS 30.2.3 (freebsd)
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
error: eglCreateContext failed
error: device_create (GL) failed
error: Failed to initialize video.  Your GPU may not be supported, or your graphics drivers may need to be updated.
info: Freeing OBS context data
info: == Profiler Results =============================
info: run_program_init: 148769 ms
info:  ┣OBSApp::AppInit: 14.708 ms
info:  ┃ ┗OBSApp::InitLocale: 1.144 ms
info:  ┗OBSApp::OBSInit: 187.711 ms
info:    ┣obs_startup: 3.714 ms
info:    ┗OBSBasic::OBSInit: 128.887 ms
info:      ┣OBSBasic::InitBasicConfig: 0.145 ms
info:      ┣OBSBasic::ResetAudio: 0.198 ms
info:      ┗OBSBasic::ResetVideo: 128.337 ms
info:        ┗obs_init_graphics: 128.329 ms
info: obs_hotkey_thread(25 ms): min=0 ms, median=0 ms, max=0.004 ms, 99th percentile=0.001 ms, 100% below 25 ms
info: audio_thread(Audio): min=0.004 ms, median=0.013 ms, max=0.039 ms, 99th percentile=0.023 ms
info: =================================================
info: == Profiler Time Between Calls ==================
info: obs_hotkey_thread(25 ms): min=25.004 ms, median=25.026 ms, max=119.97 ms, 99.9663% within ±2% of 25 ms (0% lower, 0.0337496% higher)
info: =================================================
info: Number of memory leaks: 613
➜  ~
 

Attachments

  • 20241028_04h29m32s_grim.png
    20241028_04h29m32s_grim.png
    430.3 KB · Views: 13
Maybe this info can be useful...
idk how, but i broke minecraft too ha-ha.
 

Attachments

  • 20241028_04h38m40s_grim.png
    20241028_04h38m40s_grim.png
    24.4 KB · Views: 14
Back
Top