I'm sure that most people have seen this message:
level=warning msg="The cgroupv2 manager is set to systemd but there is no systemd user session available"
level=warning msg="For using systemd, you may need to log in using a user session"
level=warning msg="Alternatively, you can enable lingering with: `loginctl enable-linger nnn` (possibly as root)"
level=warning msg="Falling back to --cgroup-manager=cgroupfs"
For me enabling linger never worked on my computers so I set in /etc/containers/containers.conf
[engine]
cgroup_manager = "cgroupfs"
All was well and I had no issues to run tasks.
However, I had another issue and asked the BOINC team for help, they said my podman has issues, so it seems that its not recomeneded to use cgroupfs.
After many hours of trying settings I was able to get systemd to work.
I installed BOINC directly from BOINC as per instructions here
https://boinc.berkeley.edu/linux_install.php via apt as I have a Debian based Linux.
However, as it common for LHC@Home the default settings are not compatiable, so you need to overide the defualts.
to get the nnn value you can run id -u boinc,
my numbers, were different on each computer, some were 120, others 125 and other 997.
systemctl edit boinc-client to edit the overide of the default BOINC setting:
[Unit]
Requires=user@nnn.service #Wait for the users instance of systemd to start since BOINC is set to auto start at boot.
After=user@nnn.service #Wait for the users instance of systemd to start since BOINC is set to auto start at boot.
[Service]
ProtectHome=false #Since podman need to read and write to /run/user/ folder this needs to be off so it can communicate with podman
Delegate=cpu io memory pids #I needed this to ensure that the statistics about the containers are populated correctly
MemoryAccounting=yes #I needed this to ensure that the statistics about the containers are populated correctly
ProtectSystem=full #needed for VirtualBox to run correctly
Environment="XDG_RUNTIME_DIR=/run/user/nnn" #I'm not sure if this is needed but seemed to help BOINC find podman
Environment="DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/nnn/bus" #I'm not sure if this is needed but seemed to help BOINC find podman
For me the boinc user that was created automatically had many services that were not needed (e.g. audio, firmware updater) so I could disable these, its more a cosmetic thing.
systemctl --user -M boinc@ mask \
pipewire.service \
pipewire-pulse.service \
pipewire-pulse.socket \
filter-chain.service \
wireplumber.service \
xdg-document-portal.service \
xdg-permission-store.service \
snap.firmware-updater.firmware-notifier.service \
snap.firmware-updater.firmware-notifier.timer \
snap.prompting-client.daemon.service \
snap.snapd-desktop-integration.snapd-desktop-integration.service
Hopefully this is useful to get your podman/BOINC running too.