You are not logged in.

#1 2022-12-04 15:48:22

Lanttuva
Member
Registered: 2022-12-04
Posts: 1

xdpw: failed to initialize screencast (xdg-desktop-portal-wlr)

Hello!

I'm quite new to Arch Linux and Linux in general and had a great time, until recently. I've been having some trouble setting up screenshare. I should have everything in order, with the base package xdg-desktop-portal working (atleast active) and pipewire running as intended. The problem I'm facing is that "xdg-desktop-portral-wlr" won't start at all. I've been following this troubleshoot list: Troubleshoot emersion, github. The screensharing worked before I switched from X11 to Wayland. Absolutely everything else works (at least decently), except screenshare.

Desktop: Gnome 42.1, Wayland
Pipewire: PipeWire 0.3.61
Pipewire managing software: Was wireplumber, but changed to pipewire-media-session. Nothing changed in terms of screensharing.

/usr/lib/xdg-desktop-portal-wlr --loglevel=TRACE

2022/12/04 15:23:52 [TRACE] - config: trying config file /home/user_name/.config/xdg-desktop-portal-wlr/GNOME
2022/12/04 15:23:52 [TRACE] - config: trying config file /home/user_name/.config/xdg-desktop-portal-wlr/config
2022/12/04 15:23:52 [DEBUG] - config: outputname:  (null)
2022/12/04 15:23:52 [DEBUG] - config: max_fps:  0.000000
2022/12/04 15:23:52 [DEBUG] - config: exec_before:  (null)
2022/12/04 15:23:52 [DEBUG] - config: exec_after:  (null)
2022/12/04 15:23:52 [DEBUG] - config: chooser_cmd: (null)
2022/12/04 15:23:52 [DEBUG] - config: chooser_type: default
2022/12/04 15:23:52 [DEBUG] - config: force_mod_linear: 0
2022/12/04 15:23:52 [DEBUG] - dbus: connected
2022/12/04 15:23:52 [DEBUG] - wlroots: wl_display connected
2022/12/04 15:23:52 [DEBUG] - pipewire: pw_loop created
2022/12/04 15:23:52 [DEBUG] - pipewire: establishing connection to core
2022/12/04 15:23:52 [ERROR] - pipewire: failed to create context
2022/12/04 15:23:52 [DEBUG] - pipewire: disconnecting fom core
2022/12/04 15:23:52 [ERROR] - xdpw: failed to initialize screencast
'impl->enter_count > 0' failed at ../pipewire/spa/plugins/support/loop.c:346 loop_leave()


Same could be found in journalctl


Dec 04 15:18:49 pc-name dbus-daemon[54140]: [session uid=1000 pid=54140] Activating via systemd: service name='org.freedesktop.impl.portal.desktop.wlr' unit='xdg-desktop-portal-wlr.service' requested by ':1.71' (uid=1000 pid=54711 comm="/usr/lib/xdg-desktop-portal")
Dec 04 15:18:49 pc-name xdg-desktop-portal-wlr[54744]: 2022/12/04 15:18:49 [ERROR] - pipewire: failed to create context
Dec 04 15:18:49 pc-name xdg-desktop-portal-wlr[54744]: 2022/12/04 15:18:49 [ERROR] - xdpw: failed to initialize screencast
Dec 04 15:18:49 pc-name xdg-desktop-portal-wlr[54744]: 'impl->enter_count > 0' failed at ../pipewire/spa/plugins/support/loop.c:346 loop_leave()
Dec 04 15:18:49 pc-name systemd[54124]: xdg-desktop-portal-wlr.service: Main process exited, code=exited, status=1/FAILURE
Dec 04 15:18:49 pc-name systemd[54124]: xdg-desktop-portal-wlr.service: Failed with result 'exit-code'.
Dec 04 15:18:49 pc-name systemd[54124]: xdg-desktop-portal-wlr.service: Scheduled restart job, restart counter is at 1.
Dec 04 15:18:49 pc-name xdg-desktop-portal-wlr[54745]: 2022/12/04 15:18:49 [ERROR] - pipewire: failed to create context
Dec 04 15:18:49 pc-name xdg-desktop-portal-wlr[54745]: 2022/12/04 15:18:49 [ERROR] - xdpw: failed to initialize screencast
Dec 04 15:18:49 pc-name xdg-desktop-portal-wlr[54745]: 'impl->enter_count > 0' failed at ../pipewire/spa/plugins/support/loop.c:346 loop_leave()
Dec 04 15:18:49 pc-name systemd[54124]: xdg-desktop-portal-wlr.service: Main process exited, code=exited, status=1/FAILURE
Dec 04 15:18:49 pc-name systemd[54124]: xdg-desktop-portal-wlr.service: Failed with result 'exit-code'.
Dec 04 15:18:50 pc-name systemd[54124]: xdg-desktop-portal-wlr.service: Scheduled restart job, restart counter is at 2.
Dec 04 15:18:50 pc-name xdg-desktop-portal-wlr[54746]: 2022/12/04 15:18:50 [ERROR] - pipewire: failed to create context
Dec 04 15:18:50 pc-name xdg-desktop-portal-wlr[54746]: 2022/12/04 15:18:50 [ERROR] - xdpw: failed to initialize screencast
Dec 04 15:18:50 pc-name xdg-desktop-portal-wlr[54746]: 'impl->enter_count > 0' failed at ../pipewire/spa/plugins/support/loop.c:346 loop_leave()
Dec 04 15:18:50 pc-name systemd[54124]: xdg-desktop-portal-wlr.service: Main process exited, code=exited, status=1/FAILURE
Dec 04 15:18:50 pc-name systemd[54124]: xdg-desktop-portal-wlr.service: Failed with result 'exit-code'.
Dec 04 15:18:50 pc-name systemd[54124]: xdg-desktop-portal-wlr.service: Scheduled restart job, restart counter is at 3.
Dec 04 15:18:50 pc-name xdg-desktop-portal-wlr[54747]: 2022/12/04 15:18:50 [ERROR] - pipewire: failed to create context
Dec 04 15:18:50 pc-name xdg-desktop-portal-wlr[54747]: 2022/12/04 15:18:50 [ERROR] - xdpw: failed to initialize screencast
Dec 04 15:18:50 pc-name xdg-desktop-portal-wlr[54747]: 'impl->enter_count > 0' failed at ../pipewire/spa/plugins/support/loop.c:346 loop_leave()
Dec 04 15:18:50 pc-name systemd[54124]: xdg-desktop-portal-wlr.service: Main process exited, code=exited, status=1/FAILURE
Dec 04 15:18:50 pc-name systemd[54124]: xdg-desktop-portal-wlr.service: Failed with result 'exit-code'.
Dec 04 15:18:50 pc-name systemd[54124]: xdg-desktop-portal-wlr.service: Scheduled restart job, restart counter is at 4.
Dec 04 15:18:50 pc-name xdg-desktop-portal-wlr[54758]: 2022/12/04 15:18:50 [ERROR] - pipewire: failed to create context
Dec 04 15:18:50 pc-name xdg-desktop-portal-wlr[54758]: 2022/12/04 15:18:50 [ERROR] - xdpw: failed to initialize screencast
Dec 04 15:18:50 pc-name xdg-desktop-portal-wlr[54758]: 'impl->enter_count > 0' failed at ../pipewire/spa/plugins/support/loop.c:346 loop_leave()
Dec 04 15:18:50 pc-name systemd[54124]: xdg-desktop-portal-wlr.service: Main process exited, code=exited, status=1/FAILURE
Dec 04 15:18:50 pc-name systemd[54124]: xdg-desktop-portal-wlr.service: Failed with result 'exit-code'.
Dec 04 15:18:50 pc-name systemd[54124]: xdg-desktop-portal-wlr.service: Scheduled restart job, restart counter is at 5.
Dec 04 15:18:50 pc-name systemd[54124]: xdg-desktop-portal-wlr.service: Start request repeated too quickly.
Dec 04 15:18:50 pc-name systemd[54124]: xdg-desktop-portal-wlr.service: Failed with result 'exit-code'.
 

Env. values:

WAYLAND_DISPLAY

env | grep '^WAYLAND_DISPLAY='
WAYLAND_DISPLAY=wayland-0


< "/proc/$(pidof xdg-desktop-portal)/environ" tr '\0' '\n' | grep '^WAYLAND_DISPLAY='
WAYLAND_DISPLAY=wayland-0

XDG_CURRENT_DESKTOP

env | grep 'XDG_CURRENT_DESKTOP='
XDG_CURRENT_DESKTOP=GNOME

< "/proc/$(pidof xdg-desktop-portal)/environ" tr '\0' '\n' | grep '^XDG_CURRENT_DESKTOP='
XDG_CURRENT_DESKTOP=GNOME

It is either pipewire, which is working fine or just some random bug. I even tried building xdg-desktop-portal-wlr from scratch but nothing changed. Formerly, I did have some problems with pipewire starting, with similar error messages as mentioned before: pipewire: failed to create context. This resolved by just reinstalling pipewire and erasing older configuration files. I really want this to work but can't figure out how.

Offline

#2 2023-01-26 03:38:47

thurstylark
Member
Registered: 2016-06-02
Posts: 11

Re: xdpw: failed to initialize screencast (xdg-desktop-portal-wlr)

xdg-desktop-portal-wlr is for wlroots-based compositors (such as sway). Instead, xdg-desktop-portal-gnome is what you should install for desktop sharing on GNOME. See: https://wiki.archlinux.org/title/PipeWi … en_sharing

Offline

Board footer

Powered by FluxBB