How to make a Bluetooth game controller show up under /dev/input/js* in addition to /dev/input/event*?
https://askubuntu.com/questions/1565596/how-to-make-a-bluetooth-game-controller-show-up-under-dev-input-js-in-addition
I'm using Ubuntu Cinnamon 24.04, and have a Bluetooth gamepad (a Gioteck WX5 that emulates a Nintendo Switch 2 Pro Controller). I can pair it with my laptop, and when I do, it shows up as a pair of devices in /dev/input (specifically, "Pro Controller" in /dev/input/event18, which responds to button presses and thumbstick movements, and "Pro Controller (IMU)" in /dev/input/event19, which I think (but am not totally sure) is the accelerometer / motion controls).
I can confirm that the gamepad is working by using evtest, which displays the button presses. I have added myself to the input group in /etc/group, giving myself permissions to read from /dev/input directly.
However, the gamepad doesn't show up under /dev/input/js*, which means that some programs (such as jstest-gtk) aren't able to see it. I'm particularly interested in using the gamepad from a browser such as Firefox or Chromium, but they don't appear to see the gamepad either, and I think that the fact that it doesn't show up under /dev/input/js* is the most likely cause. (To rule out possibilities, I also tried a wired Xbox 360 game controller, and this does show up as /dev/input/js0 and does work correctly in at least Chromium.)
I tried checking for existing questions but none seemed to have similar enough circumstances: in most of them, the controller was appearing in /dev/input/js* and the problem was elsewhere. This question is the closest, but the journalctl entries I'm seeing are substantially different from the ones seen in that case:
kernel: nintendo 0005:057E:2009.0005: hidraw2: BLUETOOTH HID v80.01 Gamepad [Pro Controller] on [REDACTED]
kernel: nintendo 0005:057E:2009.0005: controller MAC = [REDACTED]
kernel: nintendo 0005:057E:2009.0005: using user cal for left stick
kernel: nintendo 0005:057E:2009.0005: using user cal for right stick
[...]
kernel: nintendo 0005:057E:2009.0005: failed reading SPI flash; ret=-110
kernel: nintendo 0005:057E:2009.0005: Failed to read left stick cal, using defaults; e=-110
kernel: nintendo 0005:057E:2009.0005: failed reading SPI flash; ret=-110
kernel: nintendo 0005:057E:2009.0005: Failed to read right stick cal, using defaults; e=-110
kernel: nintendo 0005:057E:2009.0005: using factory cal for IMU
kernel: nintendo 0005:057E:2009.0005: assigned player 1 led pattern
kernel: input: Pro Controller as /devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0/bluetooth/hci0/hci0:3/0005:057E:2009.0005/input/input31
kernel: input: Pro Controller (IMU) as /devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0/bluetooth/hci0/hci0:3/0005:057E:2009.0005/input/input32
systemd[1]: Starting iio-sensor-proxy.service - IIO Sensor Proxy service...
systemd[1]: Started iio-sensor-proxy.service - IIO Sensor Proxy service.
systemd[1]: iio-sensor-proxy.service: Deactivated successfully.
I also don't want to blacklist the Nintendo driver because part of the reason I bought this controller is that I was interested in making use of the motion/accelerometer inputs (given that I already have a different controller for which the button/joystick inputs work).
Is there a way to configure the Bluetooth gamepad to show up under /dev/input/js* in addition to /dev/input/event*, and/or to allow Chromium to see it directly from /dev/input/event*?
udevadm info
One of the comments asked for information from the udevadm command; here it is (with MAC addresses redacted):
$ udevadm info --no-pager /sys/class/input/input35
P: /devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0/bluetooth/hci0/hci0:1/0005:057E:2009.0007/input/input35
M: input35
R: 35
U: input
E: DEVPATH=/devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0/bluetooth/hci0/hci0:1/0005:057E:2009.0007/input/input35
E: SUBSYSTEM=input
E: PRODUCT=5/57e/2009/8001
E: NAME="Pro Controller"
E: PHYS="[REDACTED]"
E: UNIQ="[REDACTED]"
E: PROP=0
E: EV=20000b
E: KEY=7ffb000000000000 0 0 0 0
E: ABS=3001b
E: FF=107030000 0
E: MODALIAS=input:b0005v057Ep2009e8001-e0,1,3,15,k130,131,133,134,135,136,137,138,139,13A,13B,13C,13D,13E,ra0,1,3,4,10,11,mlsf50,51,58,59,5A,60,w
E: USEC_INITIALIZED=34383723107
E: ID_INPUT=1
E: ID_INPUT_JOYSTICK=1
E: ID_BUS=bluetooth
E: ID_PATH_WITH_USB_REVISION=pci-0000:00:14.0-usbv2-0:8:1.0
E: ID_PATH=pci-0000:00:14.0-usb-0:8:1.0
E: ID_PATH_TAG=pci-0000_00_14_0-usb-0_8_1_0
E: ID_FOR_SEAT=input-pci-0000_00_14_0-usb-0_8_1_0
E: TAGS=:seat:
E: CURRENT_TAGS=:seat:
$ udevadm info --no-pager /sys/class/input/input36
P: /devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0/bluetooth/hci0/hci0:1/0005:057E:2009.0007/input/input36
M: input36
R: 36
U: input
E: DEVPATH=/devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0/bluetooth/hci0/hci0:1/0005:057E:2009.0007/input/input36
E: SUBSYSTEM=input
E: PRODUCT=5/57e/2009/8001
E: NAME="Pro Controller (IMU)"
E: PHYS="[REDACTED]"
E: UNIQ="[REDACTED]"
E: PROP=40
E: EV=19
E: ABS=3f
E: MSC=20
E: MODALIAS=input:b0005v057Ep2009e8001-e0,3,4,kra0,1,2,3,4,5,m5,lsfw
E: USEC_INITIALIZED=34383723420
E: ID_INPUT=1
E: ID_INPUT_ACCELEROMETER=1
E: ID_BUS=bluetooth
E: ID_PATH_WITH_USB_REVISION=pci-0000:00:14.0-usbv2-0:8:1.0
E: ID_PATH=pci-0000:00:14.0-usb-0:8:1.0
E: ID_PATH_TAG=pci-0000_00_14_0-usb-0_8_1_0
E: ID_FOR_SEAT=input-pci-0000_00_14_0-usb-0_8_1_0
E: IIO_SENSOR_PROXY_TYPE=input-accel
E: SYSTEMD_WANTS=iio-sensor-proxy.service
E: TAGS=:systemd:seat:
E: CURRENT_TAGS=:systemd:seat: