Hello. I installed Kodi as a container passing /dev/dri/card0, /dev/dri/renderD128, /dev/fb0 and /dev/ttyX from the host and using Kodi via GBM (very light and no graphical server or extra dependencies needed).
The most annoying part of the installation process was having a USB keyboard be identified by the container. After a lot of research I found this (that saved my life, because by the time I found this thread I was almost giving up) and it worked ok with the keyboard so that I could complete a basic Kodi installation.
Now I’m controlling it with my Android phone but what I really want is to use a Rii MX3 Air Remote Control I have (easier and more comfortable).
Thing is although it gets recognized, not all buttons work (and I know the keymap of this remote works out of the box because I’ve used it before, with this same configuration, when I was using Proxmox).
So I followed the suggested approach by the aforementioned thread and passed /run/udev/data as follows (btw, is this the correct way to achieve that in Incus?):
incus config device add kodi udev_data disk source=/run/udev/data path=/home/alscx/udev/data
Before Kodi starts I copy the content of /home/alscx/udev/data to /run/udev/data (couldn’t I pass /run/udev/data from the host directly to /run/udev/data on the container so that I’d remove one extra step?)
Then, I tried to pass the remote control device one of these following ways:
lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 003: ID 1915:1025 Nordic Semiconductor ASA USB Composite Device
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
incus config device add kodi rii-mx3 usb vendorid=1915 productid=1025 required=false
Doing so the remote control is not recognized by Kodi… I also tried unix-hotplug with no success.
The other way I tried was:
ls -lh /dev/input/by-id/
total 0
lrwxrwxrwx 1 root root 10 set 18 15:09 usb-XING_WEI_2.4G_USB_USB_Composite_Device-event-if03 → ../event12
lrwxrwxrwx 1 root root 9 set 18 15:09 usb-XING_WEI_2.4G_USB_USB_Composite_Device-if02-event-kbd → ../event9
lrwxrwxrwx 1 root root 10 set 18 15:09 usb-XING_WEI_2.4G_USB_USB_Composite_Device-if03-event-mouse → ../event10
lrwxrwxrwx 1 root root 9 set 18 15:09 usb-XING_WEI_2.4G_USB_USB_Composite_Device-if03-mouse → ../mouse0
incus config device add kodi remote-event-if03 unix-char path=/dev/input/event12 required=false gid=994
incus config device add kodi remote-event-if02-event-kbd unix-char path=/dev/input/event9 required=false gid=994
incus config device add kodi remote-event-if03-event-mouse unix-char path=/dev/input/event10 required=false gid=994
incus config device add kodi remote-event-if03-mouse unix-char path=/dev/input/mouse0 required=false gid=994
Now I can use the remote, but not all buttons get recognized. That or sometimes buttons that were being recognized just stop working. This remote has a kind of ‘mouse mode’ that sometimes may force this behavior in some situations, but I made sure of disabling it. Obviously I’m using new batteries.
Is there a more suitable way to achieve what I need?