emersion / xdg-desktop-portal-wlr

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

update to Chromium 112 broke screen sharing #266

Closed mvdan closed 1 year ago

mvdan commented 1 year ago

I realize that this might well be a bug in Chromium, but I want to check here first before I go upstream. I'm using xdg-desktop-portal-wlr v0.6.0 from June 2022, so perhaps that version is too old for the latest chromium version. Screen sharing worked with chromium 111, and still continues to work with Firefox 111.

Also note that I'm running Chromium natively on Wayland without xwayland, though I don't think this matters.

Running chromium via the command line, I see the following error when I try to share my screen and see nothing:

[7671:8183:0407/133655.352744:ERROR:egl_dmabuf.cc(569)] Failed to record frame: Error creating EGLImage - EGL_BAD_ALLOC
[7671:8183:0407/133655.352767:ERROR:shared_screencast_stream.cc(791)] Dropping DMA-BUF modifier: 144115206334822913 and trying to renegotiate stream parameters
[7671:8183:0407/133655.385765:ERROR:egl_dmabuf.cc(569)] Failed to record frame: Error creating EGLImage - EGL_BAD_ALLOC
[7671:8183:0407/133655.385791:ERROR:shared_screencast_stream.cc(791)] Dropping DMA-BUF modifier: 144115206334822913 and trying to renegotiate stream parameters
[7671:8183:0407/133655.402683:ERROR:egl_dmabuf.cc(569)] Failed to record frame: Error creating EGLImage - EGL_BAD_ALLOC
[7671:8183:0407/133655.402708:ERROR:shared_screencast_stream.cc(791)] Dropping DMA-BUF modifier: 144115206334822913 and trying to renegotiate stream parameters
[...]

In case it helps, this is with pipewire 0.3.67.

Worth noting that I tried master as of 6737c209578e7f17536dbcb8fb2169dcf86ce528 and it works. So perhaps this issue can be closed by simply doing a release. In that case, I think this issue is still helpful for others running into the same problem when using the latest releases.

mvdan commented 1 year ago

I'm not sure what has changed in the past day, but with the same original setup, that being the latest xdg-desktop-portal-wlr release, now Firefox fails to screenshare as well.

christianhorn commented 1 year ago

I have hit this since a few days on Fedora37, now Fedora38 beta with xdg-desktop-portal-wlr-0.6.0, on google chrome. My workaround for now is downgrade to Chrome 111.

sake commented 1 year ago

I was hit by this too with Debian bookworm using the more recent sway and pipewire versions from experimental. Neither Chrome nor Firefox was able to do screensharing.

I built the wlr portal binary from the current master and replaced it in the system (/usr/libexec/xdg-desktop-portal-wlr) and now Chrome works again. Firefox is still disfunctional but it's probably because it's the ESR release (102.9.0) and also would need an update. Maybe this helps someone else until there is a release and the distributions pick it up.

guilty-p01nt3r commented 1 year ago

Same problem here on arch Firefox 113.0b2 (developer edition) works fine Chromium 112.0.5615.49 doesn't FIX for every arch user : just install xdg-desktop-portal-wlr-git from the AUR replacing xdg-desktop-portal

aryklein commented 1 year ago

@emersion @columbarius could a new version be released to avoid relying on xdg-desktop-portal-wlr-git from the AUR, which could potentially cause additional problems?

ackerleytng commented 1 year ago

Perhaps another data point here:

Screen sharing broke with the same errors as @mvdan on Chrome 112.0.5615.121 (Official Build) (64-bit) . Screen sharing is fine on Firefox 112.0 though.

xdg-desktop-portal-wlr: 0.6.0-1

tasn commented 1 year ago

Just to share: it also stopped working for me with Chromium 112, but changing to latest git fixed it. Latest Firefox works just fine with 0.6.0.

columbarius commented 1 year ago

Should be fixed in xdpw 0.7. Please reopen if this is not the case.