Right after upgrading a Ubuntu 21.04 to 21.10, I got this issue: Chromium/Firefox won't start. The error(seen in terminal) is:
$ firefox
cannot attach cgroup program: Operation not permitted
Right after upgrading a Ubuntu 21.04 to 21.10, I got this issue: Chromium/Firefox won't start. The error(seen in terminal) is:
$ firefox
cannot attach cgroup program: Operation not permitted
In Ubuntu 21.10, systemd is being switched to the “unified” cgroup hierarchy (cgroup v2) by default instead of (cgroup v1) in previous releases. Please see the Impish Indri Release Notes
After upgrading, apparmor does not seem to be allowing mounting cgroups version 2 FS which prevents snap based applications from starting properly.
This, however, might be solved by running this command in the terminal:
Select ok when prompted without adding anything.
If that did not work or for some reason you need to keep the legacy cgroup v1 hierarchy, you can select it via this kernel parameter
systemd.unified_cgroup_hierarchy=0
at boot time and wait until snap is updated with full support for (cgroup v2).Is it possible that you are using a Linux kernel that doesn't properly support the unified cgroup hierarchy? I had the same problem as you and it turned out that my GRUB was loading an ancient kernel, instead of a current one.
I just had the same issue after dist-upgrading from 20.04 to 22.04 - kernel was not updated, so I was still using 5.4.0-89 or 5.4.0-90. Installed 5.15.0 manually using Synaptic, then sudo update-grub and reboot.
It seems like your upgrade failed to install latest kernel version (i.e 5.10 or so). Use
uname -r
to comfirm your kernel version and runsudo apt install linux-headers-amd64 linux-image-amd64
To isntall latest image