Here’s a log after the ownership change and when working. A little different, now the old
write(1, " Error couldn’t claim the USB in"…, 59 Error couldn’t claim the USB interface: LIBUSB_ERROR_BUSY
) = 59
write(1, “Try to run ‘rmmod xpad’ and then”…, 104Try to run ‘rmmod xpad’ and then xboxdrv again or start xboxdrv with the option --detach-kernel-driver.
) = 104
turns up again in the last lines. xpad isn’t loaded then, either, I checked again via lsmod.
Nope, no -D or --deamon option, neither in /home/osmc/start.sh, /home/osmc/xbmc.ini or /etc/rc.local. Just as in step 2 of Yggdrasil’s initial post. Also deleted the /home/osmc/buttonswap.ini because it has [xboxdrv-daemon] in it, although I had no call to it at this point, just to make sure. No change in behaviour.
I have a Wired Xbox 360 Controller. If you have a wired one and can replicate the problem with that I can try and look at this.
Hehe. I formed the company using a website that does it all for you and they set up a mail forwarding address for anonymity. I need to update that as we have an actual office now.
Hold off for now on spending money, because even if I get one, I may not necessarily be able to fix the problem.
That’s it. But you want to disable the xpad modules from being built, so you need to check for CONFIG_XPAD (may not be exact option name) in patches/rbp2-000-add-kernel-config.patch and remove it. Ideally you want to set to IS NOT SET or use make menuconfig to properly generate the kernel configuration.
osmc@RASPI2:~$ uname -a
Linux RASPI2 4.4.16-1-osmc #1 SMP PREEMPT Thu Aug 18 16:30:00 UTC 2016 armv7l GNU/Linux
It took nearly five hours to build, but at least I built my first (custom) kernel, yay. Btw, it worked with an 8 GB µSD card that contained nothing but OSMC.
Before I started building, I edited the /home/osmc/osmc/package/kernel-osmc/patches/rbp2-000-add-kernel-config.patch to contain
+CONFIG_JOYSTICK_XPAD is not set
+CONFIG_JOYSTICK_XPAD_FF is not set
During building some y/n/m questions came up for including stuff into the kernel, I answered n to CONFIG_JOYSTICK_XPAD and CONFIG_JOYSTICK_XPAD_FF. Also about six questions about sound broadcom thingie (unfortunately didn’t take screenhots) to which I replied n as well. sudo dpkg -i rbp2-image-4.4.16-1-osmc.deb, edited /etc/osmc/prefs.d/update_preferences, removed the sudo rmmod xpad line from /home/osmc/start.sh, rebooted, tested controller.
Unfortunately it still doesn’t work reliably. All tests/methods from the last ten posts above showed the same behaviour and error messages.
Now it might be imagination, but with the new kernel it worked in 4/5 cases. What also changed was the LED behaviour; now flashing always means working, and staying lit in position 1 always means not working. This is strange, as this is exactly what the --led=2 in /home/osmc/start.sh tells it to do.
Therefore I still think it can’t be a problem in principle but has to do with the order or way the USB device is initialised. If this can be determined by syslogs or anything, I’m happy to provide them.
NOTE: Some people have been having trouble with the XBox/XBox 360 controller driver xboxdrv on the current Raspbian Kernel. To work around this we now include the latest xpad kernel driver with the image (it is available from the Packages -> Drivers menu for those upgrading). The included xpad has been patched to map the Xbox 360 triggers to buttons, so they work out of the box with Emulation Station, without the need for xboxdrv.
I’ve tried to install xpad but it ended up with could not install package : dkms raspberrypi-kernel-headers
You may not want our xpad, as it may cause problems with Kodi on OSMC or other issues. We have some support for OSMC but I don’t think I can help get xpad working if they are managing their own kernels that won’t work with dkms.
I’m willing to test anything, although I managed to get the standard xpad driver to work reasonably good by simply removing all custom configs. It works ok with the autoconfig. I’m just not sure how to test it. All that git magic is fairly new to me so I’m still trying to wrap my head around it.