emersion / xdg-desktop-portal-wlr

xdg-desktop-portal backend for wlroots
MIT License
579 stars 54 forks source link

Screen sharing in Chromium failing #255

Open jalelegenda opened 1 year ago

jalelegenda commented 1 year ago

OS: Void Linux kernel: 6.0.15_1 WM: sway xdg portal version: 0.6.0

Getting error in Chromium when trying to share screen:

[19442:19442:0116/185100.491249:ERROR:screen_capture_portal_interface.cc(28)] Failed to get a proxy for the portal: Unknown or unsupported transport “disabled” for address “disabled:”
[19442:19442:0116/185100.491278:ERROR:base_capturer_pipewire.cc(77)] ScreenCastPortal failed: 3

rtkit and libpipewire0.2 installed. xdg-desktop-portal* daemons running. flag enabled in Chromium: enable-webrtc-pipewire-capturer Everything set as is explained over at https://wiki.archlinux.org/title/PipeWire#xdg-desktop-portal-wlr (XDG_CURRENT_DESKTOP and WAYLAND_DISPLAY) Screen sharing works on firefox and OBS, only Chromium seems to be failing. Please help me, thank you.

columbarius commented 1 year ago

Which version of chromium are you using? If obs and firefox are working this might be related to a specific libwebrtc version

wellsky-jakov commented 1 year ago

Yeah, hate to be that guy, but after reading the troubleshooting checklist, I fixed my issue. The problem was Chromium was not able to find the dbus bus or socket whatever. For anyone viewing this: I am using greetd login manager which runs a shell script which sets most of the necessary wayland related variables and runs sway. The issue was the script would execute sway directly instead of executing it as a dbus session. I replaced sway $@ with dbus-run-session sway $@. It still would not work. After I added exec dbus-update-activation-environment DISPLAY I3SOCK SWAYSOCK WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=$nameofcompositor to my sway config file like it says in the troubleshooting checklist, the issue was fixed. You can close the issue, thanks :)

columbarius commented 1 year ago

Please retry with xdpw 0.7

mordax7 commented 1 year ago

Issue persists with 0.7. My logs:

Apr 18 15:19:24 xps13-9300 hyprland[2872]: [2872:2872:0418/151924.001218:ERROR:screencast_portal.cc(365)] Failed to start the screen cast session.
Apr 18 15:19:24 xps13-9300 hyprland[2872]: [2872:2872:0418/151924.001247:ERROR:base_capturer_pipewire.cc(81)] ScreenCastPortal failed: 3
Apr 18 15:19:24 xps13-9300 xdg-desktop-portal-wlr[6339]: true
Apr 18 15:19:24 xps13-9300 xdg-desktop-portal-wlr[10730]: true