D-Input vs X-Input on 8Bitdo controllers
-
I've been using D-Input for years because that was just the default mode that 8Bitdo ships their controllers in. There's never been any official guidance about which mode we should use with Retropie, so I just stuck with it.
I decided today to try out X-Input because D-Input doesn't support rumble.
Well I switched to X-Input and rumble works great, but Emulation Station doesn't recognize the L2/R2 buttons at all.
Hardware: Raspberry Pi 4, running the latest (as of today) Retropie.
Joypad: 8Bitdo SN30 Pro, running the latest (as of today) firmware. Using it over Bluetooth.Previous posts about this made it sound like all you had to do to fix this is update the xpad driver. I un/reinstalled xpad and there was no change.
For now I'm back to D-Input. But has anyone figured out how to make this work?
-
Thanks to info in this thread I was able to edit:
/opt/retropie/configs/all/retroarch-joypads/[name of my controller].cfg
I then added these two lines to the end of the file:
input_l2_axis = "+2" input_r2_axis = "+5"
That makes L2 and R2 work in emulators.
However...I'm helping out a not-so-computer-literate friend who I'm sure will manage to overwrite this setting at some point in the future by using Emulation Station's button configurator. I'd still prefer to do this in a less-hacky way if there is one.
-
@bmn001 said in D-Input vs X-Input on 8Bitdo controllers:
Previous posts about this made it sound like all you had to do to fix this is update the xpad driver. I un/reinstalled xpad and there was no change.
xpad
only works for wired Xbox controllers, try installingxpadneo
and re-pair the controller, then re-configure it in EmulationStation.I'm helping out a not-so-computer-literate friend who I'm sure will manage to overwrite this setting at some point in the future by using Emulation Station's button configurator.
You can disable the auto-configuration of the controller from the
Configuration
section in RetroPie-Setup, under theemulationstation
menu. -
@mitu said in D-Input vs X-Input on 8Bitdo controllers:
xpad
only works for wired Xbox controllers, try installingxpadneo
and re-pair the controller, then re-configure it in EmulationStation.Removed my Bluetooth device.
Removed the previous udev rules after reading this
Installed xpadneo.
Uninstalled xpad just in case.
Rebooted.
Paired controller.
Tried to configure buttons in ES and...no change. The L2/R2 buttons are not recognized.jstest does see the trigger presses. Just Emulation Station will not.
Is there a way for me to confirm that xpadneo is actually being used by this controller?
-
@bmn001 said in D-Input vs X-Input on 8Bitdo controllers:
Is there a way for me to confirm that xpadneo is actually being used by this controller?
Disconnect the controller, then run - from the terminal:
dmesg -w
Connect the controller again and see if the
xpadneo
driver takes over the connection. PressCtrl+C
to stopdmesg
and go back to the terminal. -
@mitu Yeah that output is full of xpadneo messages referencing my gamepad. So I guess the driver is in use at least.
Jstest does show the two triggers as axis, not buttons, if that makes a difference.
-
@bmn001 said in D-Input vs X-Input on 8Bitdo controllers:
However...I'm helping out a not-so-computer-literate friend who I'm sure will manage to overwrite this setting at some point in the future by using Emulation Station's button configurator.
Just set Emulationstation to kiosk or kid mode after configuring. It will hide all the setup stuff.
-
@bmn001 said in D-Input vs X-Input on 8Bitdo controllers:
@mitu Yeah that output is full of xpadneo messages referencing my gamepad. So I guess the driver is in use at least.
Can you post the messages ? You can copy them by running the
dmesg
command over SSH.
The triggers being recognized as axis is ok and EmulationStation should be able to deal with them. -
@mitu Yep, here's a log. I start with the controller off, then power it on and this is the output I see as soon as it connects:
[34441.432303] xpadneo 0005:045E:02E0.000A: buggy firmware detected, please upgrade to the latest version [34441.432314] xpadneo 0005:045E:02E0.000A: pretending XB1S Windows wireless mode (changed PID from 0x02E0 to 0x028E) [34441.432322] xpadneo 0005:045E:02E0.000A: working around wrong SDL2 mappings (changed version from 0x00000903 to 0x00001130) [34441.432330] xpadneo 0005:045E:02E0.000A: report descriptor size: 307 bytes [34441.432338] xpadneo 0005:045E:02E0.000A: fixing up report descriptor size [34441.433222] xpadneo 0005:045E:02E0.000A: battery detected [34441.433230] xpadneo 0005:045E:02E0.000A: enabling compliance with Linux Gamepad Specification [34441.433327] input: 8Bitdo SN30 Pro as /devices/platform/soc/fe201000.serial/tty/ttyAMA0/hci0/hci0:11/0005:045E:02E0.000A/input/input23 [34441.446011] xpadneo 0005:045E:02E0.000A: input,hidraw2: BLUETOOTH HID v11.30 Gamepad [8Bitdo SN30 Pro] on d8:3a:dd:1c:dd:84 [34441.446027] xpadneo 0005:045E:02E0.000A: controller quirks: 0x00000027 [34442.106805] xpadneo 0005:045E:02E0.000A: 8Bitdo SN30 Pro [e4:17:d8:7a:f4:73] connected
I've noted the first line about "buggy firmware," but I'm already running the latest 8Bitdo firmware available (2.02) so I'm not sure what that's looking at.
-
Yeah, it looks like
xpadneo
takes over and applies some quirks to the controller, so it's clearly managed byxpadne
.Not sure why the L2/R2 buttons don't get mapped in ES, but you can start EmulationStation using the
debug
option and it should print what input is activated during the input configuration dialog (log is printed on console and also written in$HOME/.emulationstation/es_log.txt
).emulationstation --debug
-
@mitu The ES debug log seems to indicate that ES isn't seeing the triggers being pressed at all.
After "
Mapping [Button 5] -> RightShoulder
" when I was asked to press the left and right trigger buttons, I made sure to press L2 and R2 ten times each so they would be obvious in the log before I did a "hold button to skip" to move on.Instead, there's nothing in the log about triggers at all, and indeed the UI gave no indication that any button or trigger was being pressed at that time.
Jul 12 08:30:51 lvl2: Added known joystick '8Bitdo SN30 Pro' (instance ID: 0, device index: 0) Jul 12 08:30:51 lvl3: SystemView::getViewElements() Jul 12 08:30:58 lvl2: Configuring device 0 (8Bitdo SN30 Pro). Jul 12 08:31:00 lvl2: Mapping [Hat 0 up] -> Up Jul 12 08:31:00 lvl2: Mapping [Hat 0 down] -> Down Jul 12 08:31:01 lvl2: Mapping [Hat 0 left] -> Left Jul 12 08:31:02 lvl2: Mapping [Hat 0 right] -> Right Jul 12 08:31:02 lvl2: Mapping [Button 7] -> Start Jul 12 08:31:03 lvl2: Mapping [Button 6] -> Select Jul 12 08:31:03 lvl2: Mapping [Button 0] -> A Jul 12 08:31:04 lvl2: Mapping [Button 1] -> B Jul 12 08:31:05 lvl2: Mapping [Button 2] -> X Jul 12 08:31:05 lvl2: Mapping [Button 3] -> Y Jul 12 08:31:06 lvl2: Mapping [Button 4] -> LeftShoulder Jul 12 08:31:06 lvl2: Mapping [Button 5] -> RightShoulder Jul 12 08:31:18 lvl2: Mapping [Button 9] -> LeftThumb Jul 12 08:31:19 lvl2: Mapping [Button 10] -> RightThumb Jul 12 08:31:19 lvl2: Mapping [Axis 1-] -> LeftAnalogUp Jul 12 08:31:20 lvl2: Mapping [Axis 1+] -> LeftAnalogDown Jul 12 08:31:20 lvl2: Mapping [Axis 0-] -> LeftAnalogLeft Jul 12 08:31:21 lvl2: Mapping [Axis 0+] -> LeftAnalogRight Jul 12 08:31:22 lvl2: Mapping [Axis 4-] -> RightAnalogUp Jul 12 08:31:22 lvl2: Mapping [Axis 4+] -> RightAnalogDown Jul 12 08:31:23 lvl2: Mapping [Axis 3-] -> RightAnalogLeft Jul 12 08:31:23 lvl2: Mapping [Axis 3+] -> RightAnalogRight Jul 12 08:31:24 lvl2: Mapping [Button 6] -> HotKeyEnable Jul 12 08:31:24 lvl3: fireEvent: config-changed Jul 12 08:31:24 lvl3: fireEvent: controls-changed Jul 12 08:31:24 lvl2: /opt/retropie/supplementary/emulationstation/scripts/inputconfiguration.sh
Given that:
xpadneo
identifies and drives my controllerjstest
recognizes the triggers when pressed- The the triggers work within retroarch when I manually edit a config file
- I've seen identical behavior using both
xpad
andxpadneo
(so far)
...it's looking a lot like a possible bug in Emulation Station maybe?
I really do appreciate you taking the time to step through all this with me. Thank you.
-
@bmn001 said in D-Input vs X-Input on 8Bitdo controllers:
...it's looking a lot like a possible bug in Emulation Station maybe?
More likely with the SDL2 library used by EmulationStation underneath, which handles also the input. However, if things work with RetroArch, it's not a big deal, since L2/R2 are not really used by EmulationStation itself.
-
@mitu I have only a vague grasp of this, so please bear with me.
I just installed some random SDL2 controller testing tool from github. It needed
libsdl2-dev
installed to build. The version I used was "2.0.10+5rpi". That testing tool does correctly see the triggers.So I just pulled the latest Emulation Station from github and built it on the same machine (Ras Pi4). It still will not see the triggers.
-
@bmn001 said in D-Input vs X-Input on 8Bitdo controllers:
So I just pulled the latest Emulation Station from github and built it on the same machine (Ras Pi4). It still will not see the triggers.
What's the version of EmulationStation you have installed ?
-
@mitu Whew. It's getting weird now.
I just built the latest version of SDL2 from github.
cmake sees SDL2 as
2.29.0
now instead of the previous2.0.10
.So then I rebuilt Emulation Station.
The preinstalled Emulation Station was
v2.11.2rp
. The one I've built identifies as2.12.0rp-dev
.The good news:
- Emulation Station now recognizes my L2/R2 triggers!
The weird news:
- When I launch retroarch emulators, they do not recognize my L2/R2 trigger presses.
- While the bluetooth dialog still reports my controller name as "8Bitdo SN30 Pro" when I pair and connect it, this newly-built version of Emulation Station reports it as "Xbox 360 Controller".
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.