Bug 465302 - 5.27: Ending a Pipewire recording / screen sharing does not actually end it
Summary: 5.27: Ending a Pipewire recording / screen sharing does not actually end it
Status: RESOLVED FIXED
Alias: None
Product: xdg-desktop-portal-kde
Classification: Plasma
Component: general (show other bugs)
Version: 5.26.90
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-05 04:00 UTC by Naxdy
Modified: 2023-02-08 00:35 UTC (History)
4 users (show)

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


Attachments
Showcase of the bug (recording continues despite "ended") (1.96 MB, video/x-matroska)
2023-02-05 04:00 UTC, Naxdy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Naxdy 2023-02-05 04:00:39 UTC
Created attachment 155949 [details]
Showcase of the bug (recording continues despite "ended")

SUMMARY
When sharing a screen / window using Pipewire, an indicator appears in the system tray which is supposed to be able to be used for ending the recording / sharing at any time. However, it doesn't work at all currently.

I've attached a simple video which, as you can see, continues to record even after the recording has been "ended". The behavior is the same regardless of application (also tested using Firefox screen share).

It does not matter whether the recording is "ended" using right click -> end, or left click -> end (in the popup).

STEPS TO REPRODUCE
1. Begin any screen / window sharing.
2. "End" the sharing using the system tray indicator.

OBSERVED RESULT
The indicator disappears, but the recording / sharing continues uninterrupted.

EXPECTED RESULT
The indicator disappears and the recording / sharing stops (forcefully, i.e. via freezing, if need be).

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Gentoo / 5.27 beta
(available in About System)
KDE Plasma Version: 5.27 beta
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
-
Comment 1 Nate Graham 2023-02-06 23:06:23 UTC
Eek, can confirm.
Comment 2 Naxdy 2023-02-07 00:36:58 UTC
Additional Info: This seems to only affect apps running outside flatpak. Those running under flatpak (tested with Slack & Google Chrome) have their recording / streaming freeze when the "end" button is clicked (expected behavior imo).

Sometimes the app crashes, but I think that's an issue at the client side.
Comment 3 Naxdy 2023-02-07 20:16:01 UTC
Think I've found the issue, MR is up: https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/159
Comment 4 Aleix Pol 2023-02-08 00:27:31 UTC
Git commit eb95725ed7ca64bd52d19dd464ada7e982441cf4 by Aleix Pol Gonzalez, on behalf of Dominique Hummel.
Committed on 08/02/2023 at 00:27.
Pushed by apol into branch 'master'.

fix streams not being ended correctly

When closing a screencast session, the `closed` signal is emitted too late, this MR addresses that issue.

Tested in Firefox and OBS using window & screen sharing, ending the recording now always either freezes the stream, or disables it (depending on app).

M  +3    -2    src/session.cpp

https://invent.kde.org/plasma/xdg-desktop-portal-kde/commit/eb95725ed7ca64bd52d19dd464ada7e982441cf4
Comment 5 Aleix Pol 2023-02-08 00:27:58 UTC
Git commit c6605b4ef3784b04f242afe8331b2095bf4d298e by Aleix Pol Gonzalez, on behalf of Dominique Hummel.
Committed on 08/02/2023 at 00:27.
Pushed by apol into branch 'cherry-pick-eb95725e'.

fix streams not being ended correctly

When closing a screencast session, the `closed` signal is emitted too late, this MR addresses that issue.

Tested in Firefox and OBS using window & screen sharing, ending the recording now always either freezes the stream, or disables it (depending on app).


(cherry picked from commit eb95725ed7ca64bd52d19dd464ada7e982441cf4)

M  +3    -2    src/session.cpp

https://invent.kde.org/plasma/xdg-desktop-portal-kde/commit/c6605b4ef3784b04f242afe8331b2095bf4d298e