Bug 452657

Summary: [kwin_wayland] 100% cpu usage after user switching
Product: [Plasma] kwin Reporter: c56w1t63
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: buddha, c56w1t63, nate, notmart, smirky
Priority: NOR    
Version First Reported In: 5.24.4   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: gdb backtrace

Description c56w1t63 2022-04-15 12:14:44 UTC
SUMMARY
After user switching kwin_wayland on 100% cpu usage

STEPS TO REPRODUCE
1. kwin_wayland session in user A
2. switch to user B

OBSERVED RESULT
Often 1 cpu core is on 100% from process of user A:
/usr/bin/kwin_wayland --wayland-fd 5 --socket wayland-0 --xwayland-fd 6 --xwayland-fd 7 --xwayland-display :1 --xwayland-xauthority /run/user/1001/xauth_zJPcnB --xwayland

If I switch back to user A the cpu usage is back to normal, but sometimes kwin_wayland from user B is up to 100% again and vice verca.

EXPECTED RESULT
Normal cpu usage

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.93.0
Qt Version: 5.15.3
Kernel Version: 5.17.3
Graphics Platform: Wayland

ADDITIONAL INFORMATION
Comment 1 Marco Martin 2022-04-19 13:59:49 UTC
can you on the active session do gdb attach (the pid of the *other* running kwin, not the one which is rendering on the screen at the moment)

at that point you can do ctrl+c and then bt to obtain a backtrace to see where it was at that moment
Comment 2 Marco Martin 2022-04-19 14:05:50 UTC

*** This bug has been marked as a duplicate of bug 452726 ***
Comment 3 c56w1t63 2022-04-19 14:54:08 UTC
Created attachment 148244 [details]
gdb backtrace

sudo gdb -pid 3332 -batch -ex "set logging file kwin_wayland.gdb" -ex "set logging on" -ex "continue" -ex "thread apply all backtrace" -ex "quit"
Comment 4 c56w1t63 2022-05-01 14:28:32 UTC
Any ideas? Because I can't work with multi user logged in as the cpu and fan usage is really high then.