Skip to content

cosmic-app-list: Launched apps are put in a wrongly-named cgroup #960

@qwertychouskie

Description

@qwertychouskie

When launching an app from the bottom panel, the name of the cgroup the app is launched in is incorrect, it is named /app-cosmic-com.system76.CosmicAppList-<number>.scope instead of using the app name/ID.

pop-os@pop-os:~$ find /sys/fs/cgroup/user.slice/user-$(id -u).slice/user@$(id -u).service/app.slice/ -type d -iname "app-*"
/sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/app.slice/app-at\x2dspi\x2ddbus\[email protected]
/sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/app.slice/app-geoclue\x2ddemo\[email protected]
/sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/app.slice/app-pop\x2dflatpak\[email protected]
/sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/app.slice/app-cosmic-com.system76.CosmicAppList-4376.scope
/sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/app.slice/app-dbus\x2d:1.37\x2dorg.a11y.atspi.Registry.slice
/sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/app.slice/app-cosmic-com.system76.CosmicAppList-5144.scope
/sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/app.slice/app-print\[email protected]

When launching from the search, the assigned cgroup name is as expected (app-cosmic-com.system76.CosmicEdit-<number>.scope in this case):

pop-os@pop-os:~$ find /sys/fs/cgroup/user.slice/user-$(id -u).slice/user@$(id -u).service/app.slice/ -type d -iname "app-*"
/sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/app.slice/app-at\x2dspi\x2ddbus\[email protected]
/sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/app.slice/app-geoclue\x2ddemo\[email protected]
/sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/app.slice/app-pop\x2dflatpak\[email protected]
/sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/app.slice/app-cosmic-com.system76.CosmicAppList-4376.scope
/sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/app.slice/app-dbus\x2d:1.37\x2dorg.a11y.atspi.Registry.slice
/sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/app.slice/app-print\[email protected]
/sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/app.slice/app-cosmic-com.system76.CosmicEdit-5214.scope

Tested in a VM using the latest COSMIC alpha ISO (pop-os_24.04_amd64_intel_17.iso).

Why this matters

Proper cgroup assignment is important for modern system monitoring utilities (e.g. Mission Center) to be able to differentiate running applications from system processes. See https://gitlab.com/mission-center-devs/mission-center/-/issues/231 for info on which DEs currently handle this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions