Kodi v19.1 update - lost gamepad support

Hi,

All in all the Kodi v19.1 upgrade went just fine - so far… Now I just noticed that my two wireless gamepads (using USB tranceivers) don’t work anymore.

.kodi/temp/kodi.log shows that the driver is being loaded:

INFO <general>: CAddonMgr::FindAddons: peripheral.joystick v1.7.2 installed
[...]
INFO <general>: AddOnLog: peripheral.joystick: Enabling joystick interface "linux"

I also tried the udev driver but to no avail.
I can see that the USB device is found during boot (or on connect after boot):

usb 1-1.2: new full-speed USB device number 10 using xhci-hcd
usb 1-1.2: New USB device found, idVendor=2563, idProduct=0575
usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-1.2: Product: USB WirelessGamepad
usb 1-1.2: Manufacturer: ShanWan

However, the first curiosity I noticed is that without manual disconnect/reconnect the USB device found doesn’t lead to an input device being created. Only when done manually sysfs apparently registers a new input device:

input: ShanWan USB WirelessGamepad  as /devices/platform/c9000000.dwc3/xhci-hcd.0.auto/usb1/1-1/1-1.2/1-1.2:1.0/0003:2563:0575.0008/input/input10
hid-generic 0003:2563:0575.0008: input,hidraw0: USB HID v1.10 Gamepad [ShanWan USB WirelessGamepad ] on usb-xhci-hcd.0.auto-1.2/input0

Unfortunately, devfs still doesn’t. There used to be a device like /dev/input/js0 which could be tested using jstest for example. After the upgrade there’s no such device anymore…

Any idea?

Thanks

Hi @brevilo

Unfortunately I don’t have this dongle, so all I can suggest is installing a version of OSMC where it worked and then running

lsmod | paste-log and sending me the output.

This should let me work out if something is missing from our 4.9 kernel

Cheers

Sam

Hey Sam,

thanks for the quick reply (as always). Before I go down that route, I quickly checked things on a PC’s Debian Buster with kernel 4.19. The only extra module loaded on connect is joydev and the devfs node is being created as usual while the dmesg output is similar to that above.

I checked /boot/config-4.9.113-45-osmc and confirmed CONFIG_INPUT_JOYDEV=y. So joydev is compiled in and thus won’t appear in the output of lsmod. I checked the joystick-specific stock kernel options in Debian Buster and there’s nothing compiled in, only modules (besides module-specific options), so the lsmod check above should be complete:

# grep -e "CONFIG.*JOYSTICK" /boot/config-4.19.0-17-amd64
CONFIG_INPUT_JOYSTICK=y
CONFIG_JOYSTICK_ANALOG=m
CONFIG_JOYSTICK_A3D=m
CONFIG_JOYSTICK_ADI=m
CONFIG_JOYSTICK_COBRA=m
CONFIG_JOYSTICK_GF2K=m
CONFIG_JOYSTICK_GRIP=m
CONFIG_JOYSTICK_GRIP_MP=m
CONFIG_JOYSTICK_GUILLEMOT=m
CONFIG_JOYSTICK_INTERACT=m
CONFIG_JOYSTICK_SIDEWINDER=m
CONFIG_JOYSTICK_TMDC=m
CONFIG_JOYSTICK_IFORCE=m
CONFIG_JOYSTICK_IFORCE_USB=y
CONFIG_JOYSTICK_IFORCE_232=y
CONFIG_JOYSTICK_WARRIOR=m
CONFIG_JOYSTICK_MAGELLAN=m
CONFIG_JOYSTICK_SPACEORB=m
CONFIG_JOYSTICK_SPACEBALL=m
CONFIG_JOYSTICK_STINGER=m
CONFIG_JOYSTICK_TWIDJOY=m
CONFIG_JOYSTICK_ZHENHUA=m
CONFIG_JOYSTICK_DB9=m
CONFIG_JOYSTICK_GAMECON=m
CONFIG_JOYSTICK_TURBOGRAFX=m
# CONFIG_JOYSTICK_AS5011 is not set
CONFIG_JOYSTICK_JOYDUMP=m
CONFIG_JOYSTICK_XPAD=m
CONFIG_JOYSTICK_XPAD_FF=y
CONFIG_JOYSTICK_XPAD_LEDS=y
CONFIG_JOYSTICK_WALKERA0701=m
# CONFIG_JOYSTICK_PSXPAD_SPI is not set
CONFIG_JOYSTICK_PXRC=m

I think I’ll check a Raspian Buster next…

Same behavior as seen with the PC’s Debian Buster (all working as expected).

Does the above help by any means…?

If you can remind me about this in a couple of weeks I can take a closer look.

Sure! Added to my calendar :smirk: