peripheral.joystick
peripheral.joystick copied to clipboard
Problem with axes on udev
I have a Sony Playstation 4 controller which I'm using over Bluetooth. On Kodi 17-beta1, it worked correctly, but on Kodi 17-beta2 it would not work correctly. The difference seems to be that the provider on beta1 is "linux" and on beta2 it's "udev".
Specifically, using "udev" it seems like the normal buttons work correctly, but the analog buttons, meaning the axes, do not. It seems like udev recognizes only 8 axes, while there are supposed to be 18. This results in not being able to use the left and right joystick, but it also seems like some of these axes are "stuck" which causes it to continuously scroll or increase the volume. Since not all axes have a 0 value in their idle state, and there's an accelerometer which has constantly changing value, I think this is caused by the incorrect recognition of the axes.
I've added the xml files that were created with each of these versions. The 14b_18a one works correctly, and the 14b_8a one does not. udev joystick issue.zip
I hope this can be fixed since I can't upgrade to beta2 because of this.
Thanks for the report. The udev support is loosely based on RetroArch, but I made sure to keep the order the buttons and axes are enumerated the same so that keymaps are intercompatible. Can you test on RetroArch?
For the betas, I went around and purchased all the shitty controllers I could to handle the edge cases. Now, for final, I plan to pick up all the popular controllers and make sure they're working before we release. I'll make sure the PS4 controller is included in this round.
I can try to test on retroarch when I have some time. But this doesn't seem to be a problem in the order of the axes, but in the actual amount of axes. My controller has 18 axes, but through the udev provider Kodi only sees 8. So the order doesn't really matter if you're missing 10 axes.
I don't think this has to do with compatibility either, as I created each of those keymaps from scratch, using the configuration wizard. I assume that by keymap you mean the xml file like the ones I attached to this issue, and not something like the joystick.xml. Because the joystick.xml seems to work fine, I have a customized joystick.xml in my userdata folder and even with the lack of axes and stuck actions it seemed to match what I defined in my joystick.xml file.
I seem to be having a similar issue with an 8bitdo SNES30. It was working great in Beta 1 but in recent builds up (-0) and left(-1) no longer work, though all other buttons work great. I tried it in retroarch and all directions seemed to function without issue.
Confirmed issues with DS4 analog sticks.
OK, I know where the problem is but I'll need more controllers to test. in the meantime I'll revert to the linux joystick API
next nightly will use the linux driver instead of udev
This should now be fixed with the udev fixes from @nadenislamarre listed in https://github.com/xbmc/peripheral.joystick/pull/310. If there are still udev problems, either comment here, reopen the issue, or create a new one.