Ubuntu >= 22.04 uses only cgroup2 (Ubuntu 20.04 used both and Ubuntu 18.04 only cgroup version 1). Report.get_logind_session will fail to determine the logind session and always return None if only cgroup2 is used.
Content of /proc/self/cgroup when printed from a terminal inside a Ubuntu desktop session:
Ubuntu >= 22.04 uses only cgroup2 (Ubuntu 20.04 used both and Ubuntu 18.04 only cgroup version 1). Report. get_logind_ session will fail to determine the logind session and always return None if only cgroup2 is used.
Content of /proc/self/cgroup when printed from a terminal inside a Ubuntu desktop session:
Ubuntu 16.04 (xenial) ------- -------
-------
``` /user.slice/ user-1000. slice net_prio: / /user.slice systemd: /user.slice/ user-1000. slice/session- c1.scope
12:cpuset:/
11:perf_event:/
10:pids:
9:blkio:/
8:hugetlb:/
7:net_cls,
6:cpu,cpuacct:/
5:devices:
4:freezer:/
3:rdma:/
2:memory:/
1:name=
```
Ubuntu 18.04 (bionic) ------- -------
-------
``` cls,net_ prio:/ /user.slice /user.slice/ user-1000. slice/user@ 1000.service systemd: /user.slice/ user-1000. slice/user@ 1000.service/ gnome-terminal- server. service slice/user- 1000.slice/ user@1000. service/ gnome-terminal- server. service
12:freezer:/
11:net_
10:memory:/
9:rdma:/
8:cpu,cpuacct:/
7:devices:
6:perf_event:/
5:cpuset:/
4:pids:
3:hugetlb:/
2:blkio:/
1:name=
0::/user.
```
Ubuntu 20.04 (focal) ------- -------
-------
``` /user.slice/ user-1000. slice/user@ 1000.service /user.slice/ user-1000. slice/user@ 1000.service /user.slice net_prio: / systemd: /user.slice/ user-1000. slice/user@ 1000.service/ apps.slice/ apps-org. gnome.Terminal. slice/vte- spawn-ad936f4d- 0d62-4ac4- bbd8-0e766d8a3b 1f.scope slice/user- 1000.slice/ user@1000. service/ apps.slice/ apps-org. gnome.Terminal. slice/vte- spawn-ad936f4d- 0d62-4ac4- bbd8-0e766d8a3b 1f.scope
13:memory:
12:perf_event:/
11:misc:/
10:pids:
9:hugetlb:/
8:cpuset:/
7:blkio:/
6:devices:
5:cpu,cpuacct:/
4:freezer:/
3:rdma:/
2:net_cls,
1:name=
0::/user.
```
Ubuntu 22.04 (jammy) ------- -------
-------
``` slice/user- 1000.slice/ user@1000. service/ app.slice/ app-org. gnome.Terminal. slice/vte- spawn-0c3f8b02- b112-4cab- accc-764cbb223b ac.scope
0::/user.
```