From my own trials I have found the retroarch auto config to be hit and miss. If I start hot swapping controllers with retroarch open I tend to freeze the system.
If you run jstest with both controllers? jstest /dev/input/js0 then try js1
If you have enough USB ports, try having everything plugged in plus a keyboard. when you start up a rom press F1 to go into the gui and go into the inputs/controller section. See what controller driver is being loaded. (sorry I can’t remember the exact sub menu)