Open WhyNotHugo opened 1 year ago
I also tried this test script (after having installed gst-plugin-pipewire
):
> python xdp-screen-cast.py
session /org/freedesktop/portal/desktop/session/1_261/u1 created
sources selected
streams:
stream 126
X connection to :0 broken (explicit kill or server shutdown).
Can you try the flatpak versions of Firefox and Chromium, please?
@columbarius Chromium on Arch fails like @WhyNotHugo described for me, and the version from flatpak fails the same:
$ chromium
[186751:186751:0521/213240.845282:ERROR:chrome_browser_cloud_management_controller.cc(162)] Cloud management controller initialization aborted as CBCM is not enabled.
'loop->recurse > 0' failed at ../pipewire/src/pipewire/thread-loop.c:417 pw_thread_loop_wait()
$ flatpak run org.chromium.Chromium
[2:2:0521/213359.505879:ERROR:chrome_browser_cloud_management_controller.cc(162)] Cloud management controller initialization aborted as CBCM is not enabled.
'loop->recurse > 0' failed at ../src/pipewire/thread-loop.c:417 pw_thread_loop_wait()
[2:2:0521/213407.177372:ERROR:browser_main_loop.cc(274)] GLib: g_variant_new_object_path: assertion 'g_variant_is_object_path (object_path)' failed
[0521/213407.177470:ERROR:scoped_ptrace_attach.cc(27)] ptrace: Operation not permitted (1)
$ chromium --version
Chromium 113.0.5672.126 Arch Linux
$ flatpak run org.chromium.Chromium --version
Chromium 113.0.5672.126
In fact it's actually slightly worse - the flatpak version shows the same pw_thread_loop_wait
and then seems to crash.
i have the same error when trying to share my screen with chromium:
[10211:10211:0523/135802.744033:ERROR:shared_screencast_stream.cc(459)] Failed to connect PipeWire context
[10211:10211:0523/135802.744046:ERROR:base_capturer_pipewire.cc(81)] ScreenCastPortal failed: 1
'loop->recurse > 0' failed at ../src/pipewire/thread-loop.c:417 pw_thread_loop_wait()
however, screen sharing works with firefox. is there any fix for this yet? i have followed all of the troubleshooting guides but couldn't fix it yet. i am on alpine linux edge.
Firefox on Flatpak also does not work:
Also on Alpine Edge here.
Odd, xdp-screencast.py
seems to work, but xdg-desktop-portal-wlr
continuously spams:
2023/05/23 15:09:35 [WARN] - wlroots: no current buffer
2023/05/23 15:09:35 [WARN] - pipewire: out of buffers
2023/05/23 15:09:35 [WARN] - wlroots: no current buffer
2023/05/23 15:09:35 [WARN] - pipewire: out of buffers
2023/05/23 15:09:35 [WARN] - wlroots: no current buffer
2023/05/23 15:09:35 [WARN] - pipewire: out of buffers
2023/05/23 15:09:35 [WARN] - wlroots: no current buffer
2023/05/23 15:09:35 [WARN] - pipewire: out of buffers
xdg-desktop-portal
outputs:
XDP: org.freedesktop.portal.Desktop acquired
XDP: screen cast session owned by ':1.63' created
XDP: Replacing restore data received from portal impl with a token
(/usr/libexec/xdg-desktop-portal:13132): GLib-CRITICAL **: 15:09:28.138: g_variant_new_string: assertion 'string != NULL' failed
(/usr/libexec/xdg-desktop-portal:13132): GLib-CRITICAL **: 15:09:28.138: g_variant_new_variant: assertion 'value != NULL' failed
(/usr/libexec/xdg-desktop-portal:13132): GLib-CRITICAL **: 15:09:28.138: g_variant_get_type: assertion 'value != NULL' failed
(/usr/libexec/xdg-desktop-portal:13132): GLib-CRITICAL **: 15:09:28.138: g_variant_type_is_subtype_of: assertion 'g_variant_type_check (type)' failed
(/usr/libexec/xdg-desktop-portal:13132): GLib-CRITICAL **: 15:09:28.138: g_variant_builder_add_value: assertion '!GVSB(builder)->expected_type || g_variant_is_of_type (value, GVSB(builder)->expected_type)' failed
(/usr/libexec/xdg-desktop-portal:13132): GLib-CRITICAL **: 15:09:28.138: g_variant_builder_end: assertion 'GVSB(builder)->offset >= GVSB(builder)->min_items' failed
(/usr/libexec/xdg-desktop-portal:13132): GLib-CRITICAL **: 15:09:28.138: g_variant_get_type: assertion 'value != NULL' failed
(/usr/libexec/xdg-desktop-portal:13132): GLib-CRITICAL **: 15:09:28.138: g_variant_type_is_subtype_of: assertion 'g_variant_type_check (type)' failed
(/usr/libexec/xdg-desktop-portal:13132): GLib-CRITICAL **: 15:09:28.138: g_variant_builder_add_value: assertion '!GVSB(builder)->expected_type || g_variant_is_of_type (value, GVSB(builder)->expected_type)' failed
XDP: screen cast session owned by ':1.63' started
XDP: screen cast session owned by ':1.63' closed
I encountered the same issue. For me it works when I uninstall xdg-desktop-portal-gnome
I think the next release of xdg-desktop-portal will fix this.
https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome/-/issues/74 https://github.com/flatpak/xdg-desktop-portal/pull/985 https://github.com/flatpak/xdg-desktop-portal/pull/1018
for the time being I have just following packages installed
❯ yay -Q | grep xdg-desktop-portal
xdg-desktop-portal 1.16.0-2
xdg-desktop-portal-gtk 1.14.1-1
xdg-desktop-portal-wlr 0.7.0-1
I only have xdg-desktop-portal, xdg-desktop-portal-gtk, and xdg-desktop-portal-wlr installed, so @romanstingler's workaround isn't fixing it for me, FYI.
afaict this is caused by the now-infamous webrtc bug (https://bugs.chromium.org/p/webrtc/issues/detail?id=15174), because applying the webrtc fix in question to firefox fixes it for me (will test chromium after it builds)
What is the easiest way to apply the fix? Or, do we know if any firefox or chromium pre-release include the fix? It doesn't look like chromium has decided whether or not to include the fix in the upcoming v114, for example.
that is interesting. I am on Arch (testing) and use firefox-nightly 115.0a1+20230509.1+hfaf51404785d-1 and it works for me also with chromium 113.0.5672.126-1
What is the easiest way to apply the fix?
you would have to apply the patch to the webrtc in the tarball of chromium or firefox and build it yourself (or get your distro to do it), and yes, that won't fix flatpak and similar..
an example for firefox and chromium
a noted hacky other workaround is PIPEWIRE_DEBUG=4 (yes, really), but that didn't fix it for me
It doesn't look like chromium has decided whether or not to include the fix in the upcoming v114, for example.
yes, seemingly that will be all the way in 115.. for firefox, it's in 114b, so also will be in 114 https://bugzilla.mozilla.org/show_bug.cgi?id=1832770
that said, it's not guaranteed this would fix it, you might also have other issues
Thank you @nekopsykose, that's very helpful. I can confirm that Firefox 114.0b8 can screenshare for me, when 113.0.2 could not :)
glad it was that simple then :D
(will test chromium after it builds)
yep, fixed there too
@WhyNotHugo should work for you as well now
just updated chromium to 113.0.5672.126-r2, works :) (alpine edge)
Chromium 114 on Arch, which presumably hasn't been patched by the distro for this, still doesn't work. So I imagine upstream might include the webrtc fix in the 115 beta. For now, back to Firefox for video calls :)
on firefox 114.0b9, i am facing this issue:
[E][18353.396080] pw.context | [ context.c: 595 pw_context_debug_port_params()] params Spa:Enum:ParamId:EnumFormat: 0:0 Invalid argument (input format (no more input formats))
they are right, atleast it tries to screenshare, but i get this error.
edit: i had render_bit_depth 10
set in my sway, now works with 114.0b9.
Oh is screen capture with 10-bit an xdg-desktop-portal-wlr issue or a pipewire issue? As the errors I get when I have render_bit_depth 10
in my sway config, are talking about pipewire.
Trying to capture the 4k monitor (10-bit) in obs-studio-tytan652 29.1.3-2
:
info: PipeWire initialized
info: [pipewire] Screencast session created
info: [pipewire] Asking for desktop
info: [pipewire] desktop selected, setting up screencast
info: [pipewire] Server version: 0.3.76
info: [pipewire] Library version: 0.3.76
info: [pipewire] Header version: 0.3.74
info: [pipewire] Created stream 0x55970f8a5d10
info: [pipewire] Stream 0x55970f8a5d10 state: "connecting" (error: none)
info: [pipewire] Playing stream 0x55970f8a5d10
info: [pipewire] Stream 0x55970f8a5d10 state: "paused" (error: none)
info: [pipewire] Stream 0x55970f8a5d10 state: "error" (error: no more input formats)
error: [pipewire] Error id:2 seq:8 res:-32 (Unknown error -32): no more input formatsinfo: [pipewire] Screencast session created
info: [pipewire] Asking for desktop
info: [pipewire] desktop selected, setting up screencast
info: [pipewire] Server version: 0.3.76
info: [pipewire] Library version: 0.3.76
info: [pipewire] Header version: 0.3.74
info: [pipewire] Created stream 0x55970f8a5d10
info: [pipewire] Stream 0x55970f8a5d10 state: "connecting" (error: none)
info: [pipewire] Playing stream 0x55970f8a5d10
info: [pipewire] Stream 0x55970f8a5d10 state: "paused" (error: none)
info: [pipewire] Stream 0x55970f8a5d10 state: "error" (error: no more input formats)
error: [pipewire] Error id:2 seq:8 res:-32 (Unknown error -32): no more input formats
Trying to capture the 4k monitor (10-bit) in webcord 4.3.0-1
[9111:0730/123511.697290:ERROR:shared_screencast_stream.cc(241)] PipeWire stream state error: no more input formats
[9111:0730/123511.697302:ERROR:shared_screencast_stream.cc(204)] PipeWire remote error: no more input formats
Ending Screenshare:
'loop->recurse > 0' failed at ../pipewire/src/pipewire/thread-loop.c:426 pw_thread_loop_wait()
I can capture games in obs with obs-vkcapture
and the screen with wlrobs
when set to render_bit_depth 10
. But cannot capture the screen with browser/webcord, although capturing a browser tab is possible.
i had it working for a while with the same sway 10-bit depth (in browser etc), so it's probably something else
Hi. I have this problem on Debian testing. Black screen with frozen mouse cursor.
But It seems that Chromium, Chrome and Firefox do not even attempt to connect to portals or pipewire.
pw-dump
does not list any of them when attempting screen sharng.
If laucnhed without DISPLAY
, eliminating Xwayland, screen sharing becomes totally disabled (Chrom* show only Tab, Firefox refuses to share outright).
All browsers run wayland-native, ozone and webrtc flags in Crhom* are applied.
Other wayland apps, like screenshots and screen recorders are working.
I have a feeling that I'm missing something trivial.
$ env | grep -Ei 'wayland|wlr'
CLUTTER_BACKEND=wayland
XDG_CURRENT_DESKTOP=sway:wlroots
WAYLAND_DISPLAY=wayland-1
WINIT_UNIX_BACKEND=wayland
QT_QPA_PLATFORM=wayland-egl
SDL_VIDEODRIVER=wayland
GDK_BACKEND=wayland
$ systemctl --user list-units xdg-desktop-portal* pipewire* wireplumber* -q
pipewire-pulse.service loaded active running PipeWire PulseAudio
pipewire.service loaded active running PipeWire Multimedia Service
wireplumber.service loaded active running Multimedia Service Session Manager
xdg-desktop-portal-gtk.service loaded active running Portal service (GTK/GNOME implementation)
xdg-desktop-portal-wlr.service loaded active running Portal service (wlroots implementation)
xdg-desktop-portal.service loaded active running Portal service
pipewire-pulse.socket loaded active running PipeWire PulseAudio
pipewire.socket loaded active running PipeWire Multimedia System Sockets
$ apt list --installed *chrom* *firefox* xdg-desktop-portal* *pipewire* *wireplumber* *webrtc*
Listing... Done
chromium-common/testing,unstable,now 119.0.6045.199-1 amd64 [installed,automatic]
chromium/testing,unstable,now 119.0.6045.199-1 amd64 [installed]
firefox-esr/testing,unstable,now 115.5.0esr-1 amd64 [installed]
google-chrome-stable/stable,now 120.0.6099.62-1 amd64 [installed]
gstreamer1.0-pipewire/testing,unstable,now 1.0.0-1 amd64 [installed]
libchromaprint1/testing,unstable,now 1.5.1-4 amd64 [installed,automatic]
libpipewire-0.3-0/testing,unstable,now 1.0.0-1 amd64 [installed,automatic]
libpipewire-0.3-common/testing,unstable,now 1.0.0-1 all [installed]
libpipewire-0.3-modules/testing,unstable,now 1.0.0-1 amd64 [installed,automatic]
libwebrtc-audio-processing1/testing,unstable,now 0.3-1+b1 amd64 [installed,automatic]
libwireplumber-0.4-0/testing,now 0.4.16-1 amd64 [installed,automatic]
pipewire-alsa/testing,unstable,now 1.0.0-1 amd64 [installed]
pipewire-audio/testing,unstable,now 1.0.0-1 all [installed]
pipewire-bin/testing,unstable,now 1.0.0-1 amd64 [installed,automatic]
pipewire-pulse/testing,unstable,now 1.0.0-1 amd64 [installed]
pipewire-v4l2/testing,unstable,now 1.0.0-1 amd64 [installed]
pipewire/testing,unstable,now 1.0.0-1 amd64 [installed]
wireplumber/testing,now 0.4.16-1 amd64 [installed]
xdg-desktop-portal-gtk/testing,unstable,now 1.15.1-1 amd64 [installed]
xdg-desktop-portal-wlr/testing,unstable,now 0.7.0-1 amd64 [installed]
xdg-desktop-portal/testing,unstable,now 1.18.2-1 amd64 [installed,automatic]
Can you provide logs for the xdg-desktop-portal?
Recent versions require explicitly configuring the backend implementation that should be used (eg: wlr). Have you done this?
Have you checked the troubleshooting instruction in the wiki?
Sorry, false alarm. $XDG_SESSION_TYPE
was missing. A bug in uwsm.
This issue still exists for me, when using chromium/obs/slack/zoom. In firefox however screen sharing works fine.
Package versions:
xdg-desktop-portal 1.18.2-1
xdg-desktop-portal-wlr 0.7.0-2
firefox 122.0.1-1
chromium 121.0.6167.160-1
chromium logs this error:
'loop->recurse > 0' failed at ../pipewire/src/pipewire/thread-loop.c:426 pw_thread_loop_wait()
Steps to reproduce:
for me in chromium it works intermittently on my notebook with external monitor. Sharing a tab or an area works. Sharing a display doesn't works every time.
I tried sharing my external one, was black. Then I tried sharing my internal display that worked and then sharing the external worked. Sometimes I have to try more often.
but I have only these installed
xdg-desktop-portal 1.18.2-1.1
xdg-desktop-portal-hyprland 1.3.1-3.1
I'm running
xdg-desktop-portal
. It only yields a bunch of unrelated output:Another terminal is running
usr/libexec/xdg-desktop-portal-wlr
, which also provides no useful output:On chrome, when I try to screencast at https://mozilla.github.io/webrtc-landing/gum_test.html, if I pick "Entire Screen" it logs:
But the screencast area is just solid black with "FPS now: NaN , entire capture: NaN".
Firefox logs nothing, and shows nothing (e.g.: not even a black region).
When I screencast from chromium, xdp-wlr logs:
Versions of related components:
wireplumber
,pipewire
andpipewire-pulse
are all running. Also:Running this test script: