I am testing with about 100 devices, and in the balena container we insert the kernel module for a touchscreen device (I2C based). In the host OS, this always produces a /dev/input/event0 device file, but it only appears 90% of the time in the container file system. Restarting the container seems to roll the dice again, with a 90% chance of the T/S showing up. Is there any reason the device file would exist in the host OS but not the container.
Some more information about this issue - if the /dev/input/event0 does not appear in the container, I can run mknod manually to create the file and the device works. What is odd is that in my Dockerfile template, I have UDEV=off. However, sometimes the device appears and sometimes it does not, which suggests a race condition. How can it appear only some of the time, if UDEV=off ???
Have you tried setting your containers to privileged mode in order to access the device files? Scroll down this link for a little bit more information: Multiple containers - Balena Documentation . Also, what is your reason for havingUDEV=off? Setting UDEV=onor UDEV=1 allows for optimal touchscreen functionality.