LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   LinuxQuestions.org Member Success Stories (https://www.linuxquestions.org/questions/linuxquestions-org-member-success-stories-23/)
-   -   Plasmashell High CPU Load Fix - Plasma 5.9x KDE (https://www.linuxquestions.org/questions/linuxquestions-org-member-success-stories-23/plasmashell-high-cpu-load-fix-plasma-5-9x-kde-4175606972/)

TB0ne 05-30-2017 10:29 AM

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.

archenroot 01-31-2018 07:12 AM

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 :-)

mikeoffenbach 12-23-2018 12:16 AM

Quote:

Originally Posted by TB0ne (Post 5716990)
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.

mikeoffenbach 01-28-2019 07:13 AM

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

rubo77 07-30-2019 06:28 PM

Quote:

Originally Posted by TB0ne (Post 5716990)
Essentially, just replacing the "active" with "false" (as bolded). Restart/reboot, and it may work fine.

Great it worked on Kubuntu 19.04 also just the line was not set on "active" but on "visible" and I changed it to "false".

I reposted it here: https://askubuntu.com/questions/1162...162253#1162253

}-{ello 05-17-2020 05:27 PM

Linux Mint 18.3 Plasma 5.18.0 bug, fix worked!
 
killall plasmashell; kstart plasmashell --shut-up; exit

did not stop one of the CPU cores from running at 80%,

but
PlasmaComponents.BusyIndicator {
anchors.fill: parent

visible: jobs ? jobs.count > 0 : false
running: false //was "visible"
}

did!

Thanks


All times are GMT -5. The time now is 12:37 AM.