Ubuntu – Raspberry Pi 4 Ubuntu 19.10 cannot enable cgroup memory at boostrap


On a Raspberry Pi 4, on a vanilla downloaded 19.10 image of Ubuntu 19 arm64, I failed trying to enable cgroup memory, needed for Kubernetes.

I created (because I don't understand well the real one, I think the 4th)

  • /boot/cmdline.txt
  • /boot/firmware/cmdline.txt
  • /boot/firmware/btcmd.txt (modified)
  • /boot/firmware/usercfg.txt (modified)

to append:

cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1

but in vain.

If I check cat /proc/cgroups the cgroup memory is disabled.

If I check cat /proc/cmdline there isn't.

How can I fix that?

Best Answer

I've just had this exact problem after picking up a new rpi4 on Ubuntu 19.10. After a quick poke...

The /boot/firmware/README file appears to detail the updated boot process. The second step in the process is to load /boot/firmware/config.txt which specifies /boot/firmware/nobtcmd.txt as the current cmdline.

So modify /boot/firmware/nobtcmd.txt and append: cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1. Reboot and cat /proc/cmdline

I wouldn't be surprised if some magic (maybe enabling BT?) changes the cmdline to /boot/firmware/btcmd.txt so it might be worth adding the change to that file too.

Related Question