You are not logged in.

#1 2021-04-30 11:24:07

no-cheating
Member
From: Poland
Registered: 2016-04-26
Posts: 61

[SOLVED] WebRTC screen sharing not working on Wayland using PipeWire

PipeWire wiki describes how to make screen sharing using WebRTC work on Wayland. I'm using Sway WM (version 1.6) and I cannot make it work neither on Firefox (89.0b6) nor Chromium (90.0.4430.93). Will be glad for any help on making it work.

Setup
  1. I have installed pipewire-media-session package and enabled pipewire-media-session.service user service.

  2. I have installed xdg-portal-desktop and xdg-portal-desktop-wlr packages.

  3. I have exported XDG_CURRENT_DESKTOP=sway in my ~/.bash_profile

$ systemctl --user status pipewire-media-session.service
● pipewire-media-session.service - Multimedia Service Session Manager
     Loaded: loaded (/usr/lib/systemd/user/pipewire-media-session.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2021-04-30 12:12:39 CEST; 1h 12min ago
   Main PID: 1461 (pipewire-media-)
      Tasks: 2 (limit: 18728)
     Memory: 8.1M
        CPU: 439ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/pipewire-media-session.service
             └─1461 /usr/bin/pipewire-media-session

kwi 30 12:12:39 robert-laptop systemd[1247]: Started Multimedia Service Session Manager.
kwi 30 12:12:39 robert-laptop pipewire-media-session[1461]: GetManagedObjects() failed: org.freedesktop.DBus.Error.ServiceUnknown
kwi 30 12:25:59 robert-laptop pipewire-media-session[1461]: native: Unregistering Profile /Profile/HSPHS failed
kwi 30 12:25:59 robert-laptop pipewire-media-session[1461]: native: Unregistering Profile /Profile/HFPAG failed
kwi 30 12:26:04 robert-laptop pipewire-media-session[1461]: GetManagedObjects() failed: org.freedesktop.DBus.Error.ServiceUnknown
kwi 30 12:28:03 robert-laptop pipewire-media-session[1461]: native: Unregistering Profile /Profile/HSPHS failed
kwi 30 12:28:03 robert-laptop pipewire-media-session[1461]: native: Unregistering Profile /Profile/HFPAG failed
kwi 30 12:28:11 robert-laptop pipewire-media-session[1461]: GetManagedObjects() failed: org.freedesktop.DBus.Error.ServiceUnknown
$ systemctl --user status xdg-desktop-portal.service
● xdg-desktop-portal.service - Portal service
     Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal.service; static)
     Active: active (running) since Fri 2021-04-30 12:12:39 CEST; 1h 12min ago
   Main PID: 1402 (xdg-desktop-por)
      Tasks: 4 (limit: 18728)
     Memory: 4.3M
        CPU: 249ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/xdg-desktop-portal.service
             └─1402 /usr/lib/xdg-desktop-portal

kwi 30 12:12:39 robert-laptop systemd[1247]: Starting Portal service...
kwi 30 12:12:39 robert-laptop systemd[1247]: Started Portal service.
$ systemctl --user status xdg-desktop-portal-wlr.service
● xdg-desktop-portal-wlr.service - Portal service (wlroots implementation)
     Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal-wlr.service; static)
     Active: active (running) since Fri 2021-04-30 12:52:39 CEST; 32min ago
   Main PID: 12094 (xdg-desktop-por)
      Tasks: 2 (limit: 18728)
     Memory: 1.2M
        CPU: 36ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/xdg-desktop-portal-wlr.service
             └─12094 /usr/lib/xdg-desktop-portal-wlr

kwi 30 13:11:41 robert-laptop xdg-desktop-portal-wlr[14999]: /bin/sh: line 1: slurp: command not found
kwi 30 13:11:41 robert-laptop xdg-desktop-portal-wlr[12094]: 2021/04/30 13:11:41 [ERROR] - wlroots: no output found
kwi 30 13:11:48 robert-laptop xdg-desktop-portal-wlr[12094]: 2021/04/30 13:11:48 [ERROR] - wlroots: no output found
kwi 30 13:11:52 robert-laptop xdg-desktop-portal-wlr[15026]: /bin/sh: line 1: slurp: command not found
kwi 30 13:11:52 robert-laptop xdg-desktop-portal-wlr[12094]: 2021/04/30 13:11:52 [ERROR] - wlroots: no output found
kwi 30 13:14:10 robert-laptop xdg-desktop-portal-wlr[15972]: /bin/sh: line 1: slurp: command not found
kwi 30 13:14:10 robert-laptop xdg-desktop-portal-wlr[12094]: 2021/04/30 13:14:10 [ERROR] - wlroots: no output found
kwi 30 13:19:48 robert-laptop xdg-desktop-portal-wlr[17162]: /bin/sh: line 1: slurp: command not found
kwi 30 13:19:48 robert-laptop xdg-desktop-portal-wlr[12094]: 2021/04/30 13:19:48 [ERROR] - wlroots: no output found
kwi 30 13:23:29 robert-laptop xdg-desktop-portal-wlr[12094]: 2021/04/30 13:23:29 [ERROR] - wlroots: no output found
Result

When I open a Google Hangouts call and select Share Screen I'm presented with a dialog to select a window or screen. The only available option is Use operating system settings. I select it and nothing happens. No screen is shared.

Last edited by no-cheating (2021-04-30 12:38:12)

Offline

#2 2021-04-30 12:37:36

no-cheating
Member
From: Poland
Registered: 2016-04-26
Posts: 61

Re: [SOLVED] WebRTC screen sharing not working on Wayland using PipeWire

I found the problem. It was dmenu configuration file, which was forcing dmenu to run in drun mode, while xdg-desktop-portal-wlr was expecting it to work in dmenu mode. I'll submit a ticket to xdg-desktop-portal-wlr to make sure this problem doesn't exist on other setups.

Offline

Board footer

Powered by FluxBB