Linux Regression - joysticks stuck
#1
When I connect my Logitech RumblePad 2 USB gamepad, the sound volume keeps increasing. It stops after I press any key, after this it works normally.
Sometimes it also happens at start up, with the gamepad still connected, but I can't find the conditions to reproduce it.
It appears that the both left and right joysticks are holding up. When in the main screen, the focus moves to Pictures menu, and in a list menu it moves up. When the joystick are stuck I can't move with the keyboard.

I found the first bad commit: [dd65df5708988eb557e4e3aea8d6402dd35099b1] panning with gamepad in slideshow fixed
git bisect log https://bpaste.net/show/921999c44607
Before I tested, removed ~/.kodi.

This time, the volume increased at start up:
kodi.log https://bpaste.net/show/522c1813a34e
This time, I had to disconnect a connect the gamepad:
kodi.log https://bpaste.net/show/f0f51570d17b

As of Git:2016-02-06-128848b the issue still happens.

Code:
$ cat /proc/bus/input/devices
I: Bus=0003 Vendor=046d Product=c218 Version=0110
N: Name="Logitech Logitech RumblePad 2 USB"
P: Phys=usb-0000:00:1d.3-1/input0
S: Sysfs=/devices/pci0000:00/0000:00:1d.3/usb5/5-1/5-1:1.0/0003:046D:C218.0019/input/input27
U: Uniq=
H: Handlers=event5
B: PROP=0
B: EV=20001b
B: KEY=fff00000000 0 0 0 0
B: ABS=30027
B: MSC=10
B: FF=107030000 0
$ uname -m
x86_64
$ lspci -nn
00:02.0 VGA compatible controller [0300]: Intel Corporation 4 Series Chipset Integrated Graphics Controller [8086:2e32] (rev 03)

I posted on OpenELEC forum about this problem, when I thought it was OpenELEC specific.
http://openelec.tv/forum/105-keyboards/7...ght-analog
Although in OpenELEC, the joysticks are stuck every time It boots.
I should test if the happens after restarting kodi on OpenELEC and on kodi first start after a machine reboot.
Reply
#2
Tried setting controllerdeadzone in advancedsettings.xml to 0.99 and other values, but the joysticks get stuck as well.
Setting to 1 stops the erratic behaviour, but the joysticks are completely dead which is useless.
Reply
#3
As I understand now, the root cause of this issue is the value returned by SDL_JoystickGetAxis(joy, a).

When the controls are crazy, returns -32768, for all the axis I have, which is the minimum this functions returns.
Then kodi thinks I'm holding the joystick, when I'm not, resulting in kodi actions: ScrollUp, VolumeUp, AnalogSeekBack, for instance.
So, either this is a bug in SDL, my joysticks are nutty or something else, but not an issue with Kodi.
After I've pressed some button, the value returned is 0, and the erratic behaviour stops.

What opened the Pandora box for this issue?
Before, Kodi selected the joystick axis with maximum amount (this will be the one the user is holding) - with CJoystick::GetAxisWithMaxAmount() , then would lookup for an action to perform with the value of the axis. In my case, this axis was axis 0, but, luckily, there were no action bound to axis 0 given a negative axis value (-32768). So, Kodi was reading from the joystick but did nothing.
Introduced with the first bad commit dd65df5, Kodi goes through more than one axis at each cycle, instead just the one AxisWithMaxAmount() returns. In this case, kodi found keymaps for those joystick axis and begun to perform VolumeUp an others.
Helix 14.2 is before this commit.

Have someone experienced this issue?
Maybe someone can thing of a hack do fix this?
Reply

Logout Mark Read Team Forum Stats Members Help
Regression - joysticks stuck0