Bug 497862 - System Monitor shows every processes as children of a single app
Summary: System Monitor shows every processes as children of a single app
Status: RESOLVED FIXED
Alias: None
Product: plasma-systemmonitor
Classification: Applications
Component: general (other bugs)
Version First Reported In: 6.2.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KSysGuard Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-24 12:11 UTC by Mohammad K.
Modified: 2025-01-14 15:01 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.3.0
Sentry Crash Report:


Attachments
System Monitor shows all system processes as children of the Konsole (236.83 KB, image/png)
2024-12-24 12:11 UTC, Mohammad K.
Details
System Monitor shows all Konsole tabs as separate applications (167.76 KB, image/png)
2024-12-30 16:11 UTC, Michal Kec (MiK)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mohammad K. 2024-12-24 12:11:43 UTC
Created attachment 176866 [details]
System Monitor shows all system processes as children of the Konsole

SUMMARY
Today I noticed that in the System Monitor when I go to "Applications" tab, I see two entry for the Konsole app (but I have one Konsole window open). When I click on any of them, I see all of my system processes to be shown as children of this item, as shown in the screenshot.

STEPS TO REPRODUCE
1. Open a Konsole window
2. Open system monitor app
3. Go to "Applications" tab
4. There should be two items for the Konsole, click on any of them and check child processes on the sidebar

OBSERVED RESULT
All of the system processes are shown as child process of Konsole!

EXPECTED RESULT
It should only list the Konsole processes itself (e.g. Bash)

SOFTWARE/OS VERSIONS
Operating System: EndeavourOS 
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.9.0
Qt Version: 6.8.1
Kernel Version: 6.12.6-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 12 × 12th Gen Intel® Core™ i7-1255U
Memory: 15.3 GiB of RAM
Graphics Processor: Mesa Intel® Iris® Xe Graphics
Comment 1 Michal Kec (MiK) 2024-12-30 16:11:16 UTC
Created attachment 176980 [details]
System Monitor shows all Konsole tabs as separate applications

I can confirm this. Moreover System Monitor also shows every Konsole tab as a separate application. 

This behavior is caused by Konsole creating cgroups "scope" for every tab as you can check with systemd-cgls command.

│   │ │ ├─app-org.kde.konsole-38397.scope
│   │ │ │ ├─tab(38876).scope
│   │ │ │ │ └─38876 /bin/bash
│   │ │ │ ├─tab(38397).scope
│   │ │ │ │ └─38397 /usr/bin/konsole
│   │ │ │ ├─tab(38843).scope
│   │ │ │ │ └─38843 /bin/bash
│   │ │ │ ├─tab(39014).scope
│   │ │ │ │ ├─39014 /usr/bin/sudo su -
│   │ │ │ │ ├─41550 /usr/bin/sudo su -
│   │ │ │ │ ├─41551 su -
│   │ │ │ │ ├─41552 -bash
│   │ │ │ │ ├─42315 systemd-cgls
│   │ │ │ │ └─42316 less
│   │ │ │ ├─tab(39016).scope
│   │ │ │ │ ├─39016 /usr/bin/python3 /usr/bin/grc tail -n 2000 -F /var/log/syslog
│   │ │ │ │ ├─39018 tail -n 2000 -F /var/log/syslog
│   │ │ │ │ └─39019 /usr/bin/python3 /usr/bin/grcat conf.log
│   │ │ │ ├─tab(38942).scope
│   │ │ │ │ └─38942 /bin/bash
│   │ │ │ ├─tab(38909).scope
│   │ │ │ │ └─38909 /bin/bash
│   │ │ │ ├─tab(39020).scope
│   │ │ │ │ └─39020 /bin/bash
│   │ │ │ └─tab(38431).scope
│   │ │ │   └─38431 /bin/bash


Operating System: KDE neon 6.2
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.9.0
Qt Version: 6.8.1
Kernel Version: 6.8.0-51-generic (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 5700X 8-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: AMD Radeon RX 580 Series
Comment 2 Nate Graham 2025-01-06 19:36:49 UTC
Did you use Konsole to launch these system processes? For example if you ran `plasmashell` in Konsole, then it and any processes it launches would logically be children of Konsole. 

If so, then it would be expected behavior.
Comment 3 Mohammad K. 2025-01-06 20:38:26 UTC
(In reply to Nate Graham from comment #2)
> Did you use Konsole to launch these system processes? For example if you ran
> `plasmashell` in Konsole, then it and any processes it launches would
> logically be children of Konsole. 
> 
> If so, then it would be expected behavior.

No I didn't. I just opened an empty konsole window. Plasmashell and other things are running graphically without command.
Comment 4 Nate Graham 2025-01-06 21:12:32 UTC
Hmm, than that's unexpected indeed.
Comment 5 David Redondo 2025-01-14 10:20:43 UTC
Should be fixed in 6.3 with https://invent.kde.org/plasma/libksysguard/-/commit/13e3bd3ec17ed152abbcd9ffa69d0c851df00d62. Please reopen if that's not the case