Bug 452657 - [kwin_wayland] 100% cpu usage after user switching
Summary: [kwin_wayland] 100% cpu usage after user switching
Status: RESOLVED DUPLICATE of bug 452726
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.24.4
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-15 12:14 UTC by kt47uo5uvzw
Modified: 2022-08-01 20:21 UTC (History)
5 users (show)

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


Attachments
gdb backtrace (9.69 KB, text/plain)
2022-04-19 14:54 UTC, kt47uo5uvzw
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kt47uo5uvzw 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 kt47uo5uvzw 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 kt47uo5uvzw 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.