Hello!
Big post with an issue that is driving me crazy during days.
PROBLEM DESCRIPTION
I have an up to date opensuse tumbleweed kde installation with the following problem:
Just after boot, there are two processes that have a high CPU, memory and disk rate consumption: plasmashell and kglobalacceld.
Their CPU consumption is > 50% of a single CPU core. Their memory consumption is unlimited and grows overtime and they can use dozens of GB after some uptime. Their disk rate usage can be > 4 M/s of disk write sustained continously, even if sometimes is less.
If I open dolphin file explorer then it usually also behaves like those processes (in CPU, RAM and disk write rate).
Then, if I close dolphin and terminate kglobalacceld from terminal, the CPU usage and disk write rate of plasmashell drops to 0%. In fact, neither of the 3 processes by themselves are enough to make trouble. But any combination of two of them, or the 3 at the same time, causes their processes to go crazy on resources.
From the user experience, the taskbar feels unresponsive. When I click in the taskbar menu or some taskbar icon usually it doesn’t respond after a few or several minutes later. Also, notifications can be frozen there for the same amount of time. When that happens, then also systemd gets stuck at stopping plasmashell from terminal. And it’s not until plasmashell gets responsive again that it honors systemd stop signal and it closes. But then, if meanwhile systemctl is waiting for plasmashell to stop I also stop kglobalacceld from systemd, then plasmashell closes just after (but this very last thing I have been only able to test it twice, and probably with dolphin closed)
Also there are some minor problems like when I browse through the start menu categories (utilities, games, etc), the programs inside those categories dissapear just after appearing, but it could be unrelated to the main issue.
This issue has been persistent through several system upgrades, so it’s not comming from last tumbleweed update being unstable.
The hardware is a powerful thinkpad p16 gen 2 portable workstation with a powerful CPU, plenty of RAM and NVMe drives. It also contains an iGPU and a dedicated GPU (nvidia) and the loaded drivers are offload with nvidia modules loaded.
Also as an example, after 1h 13 min uptime:
- plasmashell has +32 min CPU time, +8 GB of RAM and +14 GB written to disk
- kglobalacceld has +29 min of CPU time, +7 GB of RAM and +13 GB written to disk
If I create a new user, the issue doesn’t seem to reproduce, so probably could be some of the configuration I did after I got the laptop. In fact, the installation is almost fresh and while I was setting it up, at some point close to the end I noticed that issue. Here I will try to make a list of the settings I applied to the system, but it’s only what I remember and it’s not an exhaustive one:
- Changes in the scalation for sddm, kde, etc (4k screen)
- National instruments software installation (almost for sure not the cause since it’s completely closed)
- NVIDIA drivers installed and prime-select installtion. Offload drivers selected.
- Flatpak installation + a few flatpak packages.
- Packman repo enabled with a few pacman packages installed like ffmpeg and somewhat else
- Pre-installed dark breeze global theme. At some point I placed some widgets on the taskbar. But right now are all deleted and the issue persists.
- Installation and configuration of onedrive client from repo-oss (GitHub - abraunegg/onedrive: OneDrive Client for Linux)
EXTRA INFO
I don’t know if onedrive could be part of the issue, since I have almost 400k files sync with 110GB of data. Since the onedrive folder is inside my home folder, it has been automatically indexed. But a weird issue appeared where baloo said that 80k files were indexed and no more files were remaining to index, but the home directory has 500k files itself. Anyway, stoppping baloo and onedrive service doesn’t seem to really change the issue.
As extra info, I’m running on X11. If I start on Wayland then the issue persists and on top of that the mouse gets frozen a little fraction of a second every second or every few seconds, which is really annoying and makes me dizzy at the end. Also, if I try to unload nvidia drivers running sudo prime-select intel
it doesn’t return to the intel drivers after rebooting and still uses the offload drivers with the nvidia modules loaded.
After some days trying to debug the issue with chatGPT it looked like the following fixed my issue:
rm ~/.cache/ksycoca*
kbuildsycoca5
kbuildsycoca6
But after rebooting the issue reappeared, and executing again the same commands didn’t fix the issue anymore, so in fact maybe was a mere coincidence.
Also this is the user journal just after a fresh boot:
journalctl --user --no-pager -u plasma-plasmashell -u plasma-kglobalacceld
-- Boot bc8d12ffe9e1459ea494cf529c9d12c3 --
de nov. 13 17:53:41 h-laptop-linux systemd[2246]: Starting KDE Plasma Workspace...
de nov. 13 17:53:42 h-laptop-linux systemd[2246]: Started KDE Plasma Workspace.
de nov. 13 17:53:42 h-laptop-linux plasmashell[2545]: kf.plasma.quick: Applet preload policy set to 1
de nov. 13 17:53:42 h-laptop-linux plasmashell[2545]: file:///usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/main.qml:178:25: QML FolderViewDropArea (parent or ancestor of QQuickLayoutAttached): Binding loop detected for property "minimumWidth":
file:///usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/main.qml:201:9
de nov. 13 17:53:43 h-laptop-linux plasmashell[2545]: Toolbox not loading, toolbox package is either invalid or disabled.
de nov. 13 17:53:43 h-laptop-linux plasmashell[2545]: file:///usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/main.qml:50:9: QML KSortFilterProxyModel: Binding loop detected for property "sourceModel"
de nov. 13 17:53:43 h-laptop-linux plasmashell[2545]: file:///usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/main.qml:50:9: QML KSortFilterProxyModel: Binding loop detected for property "sourceModel"
de nov. 13 17:53:43 h-laptop-linux plasmashell[2545]: qt.dbus.integration: Could not connect "org.cups.cupsd.Notifier" to PrinterFinishingsChanged(QString, QString, QString, uint, QString, bool) :
de nov. 13 17:53:43 h-laptop-linux plasmashell[2545]: QFont::setPointSizeF: Point size <= 0 (0.000000), must be greater than 0
DEBUG FILES (strace logs, journalct, etc)
Meanwhile trying to debug it with chatGPT it made me generate a lot of info that I saved on files that I will place here for further info with data from the system journal, strace, etc, etc
- Some general info: https://hastebin.com/share/qupelayoda.yaml
- System journal: Hastebin
- User journal (bigger uptime than the one posted before): https://hastebin.com/share/rozavonini.yaml
- Plasmashell strace: https://hastebin.com/share/oqaxihured.swift
- Kglobalacceld strace: https://hastebin.com/share/adavobigal.swift
Some of those files are heavily truncated due to maximum file size. If you want the full ones and have journalctl highlighting: Upload files for free - kde_debug_logs.tar.xz - ufile.io
ChatGPT ANALYSIS OF THE FILES
(maybe is useless but… Also this a recap from different days and big conversations)
I’m not technical enough to understand most of those files, but chatGPT said thing like the following after readind them:
plasmashell
and QML binding loops:- There are multiple binding loop warnings in
plasmashell
, such as:"Binding loop detected for property 'minimumWidth'"
."Binding loop detected for property 'sourceModel'"
.
- These may indicate UI or configuration issues, which could affect resource usage.
- KWin and X11 Errors:
- Several
kwin_x11
errors related to QRect conversion failures:"Conversion of '0,0,0,0' to QRect failed"
.
- These errors might affect the window manager’s performance or interactions.
- PowerDevil and Wayland:
- Failures such as
"Failed to create wl_display (No such file or directory)"
indicate display-related issues, though you’re running on X11. - qt.dbus.integration Warnings:
- D-Bus warnings like:
"name 'org.freedesktop.UDisks2' had owner '' but we thought it was ':1.32'"
.
- These indicate potential communication issues between system components.
And from the strace files:
For plasmashell
:
- Repeated
write()
calls:
- There are many repetitive
write()
system calls to file descriptor4
. This could indicate a tight loop or logging/debugging output that’s contributing to high CPU usage.
- File Access Issues:
- Several
statx()
andaccess()
system calls fail withENOENT
, particularly forplasma/desktoptheme/default/colors
. This suggestsplasmashell
is repeatedly searching for missing files in various locations.
- Permission Denied:
- Attempts to access some paths, such as
/root/.local/share/flatpak/exports/share/plasma/desktoptheme/default/colors
, fail withEACCES
. This is unusual sinceplasmashell
should not be scanning root’s directories.
- Frequent Polling on File Descriptors:
- The process repeatedly polls file descriptors (e.g.,
fd=15
) for input, but the data size read (32 bytes
) is minimal. This suggests a tight loop whereplasmashell
is excessively polling without meaningful work, consuming CPU unnecessarily.
For kglobalacceld
:
- Repeated File Lock Handling:
- The process repeatedly tries to access a lock file (
ksycoca6_en_*
) in~/.cache
, failing withEEXIST
and then opening it in read-only mode. This might indicate a synchronization issue or excessive cache validation.
ksycoca
Cache Handling:
- The process continuously interacts with the cache file (
~/.cache/ksycoca6_*
), reading and writing to it frequently. Despite clearing the cache, the persistent access patterns may indicate a deeper issue with cache generation or invalid entries.
- XDG Directory and File Access:
- Repeated directory reads (e.g.,
/etc/xdg/menus
and/etc/xdg/menus/applications-merged
) and configuration checks show thatkglobalacceld
might be regenerating menus or scanning for application metadata excessively.
- Frequent
clock_nanosleep()
Calls:
- Periodic sleeps (
clock_nanosleep
) suggest the process is waiting for events or trying to avoid a tight loop, yet the resource usage remains high.
- Minimal Data Processing:
- Frequent reads and minimal processed data indicate inefficiency or an unnecessary loop during cache validation or menu updates.
Also, I forgot, with chatGPT I tried to reinstall plasma with sudo zypper in --force plasma6-desktop
without any success and also things like:
lookandfeeltool6 -a org.kde.breeze.desktop
rm ~/.cache/ksycoca6* && kbuildsycoca6
rm ~/.config/plasma-org.kde.plasma.desktop-appletsrc
I feel that I’m on a point where I can’t push this anymore and feel like if I don’t get any external help I’m going to be stuck here forever. Thanks for your time!