Bug 491342 - Kde Portal for window capture causes an instant freeze of an resource heavy task.
Summary: Kde Portal for window capture causes an instant freeze of an resource heavy t...
Status: REPORTED
Alias: None
Product: xdg-desktop-portal-kde
Classification: Plasma
Component: general (show other bugs)
Version: 6.1.3
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: wayland-only
Depends on:
Blocks:
 
Reported: 2024-08-06 10:58 UTC by 2jf5vualr5
Modified: 2025-01-07 06:55 UTC (History)
5 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description 2jf5vualr5 2024-08-06 10:58:17 UTC
I am unable to get any crash log the closest thing I got was an obs log file which didnt contain anything useful.


STEPS TO REPRODUCE
1. Open any screen capture/window capture software that asks for a kde portal
2. Switch capture to window selection and select a resource heavy task like a video game
3. alt tab into the heavy task
4. instant process freeze
5.alt tab back out of the heavy process 
6. process comes back to life and is responsive
7.alt tab back into it and we're back to step 4
!you dont even have to start recording anything selecting the portal just causes an instant freeze not even starting a recording inside obs etc. this also applies to other software like discord screensharing!
!this does not happen while using screen capture for the entire desktop(using a kde portal) or even the obs-gamecapture plugin it's only related to selecting a certain resource heavy windows so selecting kdenlive any video game etc.
(window capture is only effected)!

OBSERVED RESULT
Process lags and is unresponsive for a brief moment until you alt tab out of it then it comes back to life for a short period of time after you alt tab back into it and then it lags.

EXPECTED RESULT
Stable gameplay or usage of the process without it freezing while screen casting a window via a kde portal and actively using the window.

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 40 (kde spin)
KDE Plasma Version: 6.1.3
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.2
Kernel Version: 6.9.12-200.fc40.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 5600 6-Core Processor
Graphics Processor: AMD Radeon RX 6700 XT

I am willing to provide more details if guided how to do so unfortunately this is not even detected by kde crashed process viewer or by anything else really so I cant get a backtrace or even a log file.
Comment 1 fanzhuyifan 2024-08-06 15:18:18 UTC
Might be because the window capture shows window previews for all windows.
Comment 2 Nate Graham 2024-08-06 19:01:33 UTC
Could be, yes.
Comment 3 2jf5vualr5 2024-08-07 11:46:29 UTC
(In reply to fanzhuyifan from comment #1)
> Might be because the window capture shows window previews for all windows.

Maybe, but to be more precise loading the window inside a kde portal doesnt cause the freeze the freeze only happens when you go ahead to pass through the window to an recording software of your choice like obs etc. so only when the kde portal is already passing through. I am not really technical but what you have mentioned also could be the case.
Comment 4 sidpranjale127 2025-01-07 06:55:20 UTC
I'm observing similar behavior. The selected app for window capture freezes while in focus if it's a fullscreen app, but works correctly if it's not in focus or not fullscreen.