Bug 494665

Summary: Desktop freezes when closing file picker dialog used by KDE apps after using Audacity for a while
Product: [Plasma] kwin Reporter: Timothy B <yule2000>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: REPORTED ---    
Severity: major Keywords: wayland-only
Priority: NOR    
Version First Reported In: 6.2.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Timothy B 2024-10-13 13:55:11 UTC
SUMMARY
The entire desktop would freeze for a couple of seconds when you close a KDE Frameworks-based file dialog, only if you've previously opened a GTK-based file dialog in the current session.

STEPS TO REPRODUCE
1. Open any app that does not support the DE-native file picker dialog through xdg-desktop-portal-kde (in my case, it was Audacity)
2. Go to File > Open... to open the file picker for that app and double-click a file to open it
3. Open another app that supports the DE-native file picker dialog (e.g., any KDE app or Firefox)
4. Open the file dialog for that app (e.g., by pressing Ctrl+O) and close it

OBSERVED RESULT
The entire screen, including the mouse cursor, would lock up for about a second. The length of subsequent freezes would get progressively worse if I use the GTK file dialog multiple times.

EXPECTED RESULT
No freezes

SOFTWARE/OS VERSIONS
Operating System: EndeavourOS 
KDE Plasma Version: 6.2.0
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.3
Graphics Platform: Wayland
Graphics Processor: AMD Radeon RX 6750 XT
Graphics Driver: Mesa (AMDGPU)

ADDITIONAL INFORMATION
When I repeatedly press a key during the freeze, I get this message in journalctl:
kwin_wayland_wrapper[253591]: Key repeat discarded, Wayland compositor doesn't seem to be processing events fast enough!

I was running Audacity 3.6.4 when I realized what triggered this bug, and the app only runs on Xwayland as of that version. The earliest version of Plasma I remember seeing this happen was 6.1.

The freezing would stop when I log out and log back in. It would also stop after I run `pkill -ABRT -f 'kwin_wayland.*socket'` to force the compositor to restart without ending my session.
Comment 1 Timothy B 2025-03-13 01:18:36 UTC
Still reproducible as of Plasma 6.3.3. It seems that I can only get the freezes to work after using Audacity for a while; I could not get KWin to freeze after closing the file picker window when using other GTK-based apps.