Bug 482594 - [Fixed on beta 6.0.90] Screen sharing/recording fails with error message "Failed to connect PipeWire context"
Summary: [Fixed on beta 6.0.90] Screen sharing/recording fails with error message "Fai...
Status: RESOLVED FIXED
Alias: None
Product: KPipeWire
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: HI grave
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: qt6, regression
: 483410 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-03-06 21:51 UTC by Andrés Becerra
Modified: 2024-06-05 20:59 UTC (History)
17 users (show)

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


Attachments
attachment-3156249-0.html (127 bytes, text/html)
2024-06-05 13:22 UTC, jan.claussen10
Details
attachment-3160421-0.html (51 bytes, text/html)
2024-06-05 13:46 UTC, jan.claussen10
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrés Becerra 2024-03-06 21:51:29 UTC
SUMMARY
***
For plasma-6.0.0 and plasma-6.0.1 I can not share my screen (screen recording) in a Wayland session.
The application I am using is zoom:
 - If I start an X11 session, screen recording (or sharing screen) is possible
 - For plasma-5.27.10 I was able to share screen in Wayland and X11 sessions
***

STEPS TO REPRODUCE (In a wayland session)
1. Start zoom
2. Create a new meeting
3.  Try to share screen (Desktop)

OBSERVED RESULT

I get the notification:

KDE Portal Integration
Failed to start screencasting
Failed to connect PipeWire context

EXPECTED RESULT
Sharing the desktop using zoom

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
KDE Plasma Version: 6.0.1
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2

ADDITIONAL INFORMATION

If I try to record the desktop activity in a Wayland session with spectacle, it fails with the message:
Failed to connect PipeWire context
In an X11 session spectacle does not provide the option to record the desktop
Comment 1 Nate Graham 2024-03-07 19:28:49 UTC
What GPU are you using?
Comment 2 Andrés Becerra 2024-03-07 22:26:39 UTC
(In reply to Nate Graham from comment #1)
> What GPU are you using?

Mesa Intel Xe Graphics, lspci output:
0000:00:02.0 VGA compatible controller: Intel Corporation TigerLake-LP GT2 [Iris Xe Graphics] (rev 03)
Comment 3 gigastarcraft2 2024-03-08 02:11:54 UTC
(In reply to Nate Graham from comment #1)
> What GPU are you using?

Sam here, on 5.27 I could run OBS on both Wayland and X11. Now on Plasma 6 I can only on X11. Radeon 5700xt.
Comment 4 Nate Graham 2024-03-13 21:37:13 UTC
*** Bug 483410 has been marked as a duplicate of this bug. ***
Comment 5 Nate Graham 2024-03-13 21:37:38 UTC
Y'all have rebooted after performing the upgrade, right?
Comment 6 Alfred Wingate 2024-03-13 21:57:34 UTC
(In reply to Nate Graham from comment #5)
> Y'all have rebooted after performing the upgrade, right?

Yes.

Are there good ways to debug this further? I couldn't scrounge anything from pipewire logs. So I guess the issue somewhere between portals and kpipewire.

Operating System: Gentoo Linux 2.15
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.8.0-xanmod1-dist (64-bit)
Graphics Platform: Wayland
Graphics Processor: AMD Radeon RX 5700 XT
Comment 7 ozonehelix 2024-03-21 13:58:44 UTC
I am having this same issue 
Operating System: Arch Linux 
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.8.1-zen1-1-zen (Zen Kernel)
Graphics Platform: Wayland

xwaylandvideobridge
[1]    29757 segmentation fault (core dumped)  xwaylandvideobridge
Comment 8 ozonehelix 2024-03-21 14:05:17 UTC
(In reply to ozonehelix from comment #7)
> I am having this same issue 
> Operating System: Arch Linux 
> KDE Plasma Version: 6.0.2
> KDE Frameworks Version: 6.0.0
> Qt Version: 6.6.2
> Kernel Version: 6.8.1-zen1-1-zen (Zen Kernel)
> Graphics Platform: Wayland
> 
> xwaylandvideobridge
> [1]    29757 segmentation fault (core dumped)  xwaylandvideobridge

before the error I was getting is org.kde.xwaylandvideobridge: XDG session failed: QMap() 2
now it just either segmentation faults or screen share appears in discord but doesn't do anything when selected
Comment 9 RustyStriker 2024-06-05 12:17:24 UTC
Same issue, trying to dig a bit but cannot really find anything, when running xdg-desktop-portal-kde in the terminal i get the following:

error creating screencast "Failed to connect PipeWire context"
error creating screencast "Failed to connect PipeWire context"
xdp-kde-screencast: QScreen(0x5d650f439aa0, name="DP-3") Screencasting::Metadata
xdp-kde-wayland-integration: failed to start streaming ScreencastingStream(0x5d650fd00f00, name = "DP-3") "Failed to connect PipeWire context"
xdp-kde-screencast: Invalid screen! 2 "0x0"

Tried digging a bit in xdg-desktop-portal-kde, and it seems to happen when the ScreencastingStream object is emitting the failed signal under QtWayland::zkde_screencast_Stream_unstable_v1which gets me into the cmake generated files or something
Comment 10 jan.claussen10 2024-06-05 13:22:03 UTC
Created attachment 170167 [details]
attachment-3156249-0.html

I really hope this gets solved soon. This issue is forcing me to use X, which can't handle per-monitor scaling.
Comment 11 Andrés Becerra 2024-06-05 13:27:30 UTC
This is solved in the plasma desktop beta (6.0.90) . 

Now I can share my desktop in zoom sessions and spectacle can record videos of the desktop.
 
This is on a Gentoo box with:
KDE Plasma Version: 6.0.90
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.1
Kernel Version: 6.9.3-gentoo-x86_64 (64-bit)
Graphics Platform: Wayland
Comment 12 jan.claussen10 2024-06-05 13:46:28 UTC
Created attachment 170168 [details]
attachment-3160421-0.html

How long will this take to get released?
Comment 13 David Edmundson 2024-06-05 16:58:24 UTC
https://community.kde.org/Schedules/Plasma_6
Comment 14 jan.claussen10 2024-06-05 20:59:35 UTC
(In reply to David Edmundson from comment #13)
> https://community.kde.org/Schedules/Plasma_6

Thanks, this is great news!