protonscr

8BitDo 8BitDo Pro 2 wired

steamopen General controller / Steam Input
ValveSoftware/steam-for-linux#8772 · opened 2022-09-03 by PietJanHein · updated 2022-10-06 · 2 comments · github
PPietJanHein 2022-09-03 github

Your system information

  • Steam client version (build number or date): 1.0.0.74-1
  • Distribution (e.g. Ubuntu): Arch
  • Opted into Steam client beta?: Yes
  • Have you checked for system updates?: Yes

Please describe your issue in as much detail as possible:

Describe what you expected should happen and what did happen. Please link any large code pastes as a Github Gist

I bought an 8BitDo Pro 2 wired controller. Note that this is NOT the same hardware as the 8BitDo Pro 2 BlueTooth version and that both behave differently, I can tell because of the config-files from the RetroArch developers: https://github.com/libretro/retroarch-joypad-autoconfig/blob/master/udev/8BitDo_Pro2_BT_X.cfg
This is the BT-version and it maps differently from the wired version. Both 8BitDo Pro 2 BT and 8BitDo Pro 2 wired are named 8BitDo Pro 2, for this reason - to avoid confusion - I will use the name which is listed by the Linux-kernel: 8BitDo 8BitDo Pro 2. In this post I link to a few screenshots, I will also attach those as image-files, to make sure that those stay available and to make it convenient for the reader to view those however he/she prefers.

This controller comes with a few modes, one of the modes in which you can turn it on is the generic gamepad mode, you get that by holding the B-button while plugging in the USB-connector of the controller.

When I run jstest /dev/input/js0 or I use the website https://gamepad-tester.com/ I get a proper mapping, maybe with 2 exceptions (L2 and R2?):

  • every button-press gets detected except for two buttons (mode-select and the star-button) which are irrelevant for control in a game (profile-selection and the star-button)
  • the two sticks get mapped to 4 axes going from 0 to -32767 in one direction (for example center to left on the left stick maps from 0 to -32767 on axis 0) and from 0 to 32767 in the other direction (for example center to right on the left stick maps from 0 to 32767 on axis 0) (on the website https://gamepad-tester.com/ it goes up to 1 but same story otherwise, same buttons and axes visible)
  • the two 'analogue' triggers on the back, L2 and R2, get axes which go from -32767 to 32767 (axis 4 for R2 and Axis 5 for L2) , however, when I hit those trigger-buttons it ALSO detects buttons 8 (for L2) and 9 (for R2) being pressed together with the axes 4 (for R2) and 5 (for L2). Here a link to a screenshot of one of those: https://snipboard.io/UJiqf1.jpg Given that this is the first controller which I use on a PC I don't know if that is normal behavior.

The problem! When I want to use my controller for any game the mapping is not correct. The L2 and R2 buttons on the back get mapped to a part of the right stick of the controller and when I press L2 or R2 there is no input detected at all. I will give one concrete example: with the default controller-mapping in Hollow Knight the super-dash move (also being called crystal dash) gets activated when I move the right stick in between left and center position and the regular dash move gets activated when I move the right stick in between the top and center posititon, these actions are supposed to be done when you hit the L2 and R2 triggers. When I try to map the L2 and R2 triggers in the menu of Hollow Knight it won't even detect L2 or R2 getting pressed.

When I open the controller calibration (https://snipboard.io/pR6VFQ.jpg) from the settings menu of Steam it won't detect when I move the right stick on the vertical axis, it will detect correctly when I move the right stick on the horizontal axis. However, I can set a profile and I will show the result in the screenshots on the following webpages:
https://snipboard.io/sFxBTH.jpg
https://snipboard.io/xuPB5m.jpg

But when I start a game, like Hollow Knight or Dirt4, it won't detect the L2, R2 and right stick correctly.
This is not just a problem with Steam, in other games the inputs are not correct either. But maybe Valve can fix it for Steam or somebody can provide a system-wide solution.

To help other people with debugging I will give a bit more information:

  • In Supertuxkart for the right stick it thinks that for the right stick left is axis 2, up is axis 3, right is "left trigger" and bottom "right trigger" (yes, that contradicts my earlier statement about what happens in Hollow Knight but that is the data which I get). The other buttons and the left stick do get recognized correctly.
  • There is a SDL2-mapping tool which you can find here https://generalarcade.com/gamepadtool
    This tool does not give correct mapping either: it won't detect the right stick and L2 and R2 when I try to set a custom mapping. It raises the question for me if this might be a SDL2-related problem. It seems that SDL2 interprets the mapping incorreclty?

Steps for reproducing this issue:

  1. Plug in the USB-connector of the 8BitDo 8BitDo Pro 2 controller WHILE holding the B-button
  2. Set the controller settings on Steam on "Disable Steam Input" or "Use default settings" , both give the same result.
  3. Try to map the controls for the right stick (y-axis) and the L2 and R2 triggers in games, for example (two games for which I tried it out) Dirt4 or Hollow Knight.

L2-trigger
R2-trigger
steam-calibration
Steam_set_layout1
Steam_set_layout2

Kkisak-valve maintainer 2022-09-03 github

Hello @PietJanHein, if SDL2 is mis-mapping the controller's input without Steam involved, then that's a better starting point and should be evaluated upstream at SDL's issue tracker.

Ffabiscafe 2022-10-06 github

@PietJanHein could you try again in steam with setting the controller up as "generic" controller, not "X Box". This did the trick for me, at least in steam with steam-input.

See https://codeberg.org/fabiscafe/game-devices-udev/issues/2#issuecomment-634142

We still have problems in steam, not remembering/saving the configuration and that the triggers do push additional buttons who are not available otherwise and yes, I have to agree with @kisak-valve - this should be done upstream

Nothing extracted yet.