OK obviously not a mission critical issue but I am running Steam in a container and, for the life of me, can’t get it to recognize my Logitech USB Controller (Gamepad F310). I’ve added the USB via “device”:
lxc config device add steam gamepad usb vendorid=046d productid=c216
lsusb within the container produces: Bus 001 Device 008: ID 046d:c216 Logitech, Inc. F310 Gamepad [DirectInput Mode]
and yet, no dice. In the past, I’ve run Steam on the host and the gamepad works just fine.
My guess is that applications don’t interact with your joystick through /dev/bus/usb as a usb device provides but instead through some kind of hid/input type device instead.
You could try using a unix-hotplug type device instead which if you can easily unplug and plug your joystick back in should cause the relevant devices to all show up in the container.
Alternatively, you’d need to track down the relevant /dev/input/ device entries and manually pass those into the container using some unix-char devices.
Now the joystick is available in the Steam settings and one of the two games I play that requires a joystick. The one that does not work (Streets of Rage 4) I have no idea why. Obviously that isn’t a LXD issue, though.
Thank you so much Stephane!
EDIT: Small update (if anyone finds this through their Google-foo), the above solution comes with the following caveat: hotplugging is not available. The controler must be plugged in when Steam starts.
Also, if a game does not recognize the controller, try going into that game’s settings and disabling Steam assist. That worked for me.