Creating virtual joysticks using mknod in unprivileged container?

Lombra

New Member
Feb 2, 2025
11
2
3
Hi,

I'm trying to get Wolf working in an unprivileged container. The last piece of the puzzle is to get virtual joysticks working. It uses mknod to that end, and I have been unsuccessful in getting that working. At least, I think that's what the issue is.

When attempting to do it manually, I get "operation not permitted".
Bash:
$ mknod /dev/input/js0 c 13 0
mknod: /dev/input/js0: Operation not permitted
I have seen some old posts indicating mknod is not available or restricted in an unprivileged environment, so I don't know whether that's the issue here.

I'm in way over my head here, having tried random stuff, but this is my container configuration so far:
Code:
arch: amd64
cores: 4
dev0: /dev/uinput
dev1: /dev/uhid
dev2: /dev/dri/card0,gid=44
dev3: /dev/dri/renderD128,gid=104
features: nesting=1,mknod=1
hostname: wolf
memory: 8192
net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=BC:24:11:44:1C:B1,ip=dhcp,type=veth
ostype: debian
rootfs: local-lvm:vm-110-disk-0,size=100G
swap: 512
unprivileged: 1
lxc.mount.entry: /dev/input dev/input none bind,optional,create=dir
lxc.mount.entry: /run/udev mnt/udev none bind,optional,create=dir
lxc.cgroup2.devices.allow: b 13:* rwm
lxc.cgroup2.devices.allow: c 13:* rwm
lxc.cgroup2.devices.allow: c 10:223 rwm

I also have this udev rule on the host system:
Code:
KERNEL=="uinput", SUBSYSTEM=="misc", MODE="0666", GROUP="100101", OPTIONS+="static_node=uinput", TAG+="uaccess"
KERNEL=="uhid", TAG+="uaccess"
SUBSYSTEMS=="input", ATTRS{id/vendor}=="ab00", MODE="0660", GROUP="100101", ENV{ID_SEAT}="seat9"
SUBSYSTEMS=="input", ATTRS{name}=="Wolf X-Box One (virtual) pad", MODE="0666", GROUP="100101"
 
Can anyone confirm whether mknod would be the core of the issue here? And would this be the case using any LXC implementation?