Bug 510125

Summary: Unreasonable CPU usage by kwin_wayland while full screen video playback
Product: [Plasma] kwin Reporter: l4gfcm
Component: performanceAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: nate
Priority: NOR Keywords: efficiency-and-performance
Version First Reported In: 6.4.5   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 6.4.5
Sentry Crash Report:
Attachments: top and intel_gpu_top

Description l4gfcm 2025-10-01 13:28:57 UTC
Created attachment 185426 [details]
top and intel_gpu_top

SUMMARY
Playing a full screen video with Firefox on a 4K display results in > 30% CPU usage by the kwin_wayland process.
 
STEPS TO REPRODUCE
1. Run a video playback in Firefox full screen on a 4K monitor 
2. Check 'top' on a second monitor

OBSERVED RESULT
'top' shows constant CPU usage of more that 30% 

EXPECTED RESULT
CPU usage should not be so high

SOFTWARE/OS VERSIONS
KDE Plasma Version: 6.4.5
KDE Frameworks Version: 6.18.0
Qt Version: 6.9.2

ADDITIONAL INFORMATION
- The CPU is Intel i5-1135G7, I'm using integrated graphic (Mesa Intel Iris Xe Graphics).
- I asked a friend to test this scenario with SwayFX - he had around 4% CPU usage by his compositor. Although he has a different platform - desktop with a dedicated GPU.
- If a youtube video isn't opened in full screen the CPU usage by kwin is around 6.5%.
- Attaching screenshot with 'top' and 'intel_gpu_top' which I run on the second screen.
- I wasn't been able to make 'All Screens' screenshot with Spectacle while a video was playing - the result seems to be corrupted. Probably off topic, but could be related.
Comment 1 l4gfcm 2025-10-10 13:11:05 UTC
Looks fixed in Arch kwin 6.4.5-4. CPU usage in described scenario is ~6%. Would be great to get another confirmation but seems like the bug report can be closed.
Comment 2 Nate Graham 2025-10-10 13:37:35 UTC
I can confirm this with my AMD GPU too. CPU usage is now nice and low, as expected!