Bug 408639 - Very high CPU usage on first core from KWin and Xorg
Summary: Very high CPU usage on first core from KWin and Xorg
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: core (show other bugs)
Version: 5.16.0
Platform: Neon Linux
: NOR major
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-13 10:05 UTC by Rafał
Modified: 2019-06-14 10:20 UTC (History)
0 users

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


Attachments
screenshots of KSysGuard and htop (2.19 MB, application/gzip)
2019-06-13 10:05 UTC, Rafał
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rafał 2019-06-13 10:05:10 UTC
Created attachment 120838 [details]
screenshots of KSysGuard and htop

SUMMARY
Hello everyone,
I'm experiencing an issue with very high CPU usage (50-100%) on CPU 1 (always first core) that happens after several minutes or hours of using the system. First I want to say that I have tried both Kubuntu with Plasma 5.15.4 and KDE Neon with Plasma 5.16.0 and both have the same issue with Xorg and KWin processes no matter what kernel I choose. This issue makes my system unusable as the temperature goes high and I'm experiencing throttling.

The problem is hard to reproduce and it seems to happen randomly no matter if it's idle or not. Sometimes after a few minutes and sometimes after 1-2 hours but it always happen. 

Here's some facts about the issue:
- KWin, plasmashell and Xorg processes are producing 30-100% CPU usage but only one of them at a time, I've never seen all of them having high CPU usage at one time. It seems like they're exchanging or something.
- only CPU core 1 is affected, the issue never happened to any other core.
- when the issue kicks in it's impossible to fix it by logging out and in.
- it's impossible to fix the issue by executing kwin_x11 --replace
- it's impossible to fix the issue by ALT+SHIFT+F12 once it started happening
- it appears to be fixed after reboot but starts again after some time (a few minutes, hours)
- the issue exists on OpenGL 2.0, OpenGL 3.1 and Xrender settings of Compositor.
- the issue exists on all the kernels I tested 4.18 - 5.1
- the issue seems to be related with Plasma only as it doesn't happen on Gnome.
- the issue happens on both Nvidia and Intel GPUs
- I have tried 390 and 418 nvidia driver, nothing changed
- the issue never happens immediately after starting the system
- once it started the CPU usage rises when moving cursor around the tray icons so they're highlighted.
- no errors in syslog

I can share my desktop through TeamViewer if needed. Thank you for your time, I really love KDE but this issue makes it impossible to use for me.

STEPS TO REPRODUCE
-

OBSERVED RESULT
CPU usage on core 1 spikes up to 100% and sometimes stays at 100% for several seconds.

EXPECTED RESULT
CPU usage stays at 2-5% while idle.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: KDE Neon 5.16, Kubuntu 19.04, 19.10
(available in About System)
KDE Plasma Version: 5.16.0, 5.15.4
KDE Frameworks Version: 5.59
Qt Version: 5.12.3

ADDITIONAL INFORMATION
HP Pavilion 14, Intel UHD 620 + Nvidia MX150, updated BIOS
Comment 1 Rafał 2019-06-13 20:59:11 UTC
I was able to reproduce the issue, it happens when CPU or GPU is under heavy load and the temperature is high. Then it's impossible to cool down due to the high CPU usage from kwin and plasmashell.
Comment 2 Rafał 2019-06-14 09:29:14 UTC
I think I fixed the issue by moving from SDDM to GDM3. Still I do not know why would SDDM cause this issue. What I did see is that SDDM starts xorg with different parameters than GDM3.

I'll report here if anything changes.
Comment 3 Martin Flöser 2019-06-14 10:20:00 UTC
This doesn't look like a KWin issue.