Skip to content

Instantly share code, notes, and snippets.

@columbarius
Last active August 17, 2023 07:43
Show Gist options
  • Save columbarius/50239ea3c4c70df8f240aa50f88e801a to your computer and use it in GitHub Desktop.
Save columbarius/50239ea3c4c70df8f240aa50f88e801a to your computer and use it in GitHub Desktop.
PipeWire Screencast Info
#!/bin/sh
pw-dump | jq -r '[.[] | select(.info.props."node.name" | IN("firefox","gnome-shell","kwin_wayland","obs","xdg-desktop-portal-wlr","xdp-screencast.py")) | .id] as $pw_node_ids | [ .[] | select(.info.props."node.id" | IN($pw_node_ids[])) | .id ] as $pw_port_ids | .[] | select(.id | IN(($pw_node_ids + $pw_port_ids)[]))'
@mvdan
Copy link

mvdan commented Aug 10, 2023

What's really interesting is that Chromium's "share entire screen" preview works - I can see the small screen there after selecting it. But then, once I start the screenshare, nothing - just like on Firefox.

@mvdan
Copy link

mvdan commented Aug 12, 2023

Finally found the culprit: an assertion is failing over on PipeWire:

'loop->recurse > 0' failed at ../pipewire/src/pipewire/thread-loop.c:426 pw_thread_loop_wait()

I also found that OBS can screenshare just fine. It seems like jumping from the "preview" to the actual screenshare on firefox/chromium is what causes the error. I filed a pipewire issue to see if the failed assertion can get us anywhere: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3428

@mvdan
Copy link

mvdan commented Aug 17, 2023

Ah, this is fixed in Firefox Beta 117.0b8, so it was clearly a problem on their side. I initially thought it was https://bugzilla.mozilla.org/show_bug.cgi?id=1841851, but updating regular firefox to 116.0.3 did not fix it. Either way, apologies for the noise, I was just frantically trying to debug the breakage :)

@rpigott
Copy link

rpigott commented Aug 17, 2023

Nice. Glad you got it sorted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment