I am running Kodi (LibreELEC) in an unprivileged LXC container with GPU+USB passthrough - see below config.
The container boots fine and outputs the Kodi interface or GUI on the connected HDMI monitor. As a bonus I can even use hardware acceleration.
However the USB Keyboard nor Mouse input seems to be working or controlling the GUI.
I checked a couple of things in the container;
So the /dev/input device does seem to be working in the container.
I suspect as the container OS is using GBM there might be some permissions missing still ?
Should I give the container access to /run/udev, and how?
Sources;
Code:
#Converted from VM to CT via <a href=http%3A//www.github.com/thushan/proxmox-vm-to-ct>proxmox-vm-to-ct</a>.
#
#http%3A//libreelec-test2%3A8080/
arch: amd64
cmode: console
cores: 2
dev0: /dev/dri/card0
dev1: /dev/dri/renderD128
dev2: /dev/fb0
dev3: /dev/input/event2
features: keyctl=1,nesting=1
hostname: LibreELEC-test2
memory: 2048
net0: name=eth0,bridge=vmbr0,hwaddr=BC:24:11:4E:5E:94,ip=dhcp,type=veth
onboot: 0
ostype: unmanaged
rootfs: local-zfs:subvol-103-disk-0,size=20G
swap: 512
unprivileged: 1
lxc.mount.auto: sys:rw
The container boots fine and outputs the Kodi interface or GUI on the connected HDMI monitor. As a bonus I can even use hardware acceleration.
However the USB Keyboard nor Mouse input seems to be working or controlling the GUI.
I checked a couple of things in the container;
Code:
LibreELEC-test2:~ # ls /dev/input -la
crw-rw---- 1 root root 13, 66 Oct 17 16:26 event2
Code:
LibreELEC-test2:~ # evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event2: Lite-On Technology USB Productivity Option Keyboard( has the hub in # 1 )
Code:
Testing ... (interrupt to exit)
Event: time 1760711288.223959, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70052
Event: time 1760711288.223959, type 1 (EV_KEY), code 103 (KEY_UP), value 1
Event: time 1760711288.223959, -------------- SYN_REPORT ------------
Event: time 1760711288.263947, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70052
Event: time 1760711288.263947, type 1 (EV_KEY), code 103 (KEY_UP), value 0
Event: time 1760711288.263947, -------------- SYN_REPORT ------------
So the /dev/input device does seem to be working in the container.
I suspect as the container OS is using GBM there might be some permissions missing still ?
Should I give the container access to /run/udev, and how?
Sources;