The workaround that is coming in gnome-shell is enough to handle the normal snap cases, however that's not to be considered a proper solution.
The usage of `ChildSetupFunc` is not easily doable without some refactor in the shell that I'm not keen to do for something that is not likely going to be upstreamable, because the child PID isn't known at JS level at that point so we can't just use it without implementing something else in C ("it is not safe to call any function which may call malloc()" from there, so we can't control what gjs is going to do). Even doing it, this wouldn't fix the majority of other cases where the cgroup move happens when using the launch context (i.e. when apps are launched from dock or activities). So, I feel snapd tracker should somewhat be able to track that an app changed its cgroup and move it back to what it belongs, but as discussed in https://github.com/systemd/systemd/issues/26925 there's nothing telling us that right now. ** Bug watch added: github.com/systemd/systemd/issues #26925 https://github.com/systemd/systemd/issues/26925 -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to gnome-shell in Ubuntu. https://bugs.launchpad.net/bugs/2011806 Title: [lunar] Snaps don't launch due to cgroup issue Status in gnome-shell package in Ubuntu: Fix Committed Status in kio package in Ubuntu: Confirmed Status in snapd package in Ubuntu: Confirmed Bug description: Hi, Lunar up to date, Intel+Nvidia GPUs, Ubuntu Wayland or X11 session, hybrid or discrete graphics. If I click on a snap dash icon, nothing happens. Tested with Thunderbird, Firefox, Shortwave... (VS Code seems ok, maybe due to classic confinment?) I can launch without issue Chrome (deb), Synaptic, GNOME apps, etc. Recent updates included gnome-shell and libadwaita. --- I get this type of log for all problematic snaps: /user.slice/user-1000.slice/user@1000.service/app.slice/app-gnome- shortwave_shortwave-11885.scope is not a snap cgroup --- Context: $ snap --version snap 2.58.3+23.04ubuntu1 snapd 2.58.3+23.04ubuntu1 series 16 ubuntu 23.04 kernel 6.1.0-16-generic $ snap list Nom Version Révision Suivi Éditeur Notes bare 1.0 5 latest/stable canonical✓ base code ee2b180d 122 latest/stable vscode✓ classic core 16-2.58.2 14784 latest/stable canonical✓ core core18 20230308 2714 latest/stable canonical✓ base core20 20230207 1828 latest/stable canonical✓ base core22 20230210 522 latest/stable canonical✓ base firefox 111.0-2 2432 latest/candidate mozilla✓ - gimp 2.10.30 393 latest/stable snapcrafters - gnome-3-28-1804 3.28.0-19-g98f9e67.98f9e67 161 latest/stable canonical✓ - gnome-3-38-2004 0+git.6f39565 119 latest/stable canonical✓ - gnome-42-2204 0+git.09673a5 65 latest/stable canonical✓ - gtk-common-themes 0.1-81-g442e511 1535 latest/stable/… canonical✓ - gtk-theme-pocillo 0.14.4.1 5 latest/stable ubuntubudgie - gtk-theme-qogirbudgie 22.04.1 8 latest/stable ubuntubudgie - gtk2-common-themes 0.1 13 latest/stable canonical✓ - hunspell-dictionaries-1-7-2004 1.7-20.04+pkg-6fd6 2 latest/stable brlin - kde-frameworks-5-91-qt-5-15-3-core20 5.91.0 1 latest/stable kde✓ - kde-frameworks-5-99-qt-5-15-7-core20 5.99.0 15 latest/stable kde✓ - kde-frameworks-5-core18 5.67.0 35 latest/stable kde✓ - libreoffice 7.5.1.2 270 latest/stable canonical✓ - shortwave 3.0.0 79 latest/stable alexmurray✪ - snapd 2.58.2 18357 latest/stable canonical✓ snapd snapd-desktop-integration 0.1 71 latest/stable/… canonical✓ - stellarium-daily v1.2 1396 latest/stable t4saha - thunderbird 102.9.0-1 305 latest/candidate canonical✓ - vlc 3.0.18 3078 latest/stable videolan✓ - To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/2011806/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp