21

I'm running Kubuntu 16.04 with KDE 5.5.5 and I've noticed an anomaly in cpu consumption by the plasmashell process.

htop output

Do you have any idea of the reason?

Wafie Ali
  • 287
  • 3
  • 13
Alessandro Gaballo
  • 365
  • 1
  • 2
  • 10
  • 3
    Do you have some animated widget? I turned off the CPU load monitor and my CPU consupmition drop to ~5%. – Sósthenes Neto Nov 30 '16 at 13:41
  • Nope, nothing animated – Alessandro Gaballo Dec 04 '16 at 17:44
  • 1
    I experienced the same issues from time to time, even though in my case CPU does not ramp up to 100% (maybe because I get nervous and kill plasmashell when it approaches 80% ). However, last time it happened (a few minutes ago), /var/crash was empty. My personal workaround is to push alt-F2 and type `kquitapp plasmashell`, then wait for plasma to die and then alt-F2 and `plasmashell'. It takes only a few tens of seconds and works quite well. Just like having to clean the spark plugs of an old car to make it run after each rain shower... :-/ – user5812071 Dec 06 '16 at 14:34
  • I just encountered this issue, but for me it was caused by an animated widget: namely the notifications widget in the system tray being animated by copying a set of files over the network. I haven't found a way to be able to show the notification without a heavy CPU load though. – Supernormal Dec 22 '16 at 21:09
  • 1
    which Graphic Driver you using? Nvidia? and lspci -v? – mlibre Feb 09 '17 at 12:28
  • @SósthenesNeto thank you so much! for me it was the comic strip widget. Removed it and plasmashell dropped from 100% CPU to 0.3% CPU ... the comic strip was unable to load the comic from the internet – robertspierre Dec 07 '20 at 21:15
  • when plasmashell suddenly starts eats up 100% of CPU , first thing we should check, it is if is only with our user, i.e. crate another user and login with the new user and check if plasmashell is fine, if is fine you know that something in you configuration is bad. After you may try many things, start an empty session, clean history of clipboard . Or even move all yours .kde files and add it again piece by piece. The main goal of my answer is that probably something happened to the user configuration that makes plasmashell go crazy and if you try a new user you can check that . – Sérgio Dec 19 '22 at 22:57

5 Answers5

14

I'm having a similar issue. The CPU usage increases over time and never goes back down. There is definitely an issue with plasmashell. The only way to deal with the issue is to run:

killall plasmashell; kstart plasmashell; exit

This will kill, restart plasmashell then exit the shell. If you don't exit the shell it will fill up with output from plasmashell.

Eliah Kagan
  • 116,445
  • 54
  • 318
  • 493
cnobile
  • 141
  • 1
  • 3
7

Plasmashell has had a bug for a long time that any kind of animation in the task bar causes it to use 100% CPU, such as when copying a file, connecting to a Wifi, and even the CPU monitor (that seems to be fixed now).

It seems like the bug is reported here and will be fixed in Plasma 5.8.6.

Candid Dauth
  • 439
  • 4
  • 7
3

I have seen the same issue (also plasma 5.5.5), which was accompanied by my the taskmanager panel and mouse cursor freezing, and my laptop fan spinning up to full speed.

This was repeatable after reboot, killing the plasmashell process and restarting lightdm.

my potentially ham-fisted solution was to clear out all the *.crash files and the .lock file sitting in /var/crash.

To explain: I also tried logging into a gnome session to see if the issue was with kde, however this generated a number of errors and $ top showed 8 or so apport.gtk processes, each of which was claiming to be using >85% CPU

a good couple of hours of googling/stackoverflowing led me to the conclusion that something was going wrong with the crash reporting, which was causing issues with the rendering of notifications in plasma.

Simon
  • 131
  • 1
  • Core issue behind the issue is devs placing well hidden `if (rand(100) == 5){while(true){}}` loops, very deep in the c source, as a code-golf exercise of hide and seek for the user. Relevant dilbert comic explains what's going on: https://dilbert.com/strip/1994-04-25 Plasma widgets are extremely misbehaved, and are best installed from source using stable checkpoints from the website. That keeps the auto-updating while true loop sirens hidden in the binaries, to authentic errors rather than placed ones. Next question being, which one of you committed this while true loop to my codebase? – Eric Leschinski Jul 11 '22 at 18:13
1

Mine was something non-animated that I'd added to the base panel. I removed the panel and re-added it, and the problem is gone.

Autumn
  • 684
  • 8
  • 22
1

I had this problem, it was caused by the comic strip widget in the desktop not being able to download the comic strip. Removing that widget solved the problem.

If you have this problem, try to see whether it is caused by a widget on your desktop.

robertspierre
  • 1,012
  • 1
  • 8
  • 24