If you have a problem with a controller, there is a command that allows you to see its properties.
To test your controller, you must :
sdl2-jstest
Command to use:
sdl2-jstest --list
Result:
Joystick Name: 'DragonRise Inc. Generic USB Joystick'
Joystick Path: '/dev/input/event0'
Joystick GUID: 030000001008000001e5000010010000
Joystick Number: 0
Number of Axes: 2
Number of Buttons: 10
Number of Hats: 0
Number of Balls: 0
GameController:
not a gamepad
Axis code 0: 0
Axis code 1: 1
Button code 0: 288
Button code 1: 289
Button code 2: 290
Button code 3: 291
Button code 4: 292
Button code 5: 293
Button code 6: 294
Button code 7: 295
Button code 8: 296
Button code 9: 297
Command to use:
sdl2-jstest -e 0
Here, 0 is the number of your controller detected with the command sdl2-jstest --list
.
You can find an example with an N64 controller by going here.