You are not logged in.

#1 2022-05-15 08:17:00

0BADC0DE
Member
From: Regnum Utriusque Siciliae
Registered: 2018-02-21
Posts: 270

[SOLVED] [KDE/Wayland] Web-based screen sharing not working

I posted this in the wrong forum (Multimedia and Games). Now It's here.

I already have read a number of topics similar to this one, but yet I cannot make it working.
So, first things first.
This is my current setup:

Plasma Version : 5.24.5-1
KDE Version : 22.04.1-1
Frameworks Version : 5.93.0-1
Qt5 Version : 5.15.3+kde+r0-1
Linux version: 5.17.6-zen1-1-zen

For Wayland support I am using:

wayland 1.20.0-2
wayland-protocols 1.25-1
xorg-xwayland 22.1.1-1
kwayland 5.93.0-2
kwayland-integration 5.24.5-1
kwayland-server 5.24.5-1
plasma-wayland-protocols 1.7.0-1
plasma-wayland-session
qt5-wayland 5.15.3+kde+r44-1

I am not sure whether Wayland is relevant, though.

I followed the wiki page and these are the "relevant"(tm) packages I have installed:

xdg-desktop-portal 1.14.4-1
xdg-desktop-portal-kde 5.24.5-1
xdg-desktop-portal-gtk 1.14.0-1

Maybe xdg-desktop-portal-gtk is not needed, but I am using also gtk-based browsers (chromium, vivaldi) so _maybe_ that one is also needed. Please advise.

The the notorious pipewire package, about which there are a number of stories:

pipewire 1:0.3.51-1
pipewire-media-session 1:0.4.1-2

When I try to share my screen on a web-based application (I tried Zoom and MS Teams so far) this is what happens with Vivaldi browser (the one I use the most).
(I have enabled the WebRTC (experimental) flag in all of my Chromium-based browsers).

  1. A couple of popups show up. Top most  one is by KDE (it has a KDE icon) and is titled "Screen Sharing - Portal"  and asks me to select between two screens or any window. I usually select a window. As soon as I select the window I can hit the button "Share" and the popup closes.

  2. Then I can interact with the second popup which is by Vivaldi and asks me to share either the Entire Screen or a single Vivaldi Tab. I don't need to share any Vivaldi Tab, but I select the entire screen anyway. Also this popup closes.

  3. I get another KDE "Screen Sharing - Portal" popup. I select again the window I want to share.

  4. Also this third popup closes and Vivaldi says I am sharing my screen. (If I simply close that third popup, then I am not told I am sharing my screen.)

Only, the other party just sees a black screen.

This clearly points me at something wrong. Removing xdg-desktop-portal-gtk doesn't help nor changes the behavior, though.

Any idea?

Last edited by 0BADC0DE (2022-06-02 09:38:35)


Maybe Computers Will Never Become As Intelligent
As Humans. Surely They Won't Ever Become So Stupid.

Offline

#2 2022-05-15 08:56:37

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] [KDE/Wayland] Web-based screen sharing not working

Please don't cross-post.
CoC - Cross Posting

If you want a thread moved then just click the report button and ask, one of us mods is usually around.

I'm going to close the other thread.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2022-05-15 09:02:09

0BADC0DE
Member
From: Regnum Utriusque Siciliae
Registered: 2018-02-21
Posts: 270

Re: [SOLVED] [KDE/Wayland] Web-based screen sharing not working

Slithery wrote:

Please don't cross-post.
CoC - Cross Posting

If you want a thread moved then just click the report button and ask, one of us mods is usually around.

I'm going to close the other thread.

Not really duplicated as you can see. Thanks anyway.


Maybe Computers Will Never Become As Intelligent
As Humans. Surely They Won't Ever Become So Stupid.

Offline

#4 2022-05-19 13:48:15

0BADC0DE
Member
From: Regnum Utriusque Siciliae
Registered: 2018-02-21
Posts: 270

Re: [SOLVED] [KDE/Wayland] Web-based screen sharing not working

None has an idea on this?


Maybe Computers Will Never Become As Intelligent
As Humans. Surely They Won't Ever Become So Stupid.

Offline

#5 2022-05-19 15:49:32

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,736

Re: [SOLVED] [KDE/Wayland] Web-based screen sharing not working

That's one of those areas where things are very much in flux on wayland and not necessarily nailed down fully. I've seen stuff where xwayland clients are limited to just sharing other xwayland clients and especially in these proprietary cases it's quite possible that the bundled electron/qt versions are outdated and don't necessarily include the necessary integrations that might have happened with newer library releases. Unlike on xorg no application is generally just allowed to grab the screen and unless all components know about and use the appropriate desktop-portal integrations. FWIW most of the screen sharing I've had to do was via chromium (... and from there via the teams website) which has generally worked fine.

Small test, does pipewire sharing in general work properly? Easiest to check that is whether the thumbnails of open windows in the task bar is rendered.

Last edited by V1del (2022-05-19 15:50:29)

Offline

#6 2022-05-19 16:00:38

0BADC0DE
Member
From: Regnum Utriusque Siciliae
Registered: 2018-02-21
Posts: 270

Re: [SOLVED] [KDE/Wayland] Web-based screen sharing not working

None of my programs is using x Wayland: they all use wayland.
Until my last reinstallation, about 1 month ago, screen sharing worked just fine under wayland. I suspect some package is still missing but have no idea on which ones are needed.
Unluckily my knowledge is limited. And not just about the Linux graphics stack. ;-)

Vivaldi browser's thumbnail is rendered as a white "W" with yellow/orange background.
All other non-KDE applications (vscode, firefox and chromium) I use show their correct thumbnails.

Is this the symptom?

[UPDATE #1]
I moved to Chromium. Sharing the screen lets me choose the screen or a chromium tab. No way to share a window. No KDE popup.
In any case, the small preview shows what the others see: a black screen.

[UPDATE #2]
Same for chrome v101

Last edited by 0BADC0DE (2022-05-20 07:34:17)


Maybe Computers Will Never Become As Intelligent
As Humans. Surely They Won't Ever Become So Stupid.

Offline

#7 2022-05-24 07:58:35

0BADC0DE
Member
From: Regnum Utriusque Siciliae
Registered: 2018-02-21
Posts: 270

Re: [SOLVED] [KDE/Wayland] Web-based screen sharing not working

V1del wrote:

Small test, does pipewire sharing in general work properly? Easiest to check that is whether the thumbnails of open windows in the task bar is rendered.

Nope, as I said, the thumbnail is just the Wayland logo.
That is, Vivaldi "at rest" displays the usual thumbnail with a white "V" on red background. The "running" one seems to be the Wayland logo.
screenshot
Is there a way to troubleshoot/fix it?

Last edited by 0BADC0DE (2022-06-02 06:45:47)


Maybe Computers Will Never Become As Intelligent
As Humans. Surely They Won't Ever Become So Stupid.

Offline

#8 2022-06-02 06:46:22

0BADC0DE
Member
From: Regnum Utriusque Siciliae
Registered: 2018-02-21
Posts: 270

Re: [SOLVED] [KDE/Wayland] Web-based screen sharing not working

I put the correct link (1st time img hosting).


Maybe Computers Will Never Become As Intelligent
As Humans. Surely They Won't Ever Become So Stupid.

Offline

#9 2022-06-02 08:26:19

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,736

Re: [SOLVED] [KDE/Wayland] Web-based screen sharing not working

I'm rather referring to the window preview you get when hovering. This might plain be due to the older libs vivaldi is linked against, that can be a bit of a problem using proprietary binary blobs on a rolling release. FWIW chromium sharing works just fine here. What do you get from

systemctl --user status pipewire pipewire-media-session

maybe test wireplumber instead of pipewire-media-session (... and if you use pulse, to avoid the logical conflict arising from doing so, switch to pipewire-pulse so that stuff is aligned properly)

Last edited by V1del (2022-06-02 08:27:42)

Offline

#10 2022-06-02 08:38:35

0BADC0DE
Member
From: Regnum Utriusque Siciliae
Registered: 2018-02-21
Posts: 270

Re: [SOLVED] [KDE/Wayland] Web-based screen sharing not working

V1del wrote:

I'm rather referring to the window preview you get when hovering. This might plain be due to the older libs vivaldi is linked against, that can be a bit of a problem using proprietary binary blobs on a rolling release. FWIW chromium sharing works just fine here. What do you get from

systemctl --user status pipewire pipewire-media-session

maybe test wireplumber instead of pipewire-media-session (... and if you use pulse, to avoid the logical conflict arising from doing so, switch to pipewire-pulse so that stuff is aligned properly)

wireplumber has been deprecated from archlinux website homepage so I removed it.

$ systemctl --user status pipewire pipewire-media-session
● pipewire.service - PipeWire Multimedia Service
     Loaded: loaded (/usr/lib/systemd/user/pipewire.service; disabled; vendor preset: enabled)
     Active: active (running) since Thu 2022-06-02 08:09:30 CEST; 2h 25min ago
TriggeredBy: ● pipewire.socket
   Main PID: 2423 (pipewire)
      Tasks: 2 (limit: 28557)
     Memory: 3.2M
        CPU: 62ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/pipewire.service
             └─2423 /usr/bin/pipewire

giu 02 08:09:30 Feynman systemd[529]: Started PipeWire Multimedia Service.

● pipewire-media-session.service - PipeWire Media Session Manager
     Loaded: loaded (/usr/lib/systemd/user/pipewire-media-session.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2022-06-02 08:09:30 CEST; 2h 25min ago
   Main PID: 2424 (pipewire-media-)
      Tasks: 2 (limit: 28557)
     Memory: 4.2M
        CPU: 44ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/pipewire-media-session.service
             └─2424 /usr/bin/pipewire-media-session

giu 02 08:09:30 Feynman systemd[529]: Started PipeWire Media Session Manager.

Maybe I have found a way to make it working. big_smile
I want to be sure I can reproduce it all the times and will publish it here.

Last edited by 0BADC0DE (2022-06-02 08:52:25)


Maybe Computers Will Never Become As Intelligent
As Humans. Surely They Won't Ever Become So Stupid.

Offline

#11 2022-06-02 09:38:12

0BADC0DE
Member
From: Regnum Utriusque Siciliae
Registered: 2018-02-21
Posts: 270

Re: [SOLVED] [KDE/Wayland] Web-based screen sharing not working

[S O L V E D] (kind of)

Spoiler! I did a full ArchLinux reinstall (20220601 ISO) with no wireplumber involved at any stage.

  1. I left all application launcher commands untouched so Firefox and Vivaldi showed up in xlsclients, while Falkon didn't (later on this) .

  2. I installed both extra/xdg-desktop-portal and extra/xdg-desktop-portal-kde as per the wiki.

  3. I tried Firefox v101 with Meet, Teams and Zoom: it works (again) with everything with a KDE-based screen/window selection dialog.

  4. I tried Vivaldi v5.3.2679.36 with Meet, Teams and Zoom: it worked only with non-KDE applications (showing up in xlsclients), and not with entire screen(s). It uses both the KDE-based dialog and an own one. (!)

  5. In vivaldi://flags I enabled WebRTC PipeWire support: it works with everything.

  6. I let Firefox use Wayland by running it with MOZ_ENABLE_WAYLAND=1 in the environment. It works with everything.

  7. I let Vivaldi use Wayland by running it with "--enable-features=UseOzonePlatform" and "--ozone-platform=wayland" options. It works with everything.

I think that wireplumber did something  weird to my PC configuration that outlived it once replaced back with pipewire.
The weird thing is that with Vivaldi (and possibly Chrome/Chromium) I get a weird sequence of requests to activate the screen sharing.
It doesn't really matter to me as long as it works, but it looks rather weird to me:

  1. A Vivaldi-owned dialog that offers to either share my screen (I actually have two) or a Vivaldi tab with a first KDE-owned dialog on top of it offering to either share one of the available screens or any open window.

  2. I skip this KDE dialog by closing it.

  3. In the underling Vivaldi-owned dialog I select the one and only "Entire screen".

  4. A second  KDE-owned dialog pops up offering to either share one of the screens (both) or any open window.

  5. The real choice is the one you do in this very KDE dialog. And it works!

  6. If in the above step no.3 you select a Vivaldi tab, then you don't get the KDE dialog (of course) and you start sharing the tab you choose straight away.

I suspect weird interactions between Vivaldi, Wayland and KDE lead to this weird behavior. Likely a Vivaldi bug, but I am not sure.

Firefox also shows two different sharing dialogs, but in a sequence and not overlapping each other.

  1. A Firefox-owned dialog offering to allow the web application to "see your screen" by selecting a drop down with a single option: "Use operating system settings". You allow.

  2. The usual KDE dialog offering screen and window sharing.

  3. Everything thereafter behaves like in the Vivaldi case.

This behavior looks more "normal" and "reasonable" to me, FWIM.
Though, having a dialog where the dropdown has a single option and the toggle cannot be set by policy makes very little sense.

Last edited by 0BADC0DE (2022-06-02 11:31:17)


Maybe Computers Will Never Become As Intelligent
As Humans. Surely They Won't Ever Become So Stupid.

Offline

Board footer

Powered by FluxBB