Xbox Gamepad not working with the Device Source Manager on linux

Hi,

I’m working since few years on a project, all the input stack is with the Device Source Manager,

But since few month I decided to migrate on Linux… aannd the Device Source Manager stop to recognize my Xbox Controller as Xbox Controller, but as Generic device instead.

Edit : It’s an Xbox Series Controller, but behavior is the same with One Controller.

I installed xpadneo drivers and web based gamepad tester (like https://hardwaretester.com/gamepad ) seams to recognize my controller as Xbox Controller and all inputs works perfectly.

I saw the GamepadManager in the documendation, and it seams to work but it’s quite different of the DSM, and in my case de DSM seams more relevant (it’s a sort of web based VJ software, and I can use mouse/keyboard/midi/gamepad on a same session)

So I don’t really know if it’s a bug or a known incompatibility with linux based System. I can rewrite my code with the GamepadManager, but i’d like to understand more why this 2 systems coexists and if there are solution with DSM on linux before starting to rewrite things ahah

  • Problem can be reproduce on the DSM exemple : https://playground.babylonjs.com/#Y4YWCD#1 on Chromium (the controller works only partially on Firefox based browsers)
  • Babylon version 6.45.1, but tried to upgrade with 9.9.1 and same, I rolled back because audio engine breaking change, need to dig this later
  • My system : Arch with xpadneo drivers

Update :

I also test with

  • an old X360 controller and it works on chromium and partially on Firefox (inputs are wrong, but gamepad is detected as Xbox controller by the DSM)
  • With SISR (Steam Input System Redirector) which emulate Steam Inputs as x360 controller, but it’s detected as generic by the DSM

Thank you for your help !

Hello, I use EndeavourOS (Arch-based) as my main system for Babylon.js development. I’ll see if I can find an Xbox controller (I think I still have an older controller lying around) to test this behavior on my setup.

If the test works and I can reproduce it, I’ll come back here with the results.

Little update, I forgot to say I tried with an Xbox Series Controller (so Bluetooth only)

I just tried with an Xbox One Controller (Wired and Bluetooth) same problem

BUT I also tried with an old 360 controller aaaand it works !

Still interested to dig this subject, but this could be a viable workaround for this case

Oh, Since the controller I have is an older Xbox 360 controller, I guess there’s probably no need for me to test it.

cc @amoebachant as this is input related

Hi @IchbinRob — thanks for the detailed report and for testing several controllers, that’s really helpful.

I have a working hypothesis but no Linux + Xbox setup on hand to confirm. To verify before I land a fix, could you run this small playground and paste the output back here?

Playground: https://playground.babylonjs.com/#QCNW9W#3

What to do:

  1. Open the link in Chromium (same browser where the issue reproduces).
  2. For each controller in turn, connect it, press any button so the browser registers it, then click Copy to clipboard and paste the result here.

My current suspicion: on Linux/xpadneo, Chromium reports newer Xbox controllers with an id like "045e-0b13-Xbox Wireless Controller". The DSM detection only looks for the substrings "Xbox One", "Xbox 360", or "xinput", so anything else falls through to Generic. The older GamepadManager additionally checks for Microsoft’s vendor id "045e", which is why that one works. Seeing your actual id strings will let me make sure the fix covers all your controllers.

Thanks!

Hi @amoebachant , Thank you for your answer

Datas from your playground :

Xbox Series/One Wireless :

Index:       2
DSM type:    (not recognized by DSM yet — press a button)
Raw id:      "Xbox Wireless Controller (STANDARD GAMEPAD Vendor: 045e Product: 0b13)"
Buttons:     18
Axes:        4
Mapping:     standard

---
Xbox One Wired

Index:       3
DSM type:    (not recognized by DSM yet — press a button)
Raw id:      "Microsoft Controller (STANDARD GAMEPAD Vendor: 045e Product: 02ea)"
Buttons:     17
Axes:        4
Mapping:     standard

Xbox Elite Series V2 Wired

Index:       0
DSM type:    (not recognized by DSM yet — press a button)
Raw id:      "Microsoft Controller (STANDARD GAMEPAD Vendor: 045e Product: 0b00)"
Buttons:     17
Axes:        4
Mapping:     standard

Xbox Elite Series V2 Wireless

Index:       0
DSM type:    (not recognized by DSM yet — press a button)
Raw id:      "Xbox Elite Wireless Controller (STANDARD GAMEPAD Vendor: 045e Product: 028e)"
Buttons:     17
Axes:        4
Mapping:     standard

---
8BitDo SN30pro

Index:       0
DSM type:    (not recognized by DSM yet — press a button)
Raw id:      "Microsoft X-Box 360 pad (STANDARD GAMEPAD Vendor: 045e Product: 028e)"
Buttons:     17
Axes:        4
Mapping:     standard

---
Steam Controller 2 (Gamepad Layout)

Index:       1
DSM type:    (not recognized by DSM yet — press a button)
Raw id:      "Microsoft X-Box 360 pad 1 (STANDARD GAMEPAD Vendor: 28de Product: 11ff)"
Buttons:     17
Axes:        4
Mapping:     standard

Controller Recognized by DSM :


Dualshock 4

Index:       0
DSM type:    DualShock
Raw id:      "054c-09cc-Sony Interactive Entertainment Wireless Controller"
Buttons:     17
Axes:        6
Mapping:     standard

DualSense

Index:       0
DSM type:    DualSense
Raw id:      "054c-0ce6-Sony Interactive Entertainment DualSense Wireless Controller"
Buttons:     17
Axes:        4
Mapping:     standard

PS VR2 Controller

Index:       0
DSM type:    DualShock
Raw id:      "054c-0e46-Sony Interactive Entertainment PlayStation VR2 Sense Controller (R)"
Buttons:     24
Axes:        4
Mapping:     standard

Index:       0
DSM type:    DualShock
Raw id:      "054c-0e45-Sony Interactive Entertainment PlayStation VR2 Sense Controller (L)"
Buttons:     24
Axes:        4
Mapping:     standard

Switch 2 Pro

Index:       1
DSM type:    Switch
Raw id:      "057e-2069-Nintendo Switch 2 Pro Controller"
Buttons:     25
Axes:        5
Mapping:     standard

---
Xbox 360 Wireless

Index:       1
DSM type:    Xbox
Raw id:      "045e-02a1-Xbox 360 Wireless Receiver"
Buttons:     17
Axes:        6
Mapping:     standard

Id format depends on browser but data is basically the same

xpadneo doesn’t modify id, only system level compatibility

DualSense, PSVR2, and Xbox Elite data came from other people on linux I asked for additional test

Thanks @IchbinRob, that data was exactly what I needed.

Hypothesis confirmed — and your testing widened it usefully. None of your Xbox controllers contain the substrings DSM checks for ("Xbox One", "Xbox 360", or "xinput"), but all of them carry the Microsoft vendor id "045e" in the id string. That’'s the additional check the older GamepadManager has had for years, which is why that path works for you. DSM was simply missing it.

I’'ve put up a fix that brings DSM into parity: [DeviceInput] Fix: DSM detects modern Xbox controllers on Linux as Generic by AmoebaChant · Pull Request #18514 · BabylonJS/Babylon.js · GitHub. Once it lands you should see Xbox Series, Xbox One (wired & wireless), and both Xbox Elite V2 variants come through as DeviceType.Xbox. The 8BitDo SN30pro will too (its id also includes 045e).

One controller that won’‘t be fixed by this change: the Steam Controller 2 reports vendor 28de (Valve) while pretending to be an X-Box 360 pad. That’'s a separate niche case — happy to look at it in a follow-up if it matters for your project.

Sorry about one rough edge in the diagnostic playground: it printed “(not recognized by DSM yet — press a button)” even for controllers DSM did register as Generic — my mistake in the inspector code, not real data. The raw id strings you sent are what we needed and they were spot on.

Thanks again for the thorough testing!