Waydroid: Failed session start

I am using LXC container to start waydroid, but when starting it says it has failed:

waydroid log:
lxc-start: waydroid: …/src/lxc/cgroups/cgfsng.c: cpuset1_initialize: 666 No such file or directory - Failed to initialize cpuset.cpus
lxc-start: waydroid: …/src/lxc/cgroups/cgfsng.c: __cgroup_tree_create: 731 Invalid argument - Failed to initialize cpuset controller in the legacy hierarchy lxc-start: waydroid: …/src/lxc/cgroups/cgfsng.c: cpuset1_cpus_initialize: 592 No such file or directory - Failed to read file 13/cpuset.cpus
lxc-start: waydroid: …/src/lxc/cgroups/cgfsng.c: cpuset1_initialize: 666 No such file or directory - Failed to initialize cpuset.cpus
lxc-start: waydroid: …/src/lxc/cgroups/cgfsng.c: __cgroup_tree_create: 731 Invalid argument - Failed to initialize cpuset controller in the legacy hierarchy lxc-start: waydroid: …/src/lxc/cgroups/cgfsng.c: cpuset1_cpus_initialize: 592 No such file or directory - Failed to read file 13/cpuset.cpus
lxc-start: waydroid: …/src/lxc/cgroups/cgfsng.c: cpuset1_initialize: 666 No such file or directory - Failed to initialize cpuset.cpus
lxc-start: waydroid: …/src/lxc/cgroups/cgfsng.c: __cgroup_tree_create: 731 Invalid argument - Failed to initialize cpuset controller in the legacy hierarchy
lxc-start: waydroid: …/src/lxc/cgroups/cgfsng.c: cgfsng_monitor_create: 1381 Numerical result out of range - Failed to create monitor cgroup
lxc-start: waydroid: …/src/lxc/start.c: __lxc_start: 2042 Failed to create monitor cgroup
STOPPED
(000278) [00:38:47] waiting 10 seconds for container to start…
lxc-start: waydroid: …/src/lxc/conf.c: run_buffer: 322 Script exited with status 126
lxc-start: waydroid: …/src/lxc/start.c: lxc_end: 985 Failed to run lxc.hook.post-stop for container “waydroid”
lxc-start: waydroid: …/src/lxc/tools/lxc_start.c: lxc_start_main: 307 The container failed to start
lxc-start: waydroid: …/src/lxc/tools/lxc_start.c: lxc_start_main: 312 Additional information can be obtained by setting the --logfile and --logpriority options
(000278) [00:38:48] % lxc-info -P /var/lib/waydroid/lxc -n waydroid -sH
STOPPED
(000278) [00:38:48] waiting 9 seconds for container to start…
(000278) [00:38:49] % lxc-info -P /var/lib/waydroid/lxc -n waydroid -sH
STOPPED
(000278) [00:38:49] waiting 8 seconds for container to start…
(000278) [00:38:50] % lxc-info -P /var/lib/waydroid/lxc -n waydroid -sH
STOPPED
(000278) [00:38:50] waiting 7 seconds for container to start…
(000278) [00:38:51] % lxc-info -P /var/lib/waydroid/lxc -n waydroid -sH
STOPPED
(000278) [00:38:51] waiting 6 seconds for container to start…
(000278) [00:38:52] % lxc-info -P /var/lib/waydroid/lxc -n waydroid -sH
STOPPED
(000278) [00:38:52] waiting 5 seconds for container to start…
(000278) [00:38:53] % lxc-info -P /var/lib/waydroid/lxc -n waydroid -sH
STOPPED
(000278) [00:38:53] waiting 4 seconds for container to start…
(000278) [00:38:54] % lxc-info -P /var/lib/waydroid/lxc -n waydroid -sH
STOPPED
(000278) [00:38:54] waiting 3 seconds for container to start… (000278) [00:38:55] % lxc-info -P /var/lib/waydroid/lxc -n waydroid -sH
STOPPED
(000278) [00:38:55] waiting 2 seconds for container to start…
(000278) [00:38:56] % lxc-info -P /var/lib/waydroid/lxc -n waydroid -sH
STOPPED
(000278) [00:38:56] waiting 1 seconds for container to start…
(002388) [00:38:57] org.freedesktop.DBus.Python.OSError: Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/dbus/service.py”, line 712, in _message_cb
retval = candidate_method(self, *args, **keywords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/waydroid/tools/actions/container_manager.py”, line 34, in Start
do_start(self.args, session)
File “/usr/lib/waydroid/tools/actions/container_manager.py”, line 189, in do_start
helpers.lxc.start(args)
File “/usr/lib/waydroid/tools/helpers/lxc.py”, line 397, in start
wait_for_running(args)
File “/usr/lib/waydroid/tools/helpers/lxc.py”, line 391, in wait_for_running
raise OSError(“container failed to start”)
OSError: container failed to start

(002388) [00:38:57] OSError: container failed to start
(002505) [00:40:56] % tail -n 60 -F /var/lib/waydroid/waydroid.log
(002505) [00:40:56] *** output passed to waydroid stdout, not to this log ***

papeto@power-bob:~$ mount | grep cgroup
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,seclabel,size=4096k,nr_inodes=1024,mode=755)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,noatime)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,noatime,name=systemd)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,noatime,pids)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,noatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,noatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,noatime,freezer)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,noatime,cpuset,noprefix,release_agent=/sbin/cpuset_release_agent)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,noatime,blkio)
cpu on /sys/fs/cgroup/cpu type cgroup (rw,nosuid,nodev,noexec,cpu)
cpuacct on /sys/fs/cgroup/cpuacct type cgroup (rw,nosuid,nodev,noexec,cpuacct)

I’m not familiar with waydroid so can’t comment on what it’s doing or why.

But the error here is that it’s asking LXC to set up some CPU limits and your kernel doesn’t support those particular limits. It could be that the limits are specified for cgroup1 when you’re running cgroup2 or that your system just doesn’t have the correct cgroup support built in.

For this issue with Waydroid you would likely need to contact their support group. It’s on Telegram.

Mention which version of Waydroid you are using. This one, or Waydroid-Linux beta.

$ waydroid --version
1.4.2
$ 

I use Waydroid and it works fine, however when I run lxc-ls I do not see the Waydroid container in the list. Most likely it’s a separate setup from the system’s LXC.