-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xbox One Gamepad Incorrect Mapping on Linux using xone driver #65308
Comments
I wonder if a different mapping is needed when using xone: https://github.com/gabomdq/SDL_GameControllerDB If this is the case, you can force the use of a custom mapping: https://docs.godotengine.org/en/stable/tutorials/inputs/controllers_gamepads_joysticks.html#my-controller-has-incorrectly-mapped-buttons-or-axes |
My controller is a Xbox One S, not sure if that is relevant, but I noticed the GUID is inside the SDL database on that link you posted. I also verified with gamepadtool that the mapping for my controller is as I would expect and working. However, with Godot, I need to do this to get it to work (copy and pasted from the SDL github):
Is this a SDL issue or Godot issue? I can make a new bug report to get the database updated, if that is needed. |
Godot doesn't use SDL – it only reuses the community-sourced controller database I linked. Still, you can open a pull request to update the database on https://github.com/gabomdq/SDL_GameControllerDB. |
Okay, I submitted the PR here. Thanks. |
The bug is still present in Godot 3.5.1 although you were cherry picking the relevant commit. Something went wrong I suppose. |
Does using the mapping override as described in #65308 (comment) resolve the issue? |
It seems to be working for me, but it's dependent on the specific controller you have, your OS, and the driver in use. These were the mappings direct from SDL, so it's possible you have a model that was not included in their list. Do you know which one you have? |
According to lsusb I use: I am on Arch Linux Kernel 6.0.1 and I am also using the xone driver using xone-dkms. Our setup seem to be similar. |
I tested it with various values and did not manage to change anything at all |
So download this app: https://generalarcade.com/gamepadtool/ Select your controller from the top drop down menu. Then click "Copy Gamepad GUID". Do a search find for that id on this page: https://github.com/gabomdq/SDL_GameControllerDB/blob/master/gamecontrollerdb.txt If it comes up, then it's supported by SDL and we can make it work (this database is constantly updated and is new as of 2 days ago). If it doesn't come up, then I don't know. That is strange. You would need to add it or figure out the mapping manually. But it's possible they added it to SDL recently (in the time since this PR was merged) in which case we can just update again. |
The GUID of the Gamepad, according to gamepadtool, is It is not in the list 😨 weirdly enough since this gamepad is already some years old. I createad a mapping string with gamepadtool: Setting this to the variable mentioned using
Does not alter the behavior inside the engine. The error is still present although the mapping string should be correct... Dunno where to continue from here. |
What is the problem exactly you are having in Godot? |
The same as you have had in the original post:
|
You can try the config I posted in this comment and just replace the guid. #65308 (comment) However it's strange that it's not in the SDL list. But there are like 100 different devices of the same Xbox controller. |
Out of pure frustration I booted Windows to update the firmware of my Gamepad. Apparently, the Firmware version is a part of the GUID. Now, gamepadtool detects the Controller as: The "new" GUID is also not in the list. I have no idea how these IDs are working... I suppose However, the axis configuration now works as intended in Godot in combination with xone 🎉 |
Yes, it's confusing. My gamepad was working previously on an old firmware, then I updated (cause I needed to use the newer dongle) and it stopped working in Godot (Steam games still worked). Not really sure what's going on but I'm glad to hear it's resolved. |
I'm having the same issue. I updated the controller to latest firmware. |
Hi -- I can confirm the issue still exists. Setting the $SDL_GAMECONTROLLERCONFIG env variable does not fix the issue. For developers out there, you can make your own game behave properly with the following autoload:
where the variable is the mapping string. Unfortunately, this doesn't work when playing other people's Godot projects, of course. |
This issue persists. I've bounced off Godot the past year or so because of it. I have tried three updated firmware versions on a Microsoft X-Box One Elite 2 pad and still it has the incorrect mappings in Godot. I'm on Linux and have the same results both with and without xone-dkms installed. Trying to work around that with autoloads and self-made controller config mappings has also made no difference, for whatever reason. It makes me wonder what's going on, because I'd expect a game engine such as this to support mainstream, commercially available controllers out of the box. In other games, the pad works fine. In an online test tool, the pad seems mapped correctly. What is so strange about these controllers that Godot cannot properly support them? Why might the workarounds mentioned here not be working for me? This seems like either a major weakness and oversight, or some kind of incompatibility, or incorrect configuring of my system. But I'm not sure what's going wrong. edit: My "workaround" for now is to launch Godot Engine through Steam, which correctly handles this pad. |
What is your mapping string? I'm curious how it compares to mine. I'll try making a pull request to SDL to see if that works? (Edit: for what it's worth, I ended up switching to |
I didn't keep it, but it was unreliable anyway. I could not figure out the recommended tools for making a mapping, so I used an outdated tool. But perhaps of interest, when launching Godot through Steam, it prints the mappings they're using a couple times:
Ah! This driver works. Fwiw, in looking into this for the past couple days, I've now seen a lot of threads about these issues. Seems like incomplete Linux drivers for newer Xbox controllers is common. And indeed- I'm glad there are options to work through it and remain productive. Thanks! |
Godot does not use SDL, it only uses SDL_GameControllerDB. @junelva #87925 will likely resolve the issue you're encountering. |
Godot version
v3.5.stable.official [991bb6a]
v4.0.alpha15.official [432b25d]
System information
Ubuntu 22.04, Xbox One Gamepad w/ Microsoft Wireless Receiver
Issue description
The input map for the Xbox One wireless controller (using the Microsoft official wireless adapter and xone driver) is incorrect on Godot 3.5 / 4.0 Alpha 15 and Ubuntu 22.04 Linux.
https://github.com/medusalix/xone
For example, pressing the left trigger is detected as the right analog stick. You can see the image from Godot 4.0, where I have pressed the Right stick left/right, but it is shown as Right stick up/down (but in actuality, the real physical button is the Left trigger).
The gamepad is correctly detected and mapped normally on this site, Steam games also work fine:
https://gamepad-tester.com/
Though the xpadneo driver did work previously (at least with Godot 3.4), it doesn't properly support the new Microsoft wireless dongle or the newer firmware for the controller (which I already updated to). Also, I have many wireless devices, and I cannot use Bluetooth due to interference. Wired also does not work with the xone driver, so the issue does not appear to be related to wireless. The bug is specific to using the Xbox gamepad with the xone driver via the MS dongle.
Steps to reproduce
Uninstall any other Xbox drivers you have on Linux and install this one:
https://github.com/medusalix/xone
Use any standard Xbox One gamepad controller and the newer model of the Microsoft wireless dongle.
https://www.amazon.com/Microsoft-Xbox-Wireless-Adapter-Windows-one/dp/B00ZB7W4QU
Load up Godot 3.5 or 4.0 Alpha 15 and set mappings for Right Analog Left and Right Analog Right to the name "left" and "right".
See that they don't work when printing the axis from the project.
Minimal reproduction project
XboxMap.zip
The text was updated successfully, but these errors were encountered: