LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxQuestions.org Member Success Stories
User Name
Password
LinuxQuestions.org Member Success Stories Just spent four hours configuring your favorite program? Just figured out a Linux problem that has been stumping you for months?
Post your Linux Success Stories here.

Notices


Reply
  Search this Thread
Old 05-30-2017, 10:29 AM   #1
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 21,549

Rep: Reputation: 5674Reputation: 5674Reputation: 5674Reputation: 5674Reputation: 5674Reputation: 5674Reputation: 5674Reputation: 5674Reputation: 5674Reputation: 5674Reputation: 5674
Plasmashell High CPU Load Fix - Plasma 5.9x KDE


Running TOP shows that plasmashell was just eating CPU. The culprit, it seems, is a long-standing KDE bug that apparently rears its ugly head every now and then.

Temporary fix: run:
Code:
killall plasmashell; kstart plasmashell --shut-up; exit
...from a terminal, and it *SHOULD* drop back to normal. The problem, it seems, is with the notification icon(s) in your system tray...get one, or have one with an animation (weather? Network? New mail?), and you get the spike.

Editing the /usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/NotificationIcon.qml file *seems* to do the trick (your mileage may vary). Look for this section:
Code:
 PlasmaComponents.BusyIndicator {
            anchors.fill: parent

            visible: jobs ? jobs.count > 0 : false
            running: active
        }
..and change it to read:
Code:
 PlasmaComponents.BusyIndicator {
            anchors.fill: parent

            visible: jobs ? jobs.count > 0 : false
            running: false
        }
Essentially, just replacing the "active" with "false" (as bolded). Restart/reboot, and it may work fine.
 
Old 01-31-2018, 07:12 AM   #2
archenroot
LQ Newbie
 
Registered: Jan 2018
Posts: 1

Rep: Reputation: Disabled
Hi,

I fixed it by killing randomly one of plasmashell threads within the process. I didn't killed plasma itself, desktop works, but cpu got down and all remaining high cpu threads were killed at the same time as well (there were about 10-15 in htop visible).

Could you refer the bug related to this issue if it is in progress?

Anyway thanks for your guideline, which I will try to test next time as now my random thread kill worked fine :-)
 
Old 12-23-2018, 12:16 AM   #3
mikeoffenbach
LQ Newbie
 
Registered: Dec 2018
Location: Thailand
Distribution: debian stretch, opensuse
Posts: 3

Rep: Reputation: Disabled
Smile

Quote:
Originally Posted by TB0ne View Post
Running TOP shows that plasmashell was just eating CPU. The culprit, it seems, is a long-standing KDE bug that apparently rears its ugly head every now and then.

Temporary fix: run:
Code:
killall plasmashell; kstart plasmashell --shut-up; exit
...from a terminal, and it *SHOULD* drop back to normal. The problem, it seems, is with the notification icon(s) in your system tray...get one, or have one with an animation (weather? Network? New mail?), and you get the spike.

Editing the /usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/NotificationIcon.qml file *seems* to do the trick (your mileage may vary). Look for this section:
Code:
 PlasmaComponents.BusyIndicator {
            anchors.fill: parent

            visible: jobs ? jobs.count > 0 : false
            running: active
        }
..and change it to read:
Code:
 PlasmaComponents.BusyIndicator {
            anchors.fill: parent

            visible: jobs ? jobs.count > 0 : false
            running: false
        }
Essentially, just replacing the "active" with "false" (as bolded). Restart/reboot, and it may work fine.
Thank you! This did the trick on a Raspberry 2 with Stretch and KDE Desktop
I went one step farther and changed
visible: jobs ? jobs.count > 0 : false to
visible: jobs ? jobs.count > 0 : true
and I locked the widgets in the panel

Now in Htop lines /usr/bin/plasmashell --shut-up are appearing still but are showing 0% CPU and low memory usage.
Now I can use this computer again.
 
Old 01-28-2019, 07:13 AM   #4
mikeoffenbach
LQ Newbie
 
Registered: Dec 2018
Location: Thailand
Distribution: debian stretch, opensuse
Posts: 3

Rep: Reputation: Disabled
Smile further improvements (Raspberry Pi2 with StretchLite and KDE)

System-Settings -> Display and Monitor -> Compositor:
untick box "Enable Compositor on startup"

[IMG]file:///home/mikebkk/Pictures/Screenshot_20190128_190056.png[/IMG]

/boot/config.txt

Code:
# Uncomment this to enable the lirc-rpi module
# Leave it commented if there is no infrared 
#dtoverlay=lirc-rpi

#NO MEMORY-SPLIT!
#gpu_mem=64

# Additional overlays and parameters are documented /boot/overlays/README
dtoverlay=i2c-rtc,ds1307
# Enable audio (loads snd_bcm2835)
dtparam=audio=on
#NO OVERCLOCKING
# DRIVER FOR GL2
dtoverlay=vc4-fkms-v3d
/usr/bin/zram.sh

Code:
#!/bin/bash
cores=$(nproc --all)
modprobe zram num_devices=$cores

swapoff -a

totalmem=`free | grep -e "^Mem:" | awk '{print $2}'`
# mem=$(( 1024 * ($totalmem / $cores) )) is not working with my shell
# install bc! without bc the calculation fails
mem=$(echo "scale=0;2048*($totalmem/$cores)" | bc)
core=0
while [ $core -lt $cores ]; do
  echo $mem > /sys/block/zram$core/disksize
  mkswap /dev/zram$core
  swapon -p 5 /dev/zram$core
  core=$((core+1))
#  let core=core+1 is not working with my shell
done
Have fun again
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] High CPU load, top not showing any high CPU process angel115 Linux - Server 8 10-12-2015 12:58 AM
[SOLVED] MySQL server started to increase CPU load to high value, how to fix? Vita Linux - Server 1 08-18-2014 07:22 AM
[SOLVED] High CPU load, but low CPU usage (high idle CPU) baffy Linux - Newbie 5 03-13-2013 09:24 AM
KDE 4.5.3 / X Server / Nvidia Card Issue (High CPU load of X) Jack128 Slackware 6 12-01-2010 08:48 AM
[SOLVED] 100% CPU load in X with plasma-desktop (KDE) and Nvidia thorjelly Linux - Software 7 11-12-2009 11:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxQuestions.org Member Success Stories

All times are GMT -5. The time now is 12:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration