Bug 457141 - Whenever Screen Capturing FullScreen Windows Through Pipewire, video stream frozen once fully focused on window
Summary: Whenever Screen Capturing FullScreen Windows Through Pipewire, video stream f...
Status: CLOSED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.26.3
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-25 21:22 UTC by hurricanepootis
Modified: 2023-02-22 21:19 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.27


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description hurricanepootis 2022-07-25 21:22:02 UTC
SUMMARY

Whenever I select an X11 window to screen record on OBS, the recording freezes as soon as the window becomes fullscreen. I was turned away from the obs-studio's github and pipewire's github, and I'm now reporting it to the kwin github, as both projects believe it's an issue concerning itself with kwin.

Let's say I'm playing minecraft, and the game is windowed. I can select the window from the XDG desktop portal selector just fine, and in the recording, I can see my game window and everything going on inside the game. However, whenever the window I'm trying to record is fullscreen X11 window, it freezes on the first frame of being full screen. Even if I select a windowed game, then fullscreen the game, it freezes.

***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Launch KDE using wayland
2. Install OBS and everything needed to record on pipewire
3. Launch OBS, and selected a windowed application (I used minecraft)
4. Start Recording
5. While focused on the app, go fullscreen.
6. Stop recording
7. Observe that the recording frozen whenever gone fullscreen.

OBSERVED RESULT
https://gitlab.freedesktop.org/pipewire/pipewire/uploads/701b528a50e907125e3b4f4a4c17322c/2022-07-25_11-53-45.webm
Pay attention to the resolution on the mangohud overlay

EXPECTED RESULT
For the recording to freeze whenever going fullscreen

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Linux 5.18.14
KDE 5.25.3
KDE Framework 5.96.0
qt5-base 5.15.5+kde+r172
qt5-wayland 5.15.5+kde+r38

ADDITIONAL INFORMATION:
Here are the bug reports I previously submitted to OBS and Pipewire
Pipewire: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2598
OBS: https://github.com/obsproject/obs-studio/issues/6353
Comment 1 chazzy 2022-08-16 11:39:46 UTC
I can confirm this on a Opensuse TW installation running kwin 5.25.4. However I will
Comment 2 chazzy 2022-08-16 11:47:07 UTC
I can confirm this on a Opensuse TW system with kwin 5.25.4. It affects both X11 and native wayland applications, and the same result will occur if you use webcord(a discord web-client) and try to stream a window. However, you can record/stream the entire screen, and it will capture the application in fullscreen mode. It's an alternative for now, but window capture is definitely preferred, and I would love to see a resolution to this problem.
Comment 3 chazzy 2022-08-16 11:52:48 UTC
(In reply to arazadaz from comment #2)
> I can confirm this on a Opensuse TW system with kwin 5.25.4. It affects both
> X11 and native wayland applications, and the same result will occur if you
> use webcord(a discord web-client) and try to stream a window. However, you
> can record/stream the entire screen, and it will capture the application in
> fullscreen mode. It's an alternative for now, but window capture is
> definitely preferred, and I would love to see a resolution to this problem.

I should add that in my experience, it also affects fullscreen-borderless applications. Also, ignore the very first comment. I didn't mean to post it.
Comment 4 babblebones 2022-11-21 14:45:49 UTC
Still affected on the latest KDE 5.26.3
Looks like gnome encountered a similar bug if this is helpful.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1914

Closest associated code in this function?
https://invent.kde.org/plasma/kwin/-/blob/master/src/plugins/screencast/screencastmanager.cpp#L144
Comment 5 Aleix Pol 2022-11-21 23:56:58 UTC
I am going to need some more information there. I've been trying to reproduce the problem and I have been unable so far.
Comment 6 chazzy 2022-11-22 04:55:45 UTC
Hmm, one possible factor not considered is that this bug affects my laptop which uses Nvidia Prime. It has both an igpu and dedicated gpu. Specifically, a gtx1660 ti. I'm not the specifics of the others though.
Comment 7 babblebones 2022-11-22 13:31:21 UTC
Same thing here. I am using DRI_PRIME with a full AMD. Can anyone on this bug report non-hybrid graphics?
Comment 8 hurricanepootis 2023-01-28 04:08:49 UTC
This no longer happens with me, and has been fixed for a while as of 1/27/2023.
Comment 9 chazzy 2023-01-28 07:49:33 UTC
(In reply to hurricanepootis from comment #8)
> This no longer happens with me, and has been fixed for a while as of
> 1/27/2023.

 What distribution are you on? I'm still facing the exact same issue on an updated Manjaro(Unstable Branch) distribution.

What kde versions and frameworks are you running as well? Did you change any settings perhaps that got it to work?
Comment 10 Vlad Zahorodnii 2023-02-02 18:43:11 UTC
https://invent.kde.org/plasma/kwin/-/commit/1c8456890c9120780fefa7bf80a7c58c3a4e0c90 may improve things. Please check whether the issue is still reproducible in 5.27

Also try setting KWIN_DRM_NO_DIRECT_SCANOUT=1 envvar
Comment 11 chazzy 2023-02-03 00:06:02 UTC
(In reply to Vlad Zahorodnii from comment #10)
> https://invent.kde.org/plasma/kwin/-/commit/
> 1c8456890c9120780fefa7bf80a7c58c3a4e0c90 may improve things. Please check
> whether the issue is still reproducible in 5.27
> 
> Also try setting KWIN_DRM_NO_DIRECT_SCANOUT=1 envvar

I'll check it out once my distro pushes 5.27. It should be released pretty soon.
Comment 12 Bug Janitor Service 2023-02-18 03:47:10 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 13 chazzy 2023-02-18 06:11:27 UTC
Took a bit longer than I expected for my distribution to roll out 5.27, but I'm pleased to report this issue as fixed in 5.27!
Comment 14 hurricanepootis 2023-02-22 21:19:14 UTC
It's been fixed since 5.27 for me, so I am going to set this to fixed