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
Comments
Updated to the latest version (compiled from 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 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 |
[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
[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 |
More logs from 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 |
an xdph log with |
Off course. Here is the full xdph log. Without Creation of the
|
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 #!/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 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 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 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 |
edit |
info: [pipewire] No captures available Even though 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] |
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 ^: 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… 🤔 |
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. |
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 |
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 |
Hey, I am trying to set up
Hyprland
to work withOBS Studio
throughpipewire
to cast screen, but unfortunately it doesn't work. I am not an expert inpipewire
, but my guess is that it somehow can't create a session. I useGentoo Linux
. Here is thexdgh
version I use:Pipewire and wireplumber versions:
Here is the head of OBS log when I run it on
Hyprland
: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
:Here is the head of OBS log when running it on
gnome
(when usinggnome
the screen recording works perfectly):Here is the output of
wpctl status
when usinggnome
:I assume the problem is not in
pipewire
, but rather inxdgh
, because screen sharing works ongnome
with the samepipewire
installation. Have tried this, with no effectThe text was updated successfully, but these errors were encountered: