SDL icon indicating copy to clipboard operation
SDL copied to clipboard

SDL2 2.0.16 Gamepad Showing Multiple Times vs 2.0.14

Open Lycanite opened this issue 4 years ago • 5 comments

On upgrading to SDL2 2.0.16 my Azeron gamepad is coming up as 4 unusable devices! I've had to rollback to 2.0.14. Here's the output of sdl2-jstest -l for each version:

2.0.16 Broken `error: failed to read gamecontrollerdb.txt: Invalid RWops Found 4 joystick(s)

Joystick Name: 'LTD Azeron Keypad' Joystick GUID: 03000000d01600003f0f00000c006800 Joystick Number: 0 Number of Axes: 6 Number of Buttons: 15 Number of Hats: 0 Number of Balls: 0 GameControllerConfig: Name: 'LTD Azeron Keypad' Mapping: '03000000d01600003f0f00000c006800,*,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,'

Joystick Name: 'LTD Azeron Keypad' Joystick GUID: 03000000d01600003f0f00000c006800 Joystick Number: 1 Number of Axes: 6 Number of Buttons: 15 Number of Hats: 0 Number of Balls: 0 GameControllerConfig: Name: 'LTD Azeron Keypad' Mapping: '03000000d01600003f0f00000c006800,*,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,'

Joystick Name: 'LTD Azeron Keypad' Joystick GUID: 03000000d01600003f0f00000c006800 Joystick Number: 2 Number of Axes: 6 Number of Buttons: 15 Number of Hats: 0 Number of Balls: 0 GameControllerConfig: Name: 'LTD Azeron Keypad' Mapping: '03000000d01600003f0f00000c006800,*,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,'

Joystick Name: 'LTD Azeron Keypad' Joystick GUID: 03000000d01600003f0f00000c006800 Joystick Number: 3 Number of Axes: 6 Number of Buttons: 15 Number of Hats: 0 Number of Balls: 0 GameControllerConfig: Name: 'LTD Azeron Keypad' Mapping: '03000000d01600003f0f00000c006800,*,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,'`

2.0.14 Working `error: failed to read gamecontrollerdb.txt: Invalid RWops Found 1 joystick(s)

Joystick Name: 'LTD Azeron Keypad' Joystick GUID: 03000000d01600003f0f000011010000 Joystick Number: 2 Number of Axes: 5 Number of Buttons: 32 Number of Hats: 1 Number of Balls: 0 GameControllerConfig: missing (see 'gamecontrollerdb.txt' or SDL_GAMECONTROLLERCONFIG)`

It looks like it's possibly related to mapping, maybe some new mappings are conflicting with this device (looks like the GUID is coming up different in the newer version, perhaps it's being read as the wrong device, it has a lot more than 15 buttons)? The device itself is a gaming keypad of sorts so I don't need to map it to a standard controller, but I do use AntimicroX heavily to configure this device and with this update the entire setup is bust. Let me know if you need more info.

Lycanite avatar Sep 10 '21 07:09 Lycanite

Do you have some time to chat about this? What's the best way to reach you?

slouken avatar Sep 10 '21 17:09 slouken

Please send me e-mail at [email protected] with how to debug this interactively with you. I can do Zoom, Slack, Discord, etc.

slouken avatar Sep 13 '21 19:09 slouken

This seems to be still affecting versions 2.0.20-22 at least those that are shipped with fedora 36. On fedora 35 i was able to downgrade sdl to working version that is no more possible (on official repos). My Logitech controller works great anyhow. Removing Logitech or moving controller/s to another usb-bus doesn't help.

lsusb |grep pad Bus 003 Device 006: ID 046d:c21f Logitech, Inc. F710 Wireless Gamepad [XInput Mode] Bus 003 Device 002: ID 16d0:0f3f MCS Azeron Keypad

sdl2-jstest -l Found 5 joystick(s)

Joystick Name: 'Logitech Wireless Gamepad F710' Joystick GUID: 030000006d0400001fc2000005036800 Joystick Number: 0 Number of Axes: 6 Number of Buttons: 15 Number of Hats: 0 Number of Balls: 0 GameControllerConfig: Name: 'Logitech Wireless Gamepad F710' Mapping: '030000006d0400001fc2000005036800,*,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Linux'

Joystick Name: 'LTD Azeron Keypad' Joystick GUID: 03000000d01600003f0f00003d006800 Joystick Number: 1 Number of Axes: 6 Number of Buttons: 15 Number of Hats: 0 Number of Balls: 0 GameControllerConfig: Name: 'LTD Azeron Keypad' Mapping: '03000000d01600003f0f00003d006800,*,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Linux'

Joystick Name: 'LTD Azeron Keypad' Joystick GUID: 03000000d01600003f0f00003d006800 Joystick Number: 2 Number of Axes: 6 Number of Buttons: 15 Number of Hats: 0 Number of Balls: 0 GameControllerConfig: Name: 'LTD Azeron Keypad' Mapping: '03000000d01600003f0f00003d006800,*,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Linux'

Joystick Name: 'LTD Azeron Keypad' Joystick GUID: 03000000d01600003f0f00003d006800 Joystick Number: 3 Number of Axes: 6 Number of Buttons: 15 Number of Hats: 0 Number of Balls: 0 GameControllerConfig: Name: 'LTD Azeron Keypad' Mapping: '03000000d01600003f0f00003d006800,*,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Linux'

Joystick Name: 'LTD Azeron Keypad' Joystick GUID: 03000000d01600003f0f00003d006800 Joystick Number: 4 Number of Axes: 6 Number of Buttons: 15 Number of Hats: 0 Number of Balls: 0 GameControllerConfig: Name: 'LTD Azeron Keypad' Mapping: '03000000d01600003f0f00003d006800,*,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Linux'

On dev i found following entries /dev/input/by-id/usb-Azeron_LTD_Azeron_Keypad-if01-event-kbd -> ../event4 /dev/input/by-id/usb-Azeron_LTD_Azeron_Keypad-if02-event-mouse -> ../event3 /dev/input/by-id/usb-Azeron_LTD_Azeron_Keypad-if02-mouse -> ../mouse0 /dev/input/by-id/usb-Azeron_LTD_Azeron_Keypad-if03-event-joystick -> ../event2 /dev/input/by-id/usb-Azeron_LTD_Azeron_Keypad-if03-joystick -> ../js0 /dev/input/by-id/usb-Logitech_Wireless_Gamepad_F710_24B091C6-event-joystick -> ../event15 /dev/input/by-id/usb-Logitech_Wireless_Gamepad_F710_24B091C6-joystick -> ../js1

apmak3 avatar Jun 21 '22 10:06 apmak3

I had sent the email way back but never got in contact in the end.

It is now working fine for me on the latest 2.0.22-2 but has also been working since 2.0.18 as well where my Azeron shows as only 1 device again.

Initially I had found that plugging my Azeron keypad into another pc running the same version of Manjaro but the latest libsdl2 (2.0.18 a the time) worked perfectly fine so it became an isolated anomaly on just my main pc, I really didn't want to reinstall everything though.

To seemingly fix the issue, after months of using sdl 2.0.14, I updated to 2.0.18 I think at the time and then removed all my controllers. I had the Azeron, a ps4 gamepad, a thrustmaster joystick and thrustmaster pedals, I think my mouse was showing at the time as well, I basically ensured that there were 0 devices picked up by sdl2. Running "sdl2-jstest -l" was helpful for this but also Antimicro does a good job of listing sdl devices too.

I then rebooted and only inserted the Azeron and it just worked. Since then I can use all manner of devices together without any issues. I'm thinking its some setting or config somewhere from 2.0.14 and below that hasn't transitioned correctly, I had tried poking around the source code and compiling a few things but I'm not familiar enough with the code base and couldn't find any changes via git history that seemed to be the cause of the problem. I also tried checking some configs from my two pcs but wasn't really sure which configs to look for and compare, most of them were mainly just the devices rules at "/usr/lib/udev/rules.d/" where I did have a custom rule to fix the thrustmaster pedals, this didn't seem to have an effect on sdl2 though I do think disconnecting them could have led to the fix.

Either way my Azeron is working fine now since 2.0.18 after disconnecting everything and rebooting with them disconnected initially.

Lycanite avatar Jun 21 '22 10:06 Lycanite

I tried that but have no success. But to crosscheck i updated my laptop also to fedora 36 and indeed same version of sdl and antimicrox and my keypad works even sdl2-jstest shows it correct. So it seems that problem is on my system. Sorry for waking this thread. -- Small note here installed all versions of prebuild packages on F36 and found one which works and it is 2.0.16-4 (that is exact version where this behavior first occurred ...) Could say i am bit confused.

apmak3 avatar Jun 21 '22 15:06 apmak3