Bug 467318

Summary: kwin_wayland high cpu usage when docked
Product: [Plasma] kwin Reporter: meierluis
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: nate, xaver.hugl
Priority: NOR    
Version: 5.27.2   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Archived perf data

Description meierluis 2023-03-14 08:26:25 UTC
Created attachment 157261 [details]
Archived perf data

I am running Plasma 5.27.2 on a Fedora machine with hybrid intel/nvidia graphics. 
Sytem: Lenovo P1 with a RTX A2000

When docking the laptop via USB-C or Thunderbolt to one or multiple external monitors kwin_wayland is constantly above 50% CPU usage. As soon as i move the mouse or do a user input kwin_wayland occupies one CPU with nearly 100% usage and the system gets extremely laggy.

STEPS TO REPRODUCE
1. Attach laptop to dock via USB-C or Thunderbolt
2. Move mouse, window or keyboard inpt

OBSERVED RESULT
100% CPU usage on kwin_wayland, laggy Plasma

EXPECTED RESULT
Non laggy Plasma

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora Linux 37 (KDE Spin)
(available in About System)
KDE Plasma Version: 5.27.2
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 6.1.15-200.fc37.x86_64

I have run: 
sudo perf record --call-graph dwarf -p `pidof kwin_wayland`
as suggested in another post.
Seems like "__memmove_avx_unaligned_erms" seems to be the part where the high load is generated.

I have attached the archived perf.data file, which was created with 'perf archive'.
Comment 1 Zamundaaa 2023-03-14 20:44:49 UTC

*** This bug has been marked as a duplicate of bug 452219 ***