Different controllers using the same configuration file
-
Please give more details about your system as requested in https://retropie.org.uk/forum/topic/3/read-this-first.
-
Pi Model or other hardware: 3B+
Power Supply used: Official powersupply 2.5A/5V
RetroPie Version Used: 4.4.2
Built From: Pre made SD Image on RetroPie website, retropie-4.4-rpi2_rpi3.img
USB Devices connected: Usb memory, 1 usb hub, 4 usb controllers$ lsusb Bus 001 Device 006: ID 0781:5581 SanDisk Corp. Ultra Bus 001 Device 009: ID 0810:e501 Personal Communication Systems, Inc. Bus 001 Device 007: ID 0079:0011 DragonRise Inc. Gamepad Bus 001 Device 004: ID 1a40:0101 Terminus Technology Inc. Hub Bus 001 Device 008: ID 0810:0003 Personal Communication Systems, Inc. PlayStation Gamepad Bus 001 Device 005: ID 0f0d:00dc Hori Co., Ltd Bus 001 Device 010: ID 0424:7800 Standard Microsystems Corp. Bus 001 Device 003: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Controller used: Generic usb nes, dragonrise usb snes, PS2 with usb converter, Hori GC controller for switch
Error messages received: ---
File:/opt/retropie/configs/all/retroarch/autoconfig/USB Gamepad .cfg
How to replicate the problem:1. Plug in Usb snes controller which is identified as "USB Gamepad " 2. Plug in PS2 controller via usb adapter which is identified as "USB Gamepad " 3. Configure Usb snes controller via ES controller config 4. Verify Snes controller works 5. Configure PS2 controller via ES controller config 6a. Verify PS2 controller works 6b. Snes controller now has broken mapping since PS2 settings overwrites the config file since they use the same. (Path mentioned above) 7. Configure Snes controller. 8a. Verify Snes controller works 8b. PS2 controller is now broken.
-
I see, your initial post listed
Dragonrise
andPersonal...
and I didn't understand why you got the same config. You can separate the 2 config files and give them different names (once you configure one in Emulationstation). I think the name does not matter as long as they have different USB identifiers (ModelID/VendorID) and they're properly named and identified in the.cfg
file. Give it a try. -
Doesn't seem to work. :/ They work in ES but not in a rom. I guess it could be that the A and B buttons just happens to match whatever is loaded so it doesn't really mean anything.
pi@retropie:/opt/retropie/configs/all/retroarch-joypads $ cat SnesGamepad.cfg input_device = "USB Gamepad " input_driver = "udev" input_vendor_id = 79 input_product_id = 11 input_l_btn = "4" ... input_menu_toggle_btn = "1" pi@retropie:/opt/retropie/configs/all/retroarch-joypads $ cat Playstation2Gamepad.cfg input_device = "USB Gamepad " input_driver = "udev" input_vendor_id = 810 input_product_id = 3 input_r_y_plus_axis = "+2" ... input_r_x_plus_axis = "+3"
-
Can you try running a game with verbose logging through the Runcommand and then check
/dev/shm/runcommand.log
to see how the gamepads are detected ? -
https://pastebin.com/6H2X79gi
I looks like it is detected.I also noticed that when I reconfigure one of the controllers it moves the vendorid deviceid configs to a .cfg.bak file. So at least it has found the files.
-
I think I solved it, I will post an update with the steps later when I have verified so that others that run into the same problem can fix it.
-
The snes controller works fine but the PS2 does not.
The problem seems to be that is loads the snes config for both of the controllers.[INFO] [udev]: Plugged pad: Generic X-Box pad (3853:220) on port #0. [INFO] [udev]: Pad #0 (/dev/input/event2) supports force feedback. [INFO] [udev]: Pad #0 (/dev/input/event2) supports 16 force feedback effects. [INFO] [Autoconf]: 4 profiles found. [INFO] [autoconf]: selected configuration: /home/pi/.config/retroarch/autoconfig/Generic X-Box pad.cfg [INFO] [udev]: Plugged pad: USB Gamepad (2064:3) on port #1. [INFO] [udev]: Pad #1 (/dev/input/event0) supports 0 force feedback effects. [INFO] [Autoconf]: 4 profiles found. [INFO] [autoconf]: selected configuration: /home/pi/.config/retroarch/autoconfig/SnesGamepad.cfg [INFO] [udev]: Plugged pad: USB Gamepad (121:17) on port #2. [INFO] [udev]: Pad #2 (/dev/input/event3) supports 0 force feedback effects. [INFO] [Autoconf]: 4 profiles found. [INFO] [autoconf]: selected configuration: /home/pi/.config/retroarch/autoconfig/SnesGamepad.cfg [INFO] [udev]: Plugged pad: usb gamepad (2064:58625) on port #3. [INFO] [udev]: Pad #3 (/dev/input/event1) supports 0 force feedback effects. [INFO] [Autoconf]: 4 profiles found. [INFO] [autoconf]: selected configuration: /home/pi/.config/retroarch/autoconfig/Playstation2Gamepad.cfg
The model_id and vendor_id seems to be different than shown on lsusb as well.
-
The log shows the PS2 profile being picked for one of the gamepads though:
[INFO] [udev]: Plugged pad: usb gamepad (2064:58625) on port #3. [INFO] [udev]: Pad #3 (/dev/input/event1) supports 0 force feedback effects. [INFO] [Autoconf]: 4 profiles found. [INFO] [autoconf]: selected configuration: /home/pi/.config/retroarch/autoconfig/Playstation2Gamepad.cfg
The VID:PID in the
.cfg
files have been generated by the ES input configuration or you added them yourself ? -
When launching snes it looks like this:
[INFO] [udev]: Plugged pad: Generic X-Box pad (3853:220) on port #0. [INFO] [udev]: Pad #0 (/dev/input/event2) supports force feedback. [INFO] [udev]: Pad #0 (/dev/input/event2) supports 16 force feedback effects. [INFO] [Autoconf]: 4 profiles found. [INFO] [autoconf]: selected configuration: /home/pi/.config/retroarch/autoconfig/Generic X-Box pad.cfg [INFO] [udev]: Plugged pad: USB Gamepad (2064:3) on port #1. [INFO] [udev]: Pad #1 (/dev/input/event0) supports 0 force feedback effects. [INFO] [Autoconf]: 4 profiles found. [INFO] [autoconf]: selected configuration: /home/pi/.config/retroarch/autoconfig/SnesGamepad.cfg [INFO] [udev]: Plugged pad: USB Gamepad (121:17) on port #2. [INFO] [udev]: Pad #2 (/dev/input/event3) supports 0 force feedback effects. [INFO] [Autoconf]: 4 profiles found. [INFO] [autoconf]: selected configuration: /home/pi/.config/retroarch/autoconfig/SnesGamepad.cfg [INFO] [udev]: Plugged pad: usb gamepad (2064:58625) on port #3. [INFO] [udev]: Pad #3 (/dev/input/event1) supports 0 force feedback effects. [INFO] [Autoconf]: 4 profiles found. [INFO] [autoconf]: selected configuration: /home/pi/.config/retroarch/autoconfig/usb gamepad .cfg
And the previous one you commented on is when running psx emulator.
I have configured the order of the pads in the setup script
config/tools->configedit->config basic->snes/psx
. There it shows that the PS2 controller is pad#1 and that snes is pad#2. Pad #3 is my generic nes controller.
So for some reason it loads the PS2 config for the wrong pad on psx and double snes config on snes.Edit: I added the ids myself
-
@mitu said in Different controllers using the same configuration file:
The VID:PID in the
.cfg
files have been generated by the ES input configuration or you added them yourself ?the autoconfiguration doesn't handle devices with the same name, nor the vid/pid - those have to be done manually.
-
An other strange thing is that they seem to work fine in ES. They only load incorrect config when starting emulation.
-
I found a solution.
Not the prettiest one, but it works.
Since the vid:pid was not enough to identify the controllers I found that you can also useinput_device_display_name
to identify a controller.
As it happens it does not work for my PS2 controller but it works for the Snes controller. Thus I configured the Snes controller with the display name and use the default options to match the PS2 controller.I hope that makes sense in case someone runs into the same problem and finds this thread. :)
Thank you for the help mitu!
-
I thought that - taking into account what @buzz said, you could pick the VID:PID from the RetroArch output and configure them into the
.cfg
files instead of the ones generated by Emulationstation autoconfiguration. I was rather curious to see if that would work.
I'm glad you found a solution, maybe you'd care to experiment a little bit more to satisfy my curiousity :). -
I tried it and still, for some reason, it didn't work.
-
I had the same issue again with the RPi4.
I managed to solve it by using the VID:PID.
The tricky part was to identify which of the controllers had which pid in the retroarch menu since both are identified as USB Controller. This is not the same vid:pid shown by lsusb(!).
Then I put the pid:vid at the top of the config files.
So I tried one way and it didn't work, so I tried the other and now both controllers work.Note to myself:
PS2 controller hasinput_vendor_id = 2064 input_product_id = 3
SNES controller has
input_vendor_id = 121 input_product_id = 17
-
@langest said in Different controllers using the same configuration file:
This is not the same vid:pid shown by lsusb(!).
They kind of are, since
lsusb
shows the hex (base 16) values:0079:11 (base 16) = 121:17 (base 10)
810:3 (base 16) = 2064:3 (base 10)Ref: http://www.binaryhexconverter.com/hex-to-decimal-converter.
-
Alright, I see. But how can you tell if you don't know? The numbers are not prefixed with 0x and the man page doesn't give you any hints.
-
I'm having the same issue,
i have 4 controllers, 2 nes(clone)(usb), 2 genesis(8bitdo)(usb wifi dongle).
they share the same name,"USB Gamepad ", vendor 0079, product 0011.
They both use "USB Gamepad .cfg"
I've been trying to get around this for a while now.(8bitdo m30 2.4g)
cat /proc/bus/input/devices
I: Bus=0003 Vendor=0079 Product=0011 Version=0110
N: Name="USB Gamepad "
P: Phys=usb-0000:01:00.0-1.4.3/input0
S: Sysfs=/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4.3/1-1.4.3:1.0/0003:0079:0011.0003/input/input2
U: Uniq=
H: Handlers=js1 event1
B: PROP=0
B: EV=1b
B: KEY=3ff 0 0 0 0 0 0 0 0 0
B: ABS=3
B: MSC=10(generic usb nes controller clone)
I: Bus=0003 Vendor=0079 Product=0011 Version=0110
N: Name="USB Gamepad "
P: Phys=usb-0000:01:00.0-1.4.4/input0
S: Sysfs=/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4.4/1-1.4.4:1.0/0003:0079:0011.0005/input/input4
U: Uniq=
H: Handlers=js2 event2
B: PROP=0
B: EV=1b
B: KEY=3ff 0 0 0 0 0 0 0 0 0
B: ABS=3
B: MSC=10(8bitdo m30 2.4g)
udevadm info -q all -n /dev/input/event[1]
P: /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4.3/1-1.4.3:1.0/0003:0079:0011.0003/input/input2/event1
N: input/event1
L: 0
S: input/by-id/usb-0079_USB_Gamepad-event-joystick
S: input/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.4.3:1.0-event-joystick
E: DEVPATH=/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4.3/1-1.4.3:1.0/0003:0079:0011.0003/input/input2/event1
E: DEVNAME=/dev/input/event1
E: MAJOR=13
E: MINOR=65
E: SUBSYSTEM=input
E: USEC_INITIALIZED=5712528
E: ID_INPUT=1
E: ID_INPUT_JOYSTICK=1
E: ID_VENDOR=0079
E: ID_VENDOR_ENC=0079
E: ID_VENDOR_ID=0079
E: ID_MODEL=USB_Gamepad
E: ID_MODEL_ENC=USB\x20Gamepad\x20
E: ID_MODEL_ID=0011
E: ID_REVISION=0105
E: ID_SERIAL=0079_USB_Gamepad
E: ID_TYPE=hid
E: ID_BUS=usb
E: ID_USB_INTERFACES=:030000:
E: ID_USB_INTERFACE_NUM=00
E: ID_USB_DRIVER=usbhid
E: ID_PATH=platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.4.3:1.0
E: ID_PATH_TAG=platform-fd500000_pcie-pci-0000_01_00_0-usb-0_1_4_3_1_0
E: ID_FOR_SEAT=input-platform-fd500000_pcie-pci-0000_01_00_0-usb-0_1_4_3_1_0
E: LIBINPUT_DEVICE_GROUP=3/79/11:usb-0000:01:00.0-1.4
E: DEVLINKS=/dev/input/by-id/usb-0079_USB_Gamepad-event-joystick /dev/input/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.4.3:1.0-event-joystick
E: TAGS=:uaccess:seat:(generic usb nes controller clone)
udevadm info -q all -n /dev/input/event[2]
P: /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4.4/1-1.4.4:1.0/0003:0079:0011.0005/input/input4/event2
N: input/event2
L: 0
S: input/by-id/usb-0079_USB_Gamepad-event-joystick
S: input/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.4.4:1.0-event-joystick
E: DEVPATH=/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4.4/1-1.4.4:1.0/0003:0079:0011.0005/input/input4/event2
E: DEVNAME=/dev/input/event2
E: MAJOR=13
E: MINOR=66
E: SUBSYSTEM=input
E: USEC_INITIALIZED=93696483560
E: ID_INPUT=1
E: ID_INPUT_JOYSTICK=1
E: ID_VENDOR=0079
E: ID_VENDOR_ENC=0079
E: ID_VENDOR_ID=0079
E: ID_MODEL=USB_Gamepad
E: ID_MODEL_ENC=USB\x20Gamepad\x20
E: ID_MODEL_ID=0011
E: ID_REVISION=0106
E: ID_SERIAL=0079_USB_Gamepad
E: ID_TYPE=hid
E: ID_BUS=usb
E: ID_USB_INTERFACES=:030000:
E: ID_USB_INTERFACE_NUM=00
E: ID_USB_DRIVER=usbhid
E: ID_PATH=platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.4.4:1.0
E: ID_PATH_TAG=platform-fd500000_pcie-pci-0000_01_00_0-usb-0_1_4_4_1_0
E: ID_FOR_SEAT=input-platform-fd500000_pcie-pci-0000_01_00_0-usb-0_1_4_4_1_0
E: LIBINPUT_DEVICE_GROUP=3/79/11:usb-0000:01:00.0-1.4
E: DEVLINKS=/dev/input/by-id/usb-0079_USB_Gamepad-event-joystick /dev/input/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.4.4:1.0-event-joystick
E: TAGS=:seat:uaccess:
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.