How to enable / mount cgroup v1 (legacy or hybrid) on NVIDIA DRIVE AGX Thor

DRIVE OS Version: : 7.0.3

Hello,

I am running Linux on NVIDIA Thor and trying to run a custom LXC container.

The system boots in pure cgroup v2 mode:

$ mount | grep cgroup
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,relatime)

$ cat /proc/filesystems | grep cgroup
nodev   cgroup
nodev   cgroup2

Kernel config shows legacy controllers enabled:

CONFIG_CGROUPS=y
CONFIG_CGROUP_CPUACCT=y
CONFIG_CGROUP_MEMORY=y
CONFIG_CGROUP_PIDS=y
CONFIG_CGROUP_DEVICE=y

However, legacy cgroup v1 controllers cannot be mounted, even as root:

# mount -t cgroup -o cpu none /run/cgroup-legacy/cpu
mount: Operation not permitted

Only devices and freezer can be mounted; cpu, memory, cpuset, blkio, pids are blocked.

Inside LXC I have same failures:

Failed to mount cpu/memory cgroup: Operation not permitted

This prevents my container from booting.

My questions:

  1. Is pure cgroup v2 enforced by Thor bootloader (CBoot / DTB / kernel args)?
  2. Is it possible to enable hybrid cgroup (v1 + v2) on Thor?
  3. Which boot configuration / DT / kernel cmdline must be modified to allow mounting cgroup v1?
  4. Is this restriction intentional on Thor platforms?

Any guidance or official recommendation would be greatly appreciated.

Thank you.

Dear @mykhailo.i.kozak ,
May I know if the used platform is DRIVE AGX Thor or Jetson AGX Thor?

DRIVE AGX Thor

Looks like pure cgroup v2 (unified hierarchy) right now:

cat /proc/self/cgroup 

0::/user.slice/user-1000.slice/session-4.scope

Can be changed?

May I know where you verified this?

After kernel rebuild, flash it, and check on HW command line
zcat /proc/config.gz | grep CGROUP

@SivaRamaKrishnaNV Any other information required from my side?
Do you have any guidance for me?

Dear @mykhailo.i.kozak ,
Could you try adding systemd.unified_cgroup_hierarchy=0 cgroup_no_v2=all to switch to cgroup v1 in os_orgs at ```
/drive/drive-foundation/platform-config/hardware/nvidia/platform/t26x/automotive/pct/drive_av/linux/linux_storage.cfg

@SivaRamaKrishnaNV This works, thanks