Bug 429989 - Double portal fails to start screen sharing (Wayland)
Summary: Double portal fails to start screen sharing (Wayland)
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.20.4
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-03 20:28 UTC by Youri van Mill
Modified: 2020-12-10 09:54 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
screenshot 2 portals (1.42 MB, image/png)
2020-12-03 20:28 UTC, Youri van Mill
Details
screenshot from another user (315.11 KB, image/png)
2020-12-03 20:29 UTC, Youri van Mill
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Youri van Mill 2020-12-03 20:28:07 UTC
Created attachment 133851 [details]
screenshot 2 portals

SUMMARY

Two portal shows up to select the monitor I want to mirror. It also fails to mirror the monitor.


STEPS TO REPRODUCE
1. Install lateste google chrome stable
2. Goto https://www.webrtc-experiment.com/Pluginfree-Screen-Sharing/#5546995835292057
3. Click on "Share your screen"


OBSERVED RESULT
Two portals shows up. When I chose the monitor I want to share on the portals, only a black screen shows on the website. My desktop is NOT mirrored.


EXPECTED RESULT
Only one portal opens and I can select my screen to share, the opened website should show a mirror of my desktop.


SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.20.4
KDE Frameworks Version: 5.76.0
Qt Version: 5.15.2
Kernel Version: 5.9.11-arch2-1
OS Type: 64-bit
Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor
Memory: 15.6 GiB of RAM
Graphics Processor: Radeon RX 570 Series

ADDITIONAL INFORMATION

Packages installed:
xdg-desktop-portal 1.8.0-1
xdg-desktop-portal-kde 5.20.4-1
google-chrome 87.0.4280.88-1
libpipewire02 0.2.7-1

Somebody else who also have this issue (https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/380), tried it with GNOME (Wayland) and it is working, see: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/380#note_716112
pipewire 0.3.17
Comment 1 Youri van Mill 2020-12-03 20:29:04 UTC
Created attachment 133852 [details]
screenshot from another user
Comment 2 Jan Grulich 2020-12-04 06:51:35 UTC
I think this is broken in Chromium.

Originally with Plasma 5.19, we were using BGRx format and I implemented WebRTC using it as well, however with Plasma 5.20 and things moving to KWin, it can now also be BGRA (with alpha channel) and that will not be handled in WebRTC.  

This is already fixed upstream: https://webrtc-review.googlesource.com/c/src/+/194100

@apol: I wonder whether we can (or if we want) to workaround on our end. Basically we can set stream format to be either BGRA or BGR based on what we settle on with the client and then take that into account?

You can ignore two portals showing up, that's something we will have to deal with in Chromium. It is painful, but for now you have to confirm both dialogs.
Comment 3 Jan Grulich 2020-12-10 09:54:45 UTC
Black screen fixed in KWin: https://invent.kde.org/plasma/kwin/-/merge_requests/526

Double portal will be fixed in Chromium: https://chromium-review.googlesource.com/c/chromium/src/+/2578840