Bug 432676 - High CPU usage (10-15%)
Summary: High CPU usage (10-15%)
Status: RESOLVED WORKSFORME
Alias: None
Product: plasmashell
Classification: Plasma
Component: generic-performance (other bugs)
Version First Reported In: 5.20.5
Platform: Manjaro Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-09 06:12 UTC by Dero
Modified: 2023-09-08 03:45 UTC (History)
3 users (show)

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


Attachments
plasmashell 18 cpu (40.28 KB, image/png)
2021-02-15 09:25 UTC, Dero
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dero 2021-02-09 06:12:37 UTC
SUMMARY
I have Plasma + i3. After some of the latest updates I notice that plasmashell loads around 10-15% CPU instead of 0-3% as it was before.
When I login in KDE+plasma session, CPU usage is Ok, but when I use i3+plasma, cpu usage is too high.
I trying to remove ~/.config dir. After that cpu usage stabilized in 0-3%, but all apps became unthemed (no icons, white backgrounds, strange huge fonts, etc). Applying Global theme not helped.
Seems removing ~/.config dir can be a solution, but how can I recreate theme files after that?


STEPS TO REPRODUCE
1. Install fresh Manjaro KDE
2. Install i3 with the following guide: https://github.com/heckelson/i3-and-kde-plasma

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Manjaro kernel 5.10.7-3, 64-bit
(available in About System)
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
sudo strace -p
shows that plasmashell process spamming that message:
poll([{fd=5, events=POLLIN}, 

Pastebin:
https://pastebin.com/z1zP4dHa
Comment 1 Dero 2021-02-09 17:57:44 UTC
I remove setting files according to this post:
https://forum.manjaro.org/t/how-reset-all-kde-settings/21518/3

And CPU usage stabilized.
Comment 2 Nate Graham 2021-02-09 19:24:41 UTC
Are you saying that you were seeing this CPU usage when using a 3rd-party theme, and it went away when going back to the default theme via removing the config files? If so, which 3rd-party theme was it?
Comment 3 Dero 2021-02-10 05:49:16 UTC
(In reply to Nate Graham from comment #2)
> Are you saying that you were seeing this CPU usage when using a 3rd-party
> theme, and it went away when going back to the default theme via removing
> the config files? If so, which 3rd-party theme was it?

I used standard Breath theme before and now, no custom themes. I just replaced kwin to i3.
I tried krohnkite addon for tiling but it have bugs. I like KDE apps and infrastructure so I want to use all the benefits of qt and plasma with a good tiling which provides i3 WM.
Comment 4 Nate Graham 2021-02-10 06:25:54 UTC
Let's try to only change one thing at a time so we can narrow down where the problem lies. You were seeing the high CPU usage with Breath, but it goes away when using Breeze?
Comment 5 Dero 2021-02-10 06:58:27 UTC
(In reply to Nate Graham from comment #4)
> Let's try to only change one thing at a time so we can narrow down where the
> problem lies. You were seeing the high CPU usage with Breath, but it goes
> away when using Breeze?

1) I use standard Breath theme, i3 + plasma without kwin, setup according with the following guide: https://github.com/heckelson/i3-and-kde-plasma
2) After some of the latest update I noticed that plasmashell uses 10-15% CPU, but before it uses 0-3%.
Logs: https://pastebin.com/z1zP4dHa
3) I tried delete (backuped) ~/.config but after that all icons are missing (as example in the Dolphin), all UI elements become white, fonts changed. I tried to change theme but no luck.
4) I restore ~/.config backup
5) I remove settings with the following guide: https://forum.manjaro.org/t/how-reset-all-kde-settings/21518/3
6) All app settings reset, but Breathe theme, icons and some other stuff stayed. CPU usage by plasmashell became 0-3%
Comment 6 Nate Graham 2021-02-10 14:40:41 UTC
Can you see if you can figure out which setting was causing the high CPU usage?
Comment 7 Dero 2021-02-10 15:15:57 UTC
(In reply to Nate Graham from comment #6)
> Can you see if you can figure out which setting was causing the high CPU
> usage?

Unfortunately not, all not-standard extensions that I use is "System Load Viewer" and "Network Speed" in the panel. But I use its now and all Ok.
Comment 8 Nate Graham 2021-02-10 15:19:18 UTC
Hmm, there is probably no way to debug this then, as the environment the produced is has been lost. If it happens again, please try to remove things one at a time, or back up your old settings so we can debug.
Comment 9 Dero 2021-02-15 09:25:16 UTC
Created attachment 135692 [details]
plasmashell 18 cpu
Comment 10 Dero 2021-02-15 09:25:55 UTC
Looks like after onther system update plasmashell again started uses huge amount of CPU (see screenshot above)
Comment 11 Dero 2021-02-15 11:03:40 UTC
(In reply to Nate Graham from comment #8)
> Hmm, there is probably no way to debug this then, as the environment the
> produced is has been lost. If it happens again, please try to remove things
> one at a time, or back up your old settings so we can debug.

Can you please recommend how to troubleshot and fix the problem (it's happens again, I reopened the bug)?
Comment 12 Nate Graham 2021-02-16 15:47:55 UTC
That's the limits of my expertise, sorry. :(
Comment 13 Dero 2021-02-19 04:42:23 UTC
The following commands didn't help: 
cd ~/
rm -rf .kde
rm -rf .cache/plasmashell*
rm -rf .cache/org.kde.dirmodel-qml.kcache
rm -rf .cache/kioexec/ .cache/krunner/ .cache/ksycoca5*
rm -rf .cache/krunnerbookmarkrunnerfirefoxdbfile.sqlite

The following commands Helps: 
cd ~/
rm -rf .kde
rm -rf .cache/plasmashell*
rm -rf .cache/org.kde.dirmodel-qml.kcache
rm -rf .cache/kioexec/ .cache/krunner/ .cache/ksycoca5*
rm -rf .cache/krunnerbookmarkrunnerfirefoxdbfile.sqlite
rm -f .config/plasma*
rm -rf .config/kde*
Comment 14 Dero 2021-02-19 05:00:35 UTC
Seems the problem connect with plasma widgets.
When I add the "System Load Viewer" and "Network speed" to my two panels, plasmashell starting uses ~10% CPU
Comment 15 David Edmundson 2021-02-22 23:39:58 UTC
Plausible, can you confirm your graphic card information and reopen
Comment 16 Dero 2021-02-23 04:50:44 UTC
(In reply to David Edmundson from comment #15)
> Plausible, can you confirm your graphic card information and reopen

    description: Computer
    width: 64 bits
    capabilities: smp vsyscall32
  *-core
       description: Motherboard
       physical id: 0
     *-memory
          description: System memory
          physical id: 0
          size: 15GiB
     *-cpu
          product: AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx
          vendor: Advanced Micro Devices [AMD]
          physical id: 1
          bus info: cpu@0
          size: 3446MHz
          width: 64 bits
Comment 17 Bug Janitor Service 2021-03-10 04:33:43 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 18 Noah Davis 2023-08-09 20:55:08 UTC
Is this still an issue for you with Plasma 5.27? We've replaced the old system load widget with a newer widget, so it's possible that the cause of this bug no longer exists.
Comment 19 Bug Janitor Service 2023-08-24 03:45:30 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 20 Bug Janitor Service 2023-09-08 03:45:25 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!