Bug 490896 - kwin enters a state in which it hangs for some time on various effects
Summary: kwin enters a state in which it hangs for some time on various effects
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: performance (other bugs)
Version First Reported In: 6.0.5
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-27 16:30 UTC by SDon
Modified: 2024-07-29 13:49 UTC (History)
1 user (show)

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


Attachments
A relevant part of journal (267.44 KB, image/png)
2024-07-27 16:30 UTC, SDon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description SDon 2024-07-27 16:30:51 UTC
Created attachment 172053 [details]
A relevant part of journal

SUMMARY
When I wanted to ALT+TAB out of a gamescope window, the whole desktop hanged for around 10-15 secs (even the mouse). I could not change VT either. I could trigger this with ALT+TAB after this consistently, and with hovering over on taskbar items (to show the hovered over window). Switching apps on taskbar via the mouse (without letting the hover trigger) didn't cause a hang. Also I noticed that on one of my monitors the framerate seemed normal (144Hz monitor), but on the other one (60 Hz monitor) it was low, 20-30 ish. The hang did not affect audio. There is some Pageflip timed out errors in the journal, so it might be some kind of driver/kernel issue. kwin used around 60% CPU according to htop (so it should be a single core)
The system had an uptime of 5 days without any problem, and this didn't happen before either. Rebooting solved it, and now I can't make kwin go into this state anymore.
Also, I'm not sure if I selected the correct component

STEPS TO REPRODUCE
I can't reproduce it now. But I did the following that triggered it somehow:
1. Start a game in gamescope with forced mouse capture
2. The given window is smaller than the screen resolution, however the mouse is grabbed. Try to resize the window (it won't let you). Then try to maximize the window
3. Press ALT+TAB

OBSERVED RESULT
Desktop hangs for 10-15 secs, and subsequent ALT+TABs hang it too.

EXPECTED RESULT
Desktop shouldn't hang.

SOFTWARE/OS VERSIONS
Operating System: Manjaro Linux 
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.2
Kernel Version: 6.10.0-3-MANJARO (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: AMD Radeon RX 590 Series

The Kernel version was 6.9, but I have rebooted since then with the updated kernel (other stuff was the same).

ADDITIONAL INFORMATION
I have some perf output, but it's too big for an attachment and I'm not sure how I should cut some of it out
Comment 1 Zamundaaa 2024-07-29 13:25:06 UTC
> There is some Pageflip timed out errors in the journal, so it might be some kind of driver/kernel issue
Indeed. If it happens again, please report it to https://gitlab.freedesktop.org/drm/amd/-/issues and attach the output of "sudo dmesg" there
Comment 2 SDon 2024-07-29 13:49:50 UTC
(In reply to Zamundaaa from comment #1)
> > There is some Pageflip timed out errors in the journal, so it might be some kind of driver/kernel issue
> Indeed. If it happens again, please report it to
> https://gitlab.freedesktop.org/drm/amd/-/issues and attach the output of
> "sudo dmesg" there

Thanks for the link! Apparently there is an open issue there that seems to be the same as mine, I'll leave the link here for anyone that finds this bug report: https://gitlab.freedesktop.org/drm/amd/-/issues/3304