Skip to main content
Topic: Screen-sharing not working after installing Plasma 6 (Wayland) (Read 2528 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Screen-sharing not working after installing Plasma 6 (Wayland)

Recently, I've been unable to use the screen sharing features of OBS and Discord (Vesktop) (should apply to any other apps that prompt a window). Whenever I attempt to screen share, in this case, specifically Discord (Vesktop), my windows have no previews and I'm given this error by KDE alongside this block in the terminal:



Code: [Select]
[15441:0323/002040.993574:ERROR:screencast_portal.cc(367)] Failed to start the screen cast session.
[15441:0323/002040.993589:ERROR:base_capturer_pipewire.cc(81)] ScreenCastPortal failed: 3
Error during screenshare picker Failed to get sources.
(node:15441) UnhandledPromiseRejectionWarning: TypeError: Video was requested, but no video stream was provided
    at AsyncFunction.<anonymous> (VCDMain:40:2158)
(node:15441) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch().  To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 5)

I use the dinit init system and pipewire is on a KDE autostart login script. X11 seems to be able to screen share fine, however.

Re: Screen-sharing not working after installing Plasma 6 (Wayland)

Reply #1
hi,
the wayland "paint" is still fresh, some things dont work with it (for exemple, the nvidia driver :p)
for now, you should use X11 and wait a bit more to use wayland


Re: Screen-sharing not working after installing Plasma 6 (Wayland)

Reply #3
I probably found a way to fix the problem. I created a simple script to run pipewire:

/home/username/.script/pipewire.sh

Code: [Select]
#!/bin/sh
/usr/bin/pipewire & /usr/bin/pipewire-pulse & /usr/bin/wireplumber

then I added a command to .bash_profile file to run the script after starting a new shell

/home/username/.bash_profile

Code: [Select]
...
exec /home/username/.scripts/pipewire.sh &
...

Currently, I have no problem with the message "Failed to connect PipeWire context". For example, OBS captures the screen correctly.


Re: Screen-sharing not working after installing Plasma 6 (Wayland)

Reply #4
I had this same issue with runit/kde except that it errors out without leaving any logs or messages anywhere, dmesg, /var/log, --verbose came up with nothing.
I was starting pipewire/pipewire-pulse/wireplumber in a audiostart.sh script I had, and I used KDE's autostart to do it and had the issue. Also, when using pipewire-media-session it had the same result, which is the default after updating from a fresh install of the KDE/runit ISO. My environment variables had all the correct things for dbus, xdg, etc.

I just tried adding my audiostart script to .bash_profile and now OBS works, and Discord is able to get an input (but discord spams the screencast portal and then fails to get the stream).
Just tried out vesktop and it works perfectly.

 

Re: Screen-sharing not working after installing Plasma 6 (Wayland)

Reply #5
I probably found a way to fix the problem. I created a simple script to run pipewire:

There is https://gitea.artixlinux.org/packages/pipewire/src/branch/master/artix-pipewire-launcher already.
Or dinit user services: https://forum.artixlinux.org/index.php/topic,6929.0.html.