SUMMARY *** the issue is that kactivitymanagerd fills logs (systemd logs in my case) with entries like this: org.kde.kactivities.resources: Linking "file:///usr/share/kservices5/kcm_kscreen.desktop" to ":any" from "org.kde.plasma.favorites.applications" *** All the entries are the same: the line is repeated many times per second. I tried to delete kactivitymanagerd database, search for kcm_kscreen entries anywhere in my home dir, including .config, .cache and .local and remove any occurence: no changes. Interestingly, my favorites menu has no kscreen icon or entry. running kactivitymanagerd on the foreground creates a log like this one: org.kde.kactivities.activities: Starting the KDE Activity Manager daemon QDateTime(2022-05-07 19:39:52.172 CEST Qt::LocalTime) org.kde.kactivities.activities: Config timer connecting... org.kde.kactivities.application: Plugin Name is "org.kde.ActivityManager.SLC" "/usr/lib64/qt5/plugins/kactivitymanagerd/1/kactivitymanagerd_plugin_slc.so" org.kde.kactivities.application: Plugin Name is "org.kde.ActivityManager.ResourceScoring" "/usr/lib64/qt5/plugins/kactivitymanagerd/1/kactivitymanagerd_plugin_sqlite.so" org.kde.kactivities.application: Plugin Name is "org.kde.ActivityManager.ActivityTemplates" "/usr/lib64/qt5/plugins/kactivitymanagerd/1/kactivitymanagerd_plugin_activitytemplates.so" org.kde.kactivities.application: Plugin Name is "org.kde.ActivityManager.VirtualDesktopSwitch" "/usr/lib64/qt5/plugins/kactivitymanagerd/1/kactivitymanagerd_plugin_virtualdesktopswitch.so" org.kde.kactivities.application: Plugin Name is "org.kde.ActivityManager.GlobalShortcuts" "/usr/lib64/qt5/plugins/kactivitymanagerd/1/kactivitymanagerd_plugin_globalshortcuts.so" org.kde.kactivities.application: Plugin Name is "org.kde.ActivityManager.EventSpy" "/usr/lib64/qt5/plugins/kactivitymanagerd/1/kactivitymanagerd_plugin_eventspy.so" org.kde.kactivities.application: Plugin Name is "org.kde.ActivityManager.GtkEventSpy" "/usr/lib64/qt5/plugins/kactivitymanagerd/1/kactivitymanagerd_plugin_gtk_eventspy.so" org.kde.kactivities.application: Plugin Name is "org.kde.ActivityManager.RunApplication" "/usr/lib64/qt5/plugins/kactivitymanagerd/1/kactivitymanagerd_plugin_runapplication.so" org.kde.kactivities.application: Plugin Name is "org.kde.ActivityManager.ActivityRunner" "/usr/lib64/qt5/plugins/kactivitymanagerd/1/kactivitymanagerd_plugin_activityrunner.so" org.kde.kactivities.application: Found 8 enabled plugins: org.kde.kactivities.application: [ OK ] loaded: "org.kde.ActivityManager.SLC" org.kde.kactivities.application: Setting the name of 0x5734816cb260 to "org.kde.ActivityManager.Resources.Scoring" org.kde.kactivities.resources: Marking the test backup as working... org.kde.kactivities.resources: Creating the backup of the current database... org.kde.kactivities.resources: KActivities: Database connection: "kactivities_db_resources_139456787798080_readwrite" query_only: QVariant(qlonglong, 0) journal_mode: QVariant(QString, "wal") wal_autocheckpoint: QVariant(qlonglong, 100) synchronous: QVariant(qlonglong, 1) org.kde.kactivities.resources: Database opened successfully org.kde.kactivities.application: [ OK ] loaded: "org.kde.ActivityManager.ResourceScoring" org.kde.kactivities.application: Setting the name of 0x57348170baa0 to "org.kde.ActivityManager.ActivityTemplates" org.kde.kactivities.application: [ OK ] loaded: "org.kde.ActivityManager.ActivityTemplates" org.kde.kactivities.application: [ OK ] loaded: "org.kde.ActivityManager.GlobalShortcuts" org.kde.kactivities.application: [ OK ] loaded: "org.kde.ActivityManager.EventSpy" org.kde.kactivities.application: [ OK ] loaded: "org.kde.ActivityManager.GtkEventSpy" org.kde.kactivities.application: Setting the name of 0x57348172e7a0 to "org.kde.ActivityManager.RunApplication" org.kde.kactivities.application: [ OK ] loaded: "org.kde.ActivityManager.RunApplication" org.kde.kactivities.application: Setting the name of 0x573481737ce0 to "org.kde.ActivityManager.ActivityRunner" org.kde.kactivities.application: [ OK ] loaded: "org.kde.ActivityManager.ActivityRunner" org.kde.kactivities.resources: Linking "file:///usr/share/kservices5/kcm_kscreen.desktop" to ":any" from "org.kde.plasma.favorites.applications" org.kde.kactivities.resources: Linking "file:///usr/share/kservices5/kcm_kscreen.desktop" to ":any" from "org.kde.plasma.favorites.applications" And then it goes on forever. SOFTWARE/OS VERSIONS Linux/KDE Plasma: KDE Plasma Version: 5.24.5 KDE Frameworks Version: 5.93.0 Qt Version: 5.15.3
Can you post the plasma logs so that we can tell what tries to add the favourite so often?
(In reply to Ivan Čukić from comment #1) > Can you post the plasma logs so that we can tell what tries to add the > favourite so often? I just had a look at journactl -b /usr/bin/plasmashell output but I have not seen anything related to favourites, activities or even such a frequent request. Do you mean some other logs?
I have a similar problem causing plasmashell and kactivitymanagerd use a lot of CPU. After stracing plasmashell I found a lot of quick repetitions of such lines: readlink("/usr/share/kservices5/kcm_kscreen.desktop", 0x7ffd3dc458b0, 1023) = -1 EINVAL (Invalid argumet) Then I tried removing/renaming /usr/share/kservices5/kcm_kscreen.desktop and this caused plasmashell and kactivity to suddenly restore normal CPU usage and apparently work as expected. My kcm_kscreen.desktop is from kscreen 5.24.5, could this be caused by a problem introduced in this file with recent update?
(In reply to Silvan Calarco from comment #3) > After stracing plasmashell I found a lot of quick repetitions of such lines: > > readlink("/usr/share/kservices5/kcm_kscreen.desktop", 0x7ffd3dc458b0, 1023) > = -1 EINVAL (Invalid argumet) > > Then I tried removing/renaming /usr/share/kservices5/kcm_kscreen.desktop and > this caused plasmashell and kactivity to suddenly restore normal CPU usage > and apparently work as expected. Indeed, good catch. Same behavior/strace, removing that file fixes the CPU hog. Maybe a weird content of the file combined with a weird parsing on plasmashell side?
A possibility would be to launch plasmashell from terminal (and enable logging kdebugdialog5 before that) to see the logs. I expect those will be visible there.
(In reply to Ivan Čukić from comment #5) > A possibility would be to launch plasmashell from terminal (and enable > logging kdebugdialog5 before that) to see the logs. I expect those will be > visible there. I tried, they aren't: ``` [...] libkcups: CUPS-Get-Printers last error: 0 successful-ok libkcups: Get-Jobs last error: 0 successful-ok libkcups: Create-Printer-Subscriptions last error: 0 successful-ok libkcups: Get-Jobs last error: 0 successful-ok file:///usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/ExpandedRepresentation.qml:165:9: QML HiddenItemsView: Binding loop detected for property "implicitHeight" Plasma Shell startup completed Plasma Shell startup completed libkcups: 3 "Hewlett-Packard_HP_Color_LaserJet_MFP_M277dw" libkcups: 0 libkcups: 0 QFont::setPointSizeF: Point size <= 0 (0.000000), must be greater than 0 qt.svg: <input>:2: Could not resolve property: #linearGradient10962 ktp-common-internals: Current presence changed: "offline" "" ktp-common-internals: Requested presence changed: "available" "" ktp-common-internals: Presence changing: true ktp-common-internals: Connection status changed: KTp::GlobalPresence::Connecting ktp-common-internals: Account "gabble/jabber/google_2dim_8" enabled: true org.kde.klipper: Checking clip data ``` And the journactl logs are still growing with the same message. The only way to stop the issue seems to be to remove the desktop file
Btw, I tried to remove the empty line from /usr/share/kservices5/kcm_kscreen.desktop line 11, between X-Plasma-Mainscript and Name=Display Configuration X-KDE-FormFactors=tablet,handset,desktop X-Plasma-MainScript=ui/main.qml Name=Display Configuration Name[ar]=ﺾﺒﻃ ﺎﻠﻋﺮﺿ And now the logs are no longer growing like crazy. Maybe it is only a coincidence, but it was worth noting it.