hyprwm / xdg-desktop-portal-hyprland

xdg-desktop-portal backend for Hyprland
BSD 3-Clause "New" or "Revised" License
305 stars 48 forks source link

Black screen when trying to screen-share #297

Open patri9ck opened 1 day ago

patri9ck commented 1 day ago

I followed this guide to get screen-sharing to work on Arch Linux: https://gist.github.com/brunoanc/2dea6ddf6974ba4e5d26c3139ffb7580

I used this website from Mozilla to test screen-sharing, although it also did not work on a natively running Discord: https://mozilla.github.io/webrtc-landing/gum_test.html

I tried it on two computers, one with an AMD RX 7800 XT and the other one with an Intel Arc. Both produce the same result.

I installed pipewire, wireplumber, xdg-desktop-portal-hyprland as well xwaylandvideobridge. I also appended exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP to hyprland.conf. There are not other xdg-desktop-portal implementations installed.

The popup window appears, asking for a monitor or a window. The monitors and windows are listed correctly. But after choosing one, the preview in either Chrome or Discord stays black and also the screen-sharing only produces a black image.

systemctl --user status pipewire wireplumber also reports that both services are running, although Wireplumber reports:

default: Failed to get percentage from UPower: org.freedesktop.DBus.Error.NameHasNoOwner
ERROR IPAModule ipa_module.cpp:171 Symbol ipaModuleInfo not found
ERROR IPAModule ipa_module.cpp:291 v4l2-compat.so: IPA module has no valid info

xdg-desktop-portal and xdg-desktop-portal-hyprland are also running fine, although it reports: The cached device pixel ratio value was stale on window update. Please file a QTBUG which explains how to reproduce. I think it is just related to the Qt library.

Also added --ozone-platform-hint=wayland to ~/.config/chrome-flags.conf.

I also followed this troubleshooting guide for the wl-roots implementation: https://github.com/emersion/xdg-desktop-portal-wlr/wiki/%22It-doesn't-work%22-Troubleshooting-Checklist

It says one should run the following script: https://gist.github.com/columbarius/50239ea3c4c70df8f240aa50f88e801a

For me, it does not produce any output.

patri9ck commented 1 day ago

OBS is able to display my screen on the preview. I also tried it on Chromium, it did not work.