KDE plasmashell High CPU Usage Work-around
I updated openSUSE today. And I can see my "plasmashell" process is maxing out one of my CPU cores and causing KDE to run slowly. I can also hear my CPU fan running on high.
I tried logging on as a different user. And I did not have a problem.
I'm assuming there is some KDE configuration problem specific to the affected user. After removing their configuration and rebooting, that user no longer had a problem.
Note you can use KDE's "System Monitor" (plasma-systemmonitor) to view CPU usage in a desktop environment. Otherwise "top" or a similar command-line program can show CPU usage.
I'm using plasmashell version 5.27.9
Back Up and Remove KDE Configuration
Since my other login did not have a problem, I assumed the software and hardware were working but one particular configuration was broken.
While I don't know the precise KDE configuration causing the problem, renaming the entire configuration directory is a quick way to restore the performance of KDE.
These same steps can be done with any file explorer or shell. In a graphical file explorer, you might have to change a setting to 'Show Hidden Files' before you will see directories like .config
I've chosen to make the changes with PowerShell. Let's rename (or move) that user's entire ~/.config folder.
Below I have some comments, a command like "Get-ChildItem -Force", and the output from the command. I put a few empty lines between different commands that I ran.
# List the contents of the home directory (~/). # Using '-Force' with Get-ChildItem will show hidden items like the # '~/.config' directory. Get-ChildItem -Force Directory: /home/michael UnixMode User Group LastWriteTime Size Name -------- ---- ----- ------------- ---- ---- drwx------ michael michael 12/7/2023 13:23 1178 .cache drwx------ michael michael 12/7/2023 13:27 2872 .config drwxr-xr-x michael michael 7/20/2023 13:15 58 .frozen-bubble ... # Use Move-Item to rename the directory. # Moving resets the configuration while backing up the existing settings. Move-Item .config .config-backup # Check for the changes. # .config is now .config-backup Get-ChildItem -Force Directory: /home/michael UnixMode User Group LastWriteTime Size Name -------- ---- ----- ------------- ---- ---- drwx------ michael michael 12/7/2023 13:31 1178 .cache drwx------ michael michael 12/7/2023 13:33 2872 .config-backup drwxr-xr-x michael michael 7/20/2023 13:15 58 .frozen-bubble ...
After renaming the directory, I rebooted my computer.
The next time I logged in as that user, I did not have high CPU usage from the plasmashell process. So, my problem is solved now.
After the steps earlier, logging in should create a new ~/.config with the default settings.
# After rebooting, a new .config directory is created. Get-ChildItem -Force Directory: /home/michael UnixMode User Group LastWriteTime Size Name -------- ---- ----- ------------- ---- ---- drwx------ michael michael 12/7/2023 13:31 1178 .cache drwx------ michael michael 12/7/2023 13:40 2872 .config drwx------ michael michael 12/7/2023 13:33 2872 .config-backup drwxr-xr-x michael michael 7/20/2023 13:15 58 .frozen-bubble ...
Restoring Application Configurations
Renaming the entire ~/.config directory will cause many programs to lose their settings.
You can restore the settings for individual applications by copying from ~/.config-backup to ~/.config
For example, to restore the settings for the Vivaldi web browser, I might copy the "~/.config-backup/vivaldi/" directory to "~/.config/" That would create a new directory there: ~/.config/vivaldi/
You might be prompted to overwrite when pasting into ~/.config This is normal if an application ran at least once since rebooting and created a default configuration. As long as you preserve a copy of ~/.config-backup, you should eventually be able to troubleshoot and restore your application settings.
Now that KDE is performing normally, it is faster and easier to use the file browser (KDE Dolphin) to copy these folders and restore settings. Just remember to turn the "Show Hidden Files" setting on to be able to see .config and .config-backup in your home directory (eg /home/michael).
Created: Thursday, December 7, 2023
Updated: Thursday, December 7, 2023
/gemlog/