Score:2

after Ubuntu 21.10 upgrade: "cannot attach cgroup program" operation not permitted

us flag

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
David avatar
cn flag
https://help.ubuntu.com/stable/ubuntu-help/report-ubuntu-bug.html.en
Score:4
jp flag

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:

sudo dpkg-reconfigure apparmor

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).

us flag
thank you for trying to help, unfortunatly it did not work, The command completed fine, it seems, but nothing changed, not even after a reboot. - full output here: https://pastebin.com/abWmgEqh
Raffa avatar
jp flag
@user105939 Try adding this kernel parameter at boot time `systemd.unified_cgroup_hierarchy=0 ` and see if it works. This should enable cgroup v 1 ... if it works you can add it to grub configuration. I think snapd will be updated with support for cgroups v2 soon.
us flag
hmm, I've upgraded five Ubuntu installations from 21.04 to 21.10, only one failed like this - I'd rather not force it back to the cgroup v1 - this will only postpone the issue and bite me later. Any other suggestions why it fails?
codlord avatar
ru flag
Like @user105939 I too have this issue on one PC upgraded to 21.10 but not on another so there must be something else going on here as the app does work in 21.10 at least on one of my PCs. In my case it's `mailspring` email client and I get the same cgroup error. Not sure what to do/try next yet...
Raffa avatar
jp flag
@user105939 @codlord l would make sure `snapd` is up to date as well as reinstalling `sudo apt install snapd --reinstall` on that single machine… snap applications might be reinstalled as well if necessary... https://askubuntu.com/a/1231238/968501
us flag
it's good to see I am not alone. purging firefox/chromium/snap-store, and reinstalling them did not change anything. snaps like shotcut and anbox work fine.
us flag
I reported the bug here: https://bugs.launchpad.net/ubuntu/+bug/1948478
DarkTrick avatar
cn flag
Solved the problem on my system
Score:2
in flag

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.

us flag
Great catch! - apparently, disc encryption made it hard for GRUB to be updated - and I was stuck at kernel 5.4.x even after the recent upgrade - booting 5.13.x
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.