Lxc/lxd arch container fails after upgrade to systemd-247

,

The host computer runs ubuntu 20.10/nvidia-455. kernel 5.8.0-31 lxd 4.8

I share the GPU with the guest archlinux container. There is no graphics issue. After upgrading the guest systemd from 246.6-1 to 247.1-1 the mouse and keyboard are not working. In fact all the devices in /dev/input are failing. The container is a privileged container.

In the lxc config I allow all the input events
lxc.cgroup.devices.allow = c 13:* rwm

I get similar errors for every device in /dev/input/event*

Dec 03 19:09:37 arch /usr/lib/gdm-x-session[204]: (II) Using input driver 'evdev' for 'event0'
Dec 03 19:09:37 arch /usr/lib/gdm-x-session[204]: (EE) systemd-logind: failed to take device /dev/input/event0: No such device
Dec 03 19:09:37 arch /usr/lib/gdm-x-session[204]: (**) event0: always reports core events
Dec 03 19:09:37 arch /usr/lib/gdm-x-session[204]: (**) evdev: event0: Device: "/dev/input/event0"
Dec 03 19:09:37 arch /usr/lib/gdm-x-session[204]: (EE) evdev: event0: Unable to open evdev device "/dev/input/event0" (Permission denied).
Dec 03 19:09:37 arch /usr/lib/gdm-x-session[204]: (EE) PreInit returned 2 for "event0"
Dec 03 19:09:37 arch /usr/lib/gdm-x-session[204]: (II) UnloadModule: "evdev"

The device does exist for example.

ls -ls /dev/input/event0

0 crw-rw---- 1 root 107 13, 64 Dec 3 18:52 /dev/input/event0

Any ideas how to fix the issue or have a workaround.

thanks

Do you use the GPU for CUDA tasks or do you run GUI applications from the container and view them on the host? If it is the latter, which method do you use?

Most likely the privileged part could be causing the issue. Does the container really need to be privileged? Both running CUDA programs and GUI applications do not require a privileged container.

I share all the Nvidia devices with the arch container. It can be used for cuda, But I have an entire desktop of arch running in VT9(GDM) VT10(Desktop) while ubuntu is running in VT1 (GDM) VT7 (Desktop). The desktop VT changes. I have had no issues with systemd 246 (in the guest). Something changed in 247 that prevents the container from accessing the event devices.

It is a privileged container. I never tried to make it unprivileged. (It was converted from lxc) This is my Main desktop size 150G. I would like to keep it Privileged. It basically enables me to run arch with ubuntu as backup, or just have both running simultaneously.

I do allow all the event devices.

lxc.cgroup.devices.allow = c 13:* rwm

I was able to find a workaround for the issue.

# chmod 666 /dev/input/event*

After that I was able to use the mouse and keyboard. This is not a good fix. Is there a better fix. May be a change in the config file of the container.