Bug 436580

Summary: XDG autostarted application units are wrongly parsed
Product: [Applications] plasma-systemmonitor Reporter: Carlo <cirlo_ca>
Component: generalAssignee: KSysGuard Developers <ksysguard-bugs>
Status: RESOLVED UPSTREAM    
Severity: normal CC: ahiemstra, kde, plasma-bugs-null
Priority: NOR    
Version First Reported In: 5.21.4   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Carlo 2021-05-04 11:18:59 UTC
SUMMARY
KDE (& GNOME) in the last few months/years started rolling out an innovative resource management that makes usage of cgroups (thanks David Edmundson).

I assume that this is what "Applications" tab is using to determine to which program a certain process belongs to.
According to the specifications the app units are of the following format:
* app[-<launcher>]-<ApplicationID>[@<RANDOM>].service
* app[-<launcher>]-<ApplicationID>-<RANDOM>.scope
The interesting bit should be the <ApplicationID>.
Note that, assuming to split unit by the dashes, the app_id is in the last and second to last split.

However, using systemd-cgls, you can notice that there is a third possibility:
* app-<ApplicationID>-autostart.service
Even if it is a ".service", the app_id is in the second to last split, not in the last one.

I assume this is what Plasma System Monitor forgets when displaying 

OBSERVED RESULT
https://i.imgur.com/n6Ysb4T.png

SOFTWARE/OS VERSIONS

KDE Plasma Version: 5.21.4
KDE Frameworks Version: 5.81.0
Qt Version: 5.15.2
Comment 1 David Redondo 2021-05-04 11:39:53 UTC
Fixed in systemd with https://github.com/systemd/systemd/commit/84c46fb03c9a8b4c5b2d24e84a77fcb171109fe4
Comment 2 Carlo 2021-05-04 12:51:22 UTC
It is indeed fixed in systemd v248.
Thanks!