SDL icon indicating copy to clipboard operation
SDL copied to clipboard

Xbox Elite 2 Controller input issue via Bluetooth connetion

Open Flame-999 opened this issue 3 weeks ago • 8 comments

Hello everyone,

I would like to raise some attention to how the Elite 2 controller connected via bluetooth with latest firmware update has some mapping issues. With cable everything works as intended.

I'm on Nobara to begin with and using only their kernel driver.

The issue is that some buttons are not recognized or mixed if using default mapping.

This is my mapping with only those buttons mapped which are recognized.

050018dc5e040000220b000000006800,Xbox One Elite 2 Controller,crc:dc18,platform:Linux,a:b0,b:b1,y:b2,dpleft:h0.8,dpright:h0.2,dpup:h0.1,dpdown:h0.4,leftx:a0,lefty:a1,rightx:a2,righty:a3,leftshoulder:b3,lefttrigger:a4,righttrigger:a5,back:b9,start:b10,guide:b4,paddle1:b11,paddle2:b13,paddle3:b12,paddle4:b14,steam:2,

Buttons left out are x, left analog button, right analog button and right shoulder. These can't be set when manually mapping them trough Steam's controller setup.

This is my first time reporting an issue to a project. Let me know if you need any more information to determine where is the issue. My guess would be something Microsoft related, but would like to tinker to get it working.

Thank you.

Flame-999 avatar Dec 05 '25 08:12 Flame-999

I updated to the latest available firmware (5.23.6.0) and it's working fine here. What firmware version do you have?

slouken avatar Dec 05 '25 19:12 slouken

If I grab the SDL source code and run testcontroller, this is the output I see:

Using udev for HIDAPI joystick device discovery
Added HIDAPI device 'Xbox One Elite 2 Controller' VID 0x045e, PID 0x0b22, bluetooth 1, version 0, serial 98:7a:14:30:a6:b6, interface -1, interface_class 0, interface_subclass 0, interface_protocol 0, usage page 0x0001, usage 0x0005, path = /dev/hidraw7, driver = SDL_JOYSTICK_HIDAPI_XBOX_ONE (ENABLED)
Using udev for joystick device discovery
Gamepad 2 added
Opened gamepad Xbox One Elite 2 Controller, guid 050018dc5e040000220b000000006800, /dev/hidraw7
Rumble supported
Trigger rumble supported
Player index: 0
Mapping: 050018dc5e040000220b000000006800,*,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,paddle1:b11,paddle2:b13,paddle3:b12,paddle4:b14,crc:dc18,platform:Linux,

slouken avatar Dec 05 '25 19:12 slouken

I'm surprised the X button is left out, it's packed in with the other buttons so it's not like we're looking at the wrong part of the report for the button press... ?

slouken avatar Dec 05 '25 19:12 slouken

I'm using 5.23.6.0 as well.

I would like to use testcontroller from source, but I would need some help with that to get it working.

Here are some details that might answer something.

This is what I get as mapping if I use the default in Steam:

050018dc5e040000220b000000006800,*,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,paddle1:b11,paddle2:b13,paddle3:b12,paddle4:b14,crc:dc18,platform:Linux,

With this mapping where everything is left to the settings found in DB then my inputs are getting mixed.

Back = left shoulder button Start = right shoulder button left shoulder button = y right should button = nothing x = nothing y = x left and right analog button = nothing

That's why I was forced to do my own mapping but there I had to skip buttons which didn't respond at all.

Is there a way to see if there is any input made when pressing these unrecognized buttons to see where they go missing?

Flame-999 avatar Dec 05 '25 20:12 Flame-999

I'm using 5.23.6.0 as well.

I would like to use testcontroller from source, but I would need some help with that to get it working.

Here are some details that might answer something.

This is what I get as mapping if I use the default in Steam:

050018dc5e040000220b000000006800,*,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,paddle1:b11,paddle2:b13,paddle3:b12,paddle4:b14,crc:dc18,platform:Linux,

With this mapping where everything is left to the settings found in DB then my inputs are getting mixed.

Back = left shoulder button Start = right shoulder button left shoulder button = y right should button = nothing x = nothing y = x left and right analog button = nothing

That's why I was forced to do my own mapping but there I had to skip buttons which didn't respond at all.

Is there a way to see if there is any input made when pressing these unrecognized buttons to see where they go missing?

same problem here. any fix?

XcrysizZ avatar Dec 06 '25 05:12 XcrysizZ

Can you grab the SDL source and add #define DEBUG_XBOX_PROTOCOL to the top of src/joystick/hidapi/SDL_hidapi_xboxone.c and build and run testcontroller? You'll probably need to debug to see exactly what's going on.

slouken avatar Dec 07 '25 16:12 slouken

Cloned the repo, added the #define DEBUG_XBOX_PROTOCOL line in the SDL_hidapi_xboxone.c file.

I think I have successfully built the with cmake, and then ran make -j 8.

This is what I have in my build folder currently:

CMakeCache.txt CPackProjectConfig.cmake libSDL3.so.0 SDL3Config.cmake SDL3testTargets.cmake CMakeFiles CPackSourceConfig.cmake libSDL3.so.0.3.5 SDL3ConfigVersion.cmake wayland-generated-protocols cmake_install.cmake include-config-relwithdebinfo libSDL3_test.a SDL3headersTargets.cmake cmake_uninstall.cmake include-revision libSDL_uclibc.a sdl3.pc CPackConfig.cmake libSDL3.so Makefile SDL3sharedTargets.cmake

And here is where my current knowledge ends. Can't find out how to run testcontroller.

I'll need some guiding hand here to provide the debug information to see what's going wrong here.

Flame-999 avatar Dec 07 '25 20:12 Flame-999

Can you send me e-mail at [email protected] and we can coordinate a Zoom call to debug this?

slouken avatar Dec 07 '25 21:12 slouken

@Flame-999, this should be fixed now, can you update to the latest main code and see if it works for you?

slouken avatar Dec 10 '25 18:12 slouken

@slouken, have cloned the repo again. Built everything, but testcontroller yields the same results as before with mixed inputs.

something that's different now, controller is using this identifier. /dev/hidraw10

Maybe something on my end?

Flame-999 avatar Dec 10 '25 20:12 Flame-999

Hmm, that's really weird. Can you edit src/joystick/hidapi/SDL_report_descriptor.c and add #define DEBUG_DESCRIPTOR to the top and give us the output of testcontroller?

slouken avatar Dec 11 '25 05:12 slouken

@slouken Here you go:

Using udev for HIDAPI joystick device discovery
Xbox One report descriptor: size = 464
00:       0x05 0x01 0x09 0x05 0xa1 0x01 0x85 0x01
08:       0x09 0x01 0xa1 0x00 0x09 0x30 0x09 0x31
16:       0x15 0x00 0x27 0xff 0xff 0x00 0x00 0x95
24:       0x02 0x75 0x10 0x81 0x02 0xc0 0x09 0x01
32:       0xa1 0x00 0x09 0x33 0x09 0x34 0x15 0x00
40:       0x27 0xff 0xff 0x00 0x00 0x95 0x02 0x75
48:       0x10 0x81 0x02 0xc0 0x05 0x01 0x09 0x32
56:       0x15 0x00 0x26 0xff 0x03 0x95 0x01 0x75
64:       0x0a 0x81 0x02 0x15 0x00 0x25 0x00 0x75
72:       0x06 0x95 0x01 0x81 0x03 0x05 0x01 0x09
80:       0x35 0x15 0x00 0x26 0xff 0x03 0x95 0x01
88:       0x75 0x0a 0x81 0x02 0x15 0x00 0x25 0x00
96:       0x75 0x06 0x95 0x01 0x81 0x03 0x05 0x01
104:       0x09 0x39 0x15 0x01 0x25 0x08 0x35 0x00
112:       0x46 0x3b 0x01 0x66 0x14 0x00 0x75 0x04
120:       0x95 0x01 0x81 0x42 0x75 0x04 0x95 0x01
128:       0x15 0x00 0x25 0x00 0x35 0x00 0x45 0x00
136:       0x65 0x00 0x81 0x03 0x05 0x09 0x19 0x01
144:       0x29 0x0c 0x15 0x00 0x25 0x01 0x75 0x01
152:       0x95 0x0c 0x81 0x02 0x15 0x00 0x25 0x00
160:       0x75 0x01 0x95 0x04 0x81 0x03 0x05 0x0c
168:       0x0a 0xb2 0x00 0x15 0x00 0x25 0x01 0x95
176:       0x01 0x75 0x01 0x81 0x02 0x15 0x00 0x25
184:       0x00 0x75 0x07 0x95 0x01 0x81 0x03 0x05
192:       0x0c 0x09 0x01 0xa1 0x01 0x0a 0x85 0x00
200:       0x15 0x00 0x26 0xff 0x00 0x95 0x01 0x75
208:       0x08 0x81 0x02 0x0a 0x99 0x00 0x15 0x00
216:       0x26 0xff 0x00 0x95 0x01 0x75 0x04 0x81
224:       0x02 0x15 0x00 0x25 0x00 0x95 0x01 0x75
232:       0x04 0x81 0x03 0x0a 0x81 0x00 0x15 0x00
240:       0x26 0xff 0x00 0x95 0x01 0x75 0x04 0x81
248:       0x02 0x15 0x00 0x25 0x00 0x95 0x01 0x75
256:       0x04 0x81 0x03 0xc0 0x05 0x0f 0x09 0x21
264:       0x85 0x03 0xa1 0x02 0x09 0x97 0x15 0x00
272:       0x25 0x01 0x75 0x04 0x95 0x01 0x91 0x02
280:       0x15 0x00 0x25 0x00 0x75 0x04 0x95 0x01
288:       0x91 0x03 0x09 0x70 0x15 0x00 0x25 0x64
296:       0x75 0x08 0x95 0x04 0x91 0x02 0x09 0x50
304:       0x66 0x01 0x10 0x55 0x0e 0x15 0x00 0x26
312:       0xff 0x00 0x75 0x08 0x95 0x01 0x91 0x02
320:       0x09 0xa7 0x15 0x00 0x26 0xff 0x00 0x75
328:       0x08 0x95 0x01 0x91 0x02 0x65 0x00 0x55
336:       0x00 0x09 0x7c 0x15 0x00 0x26 0xff 0x00
344:       0x75 0x08 0x95 0x01 0x91 0x02 0xc0 0x05
352:       0x0c 0x09 0x01 0x85 0x0c 0xa1 0x01 0x0a
360:       0x9e 0x00 0x15 0x00 0x26 0xff 0x00 0x95
368:       0x01 0x75 0x08 0x81 0x02 0x0a 0xa1 0x00
376:       0x15 0x00 0x26 0xff 0x00 0x95 0x01 0x75
384:       0x08 0x81 0x02 0x0a 0xa2 0x00 0x15 0x00
392:       0x26 0xff 0x00 0x95 0x01 0x75 0x08 0x81
400:       0x02 0x0a 0xa3 0x00 0x15 0x00 0x26 0xff
408:       0x00 0x95 0x01 0x75 0x08 0x81 0x02 0xc0
416:       0xc0 0x05 0x01 0x09 0x06 0xa1 0x01 0x85
424:       0x05 0x05 0x07 0x19 0xe0 0x29 0xe7 0x15
432:       0x00 0x25 0x01 0x75 0x01 0x95 0x08 0x81
440:       0x02 0x95 0x01 0x75 0x08 0x81 0x03 0x95
448:       0x06 0x75 0x08 0x15 0x00 0x25 0x65 0x05
456:       0x07 0x19 0x00 0x29 0x65 0x81 0x00 0xc0
Data: 0x05, size: 1, type: 1, tag: 0
GlobalTagUsagePage: 0x0001
Data: 0x09, size: 1, type: 2, tag: 0
LocalTagUsage: 0x0005
Data: 0xa1, size: 1, type: 0, tag: 10
MainTagCollection
Application
Data: 0x85, size: 1, type: 1, tag: 8
    GlobalTagReportID: 1
Data: 0x09, size: 1, type: 2, tag: 0
    LocalTagUsage: 0x0001
Data: 0xa1, size: 1, type: 0, tag: 10
    MainTagCollection
    Physical
Data: 0x09, size: 1, type: 2, tag: 0
        LocalTagUsage: 0x0030
Data: 0x09, size: 1, type: 2, tag: 0
        LocalTagUsage: 0x0031
Data: 0x15, size: 1, type: 1, tag: 1
        GlobalTagLogicalMinimum: 0
Data: 0x27, size: 4, type: 1, tag: 2
        GlobalTagLogicalMaximum: 65535
Data: 0x95, size: 1, type: 1, tag: 9
        GlobalTagReportCount: 2
Data: 0x75, size: 1, type: 1, tag: 7
        GlobalTagReportSize: 16
Data: 0x81, size: 1, type: 0, tag: 8
        MainTagInput( Data Variable Absolute No Wrap Linear Preferred State No Null Position Non Volatile Bit Field )
        Adding report 1 field 0x00010030 size 16 bits at bit offset 0
        Adding report 1 field 0x00010031 size 16 bits at bit offset 16
Data: 0xc0, size: 0, type: 0, tag: 12
    MainTagEndCollection
Data: 0x09, size: 1, type: 2, tag: 0
    LocalTagUsage: 0x0001
Data: 0xa1, size: 1, type: 0, tag: 10
    MainTagCollection
    Physical
Data: 0x09, size: 1, type: 2, tag: 0
        LocalTagUsage: 0x0033
Data: 0x09, size: 1, type: 2, tag: 0
        LocalTagUsage: 0x0034
Data: 0x15, size: 1, type: 1, tag: 1
        GlobalTagLogicalMinimum: 0
Data: 0x27, size: 4, type: 1, tag: 2
        GlobalTagLogicalMaximum: 65535
Data: 0x95, size: 1, type: 1, tag: 9
        GlobalTagReportCount: 2
Data: 0x75, size: 1, type: 1, tag: 7
        GlobalTagReportSize: 16
Data: 0x81, size: 1, type: 0, tag: 8
        MainTagInput( Data Variable Absolute No Wrap Linear Preferred State No Null Position Non Volatile Bit Field )
        Adding report 1 field 0x00010033 size 16 bits at bit offset 32
        Adding report 1 field 0x00010034 size 16 bits at bit offset 48
Data: 0xc0, size: 0, type: 0, tag: 12
    MainTagEndCollection
Data: 0x05, size: 1, type: 1, tag: 0
    GlobalTagUsagePage: 0x0001
Data: 0x09, size: 1, type: 2, tag: 0
    LocalTagUsage: 0x0032
Data: 0x15, size: 1, type: 1, tag: 1
    GlobalTagLogicalMinimum: 0
Data: 0x26, size: 2, type: 1, tag: 2
    GlobalTagLogicalMaximum: 1023
Data: 0x95, size: 1, type: 1, tag: 9
    GlobalTagReportCount: 1
Data: 0x75, size: 1, type: 1, tag: 7
    GlobalTagReportSize: 10
Data: 0x81, size: 1, type: 0, tag: 8
    MainTagInput( Data Variable Absolute No Wrap Linear Preferred State No Null Position Non Volatile Bit Field )
    Adding report 1 field 0x00010032 size 10 bits at bit offset 64
Data: 0x15, size: 1, type: 1, tag: 1
    GlobalTagLogicalMinimum: 0
Data: 0x25, size: 1, type: 1, tag: 2
    GlobalTagLogicalMaximum: 0
Data: 0x75, size: 1, type: 1, tag: 7
    GlobalTagReportSize: 6
Data: 0x95, size: 1, type: 1, tag: 9
    GlobalTagReportCount: 1
Data: 0x81, size: 1, type: 0, tag: 8
    MainTagInput( Constant Variable Absolute No Wrap Linear Preferred State No Null Position Non Volatile Bit Field )
Data: 0x05, size: 1, type: 1, tag: 0
    GlobalTagUsagePage: 0x0001
Data: 0x09, size: 1, type: 2, tag: 0
    LocalTagUsage: 0x0035
Data: 0x15, size: 1, type: 1, tag: 1
    GlobalTagLogicalMinimum: 0
Data: 0x26, size: 2, type: 1, tag: 2
    GlobalTagLogicalMaximum: 1023
Data: 0x95, size: 1, type: 1, tag: 9
    GlobalTagReportCount: 1
Data: 0x75, size: 1, type: 1, tag: 7
    GlobalTagReportSize: 10
Data: 0x81, size: 1, type: 0, tag: 8
    MainTagInput( Data Variable Absolute No Wrap Linear Preferred State No Null Position Non Volatile Bit Field )
    Adding report 1 field 0x00010035 size 10 bits at bit offset 80
Data: 0x15, size: 1, type: 1, tag: 1
    GlobalTagLogicalMinimum: 0
Data: 0x25, size: 1, type: 1, tag: 2
    GlobalTagLogicalMaximum: 0
Data: 0x75, size: 1, type: 1, tag: 7
    GlobalTagReportSize: 6
Data: 0x95, size: 1, type: 1, tag: 9
    GlobalTagReportCount: 1
Data: 0x81, size: 1, type: 0, tag: 8
    MainTagInput( Constant Variable Absolute No Wrap Linear Preferred State No Null Position Non Volatile Bit Field )
Data: 0x05, size: 1, type: 1, tag: 0
    GlobalTagUsagePage: 0x0001
Data: 0x09, size: 1, type: 2, tag: 0
    LocalTagUsage: 0x0039
Data: 0x15, size: 1, type: 1, tag: 1
    GlobalTagLogicalMinimum: 1
Data: 0x25, size: 1, type: 1, tag: 2
    GlobalTagLogicalMaximum: 8
Data: 0x35, size: 1, type: 1, tag: 3
    GlobalTagPhysicalMinimum: 0
Data: 0x46, size: 2, type: 1, tag: 4
    GlobalTagPhysicalMaximum: 315
Data: 0x66, size: 2, type: 1, tag: 6
    GlobalTagUnit
Data: 0x75, size: 1, type: 1, tag: 7
    GlobalTagReportSize: 4
Data: 0x95, size: 1, type: 1, tag: 9
    GlobalTagReportCount: 1
Data: 0x81, size: 1, type: 0, tag: 8
    MainTagInput( Data Variable Absolute No Wrap Linear Preferred State Null State Non Volatile Bit Field )
    Adding report 1 field 0x00010039 size 4 bits at bit offset 96
Data: 0x75, size: 1, type: 1, tag: 7
    GlobalTagReportSize: 4
Data: 0x95, size: 1, type: 1, tag: 9
    GlobalTagReportCount: 1
Data: 0x15, size: 1, type: 1, tag: 1
    GlobalTagLogicalMinimum: 0
Data: 0x25, size: 1, type: 1, tag: 2
    GlobalTagLogicalMaximum: 0
Data: 0x35, size: 1, type: 1, tag: 3
    GlobalTagPhysicalMinimum: 0
Data: 0x45, size: 1, type: 1, tag: 4
    GlobalTagPhysicalMaximum: 0
Data: 0x65, size: 1, type: 1, tag: 6
    GlobalTagUnit
Data: 0x81, size: 1, type: 0, tag: 8
    MainTagInput( Constant Variable Absolute No Wrap Linear Preferred State No Null Position Non Volatile Bit Field )
Data: 0x05, size: 1, type: 1, tag: 0
    GlobalTagUsagePage: 0x0009
Data: 0x19, size: 1, type: 2, tag: 1
    LocalTagUsageMinimum: 0x0001
Data: 0x29, size: 1, type: 2, tag: 2
    LocalTagUsageMaximum: 0x000c
Data: 0x15, size: 1, type: 1, tag: 1
    GlobalTagLogicalMinimum: 0
Data: 0x25, size: 1, type: 1, tag: 2
    GlobalTagLogicalMaximum: 1
Data: 0x75, size: 1, type: 1, tag: 7
    GlobalTagReportSize: 1
Data: 0x95, size: 1, type: 1, tag: 9
    GlobalTagReportCount: 12
Data: 0x81, size: 1, type: 0, tag: 8
    MainTagInput( Data Variable Absolute No Wrap Linear Preferred State No Null Position Non Volatile Bit Field )
    Adding report 1 field 0x00090001 size 1 bits at bit offset 104
    Adding report 1 field 0x00090002 size 1 bits at bit offset 105
    Adding report 1 field 0x00090003 size 1 bits at bit offset 106
    Adding report 1 field 0x00090004 size 1 bits at bit offset 107
    Adding report 1 field 0x00090005 size 1 bits at bit offset 108
    Adding report 1 field 0x00090006 size 1 bits at bit offset 109
    Adding report 1 field 0x00090007 size 1 bits at bit offset 110
    Adding report 1 field 0x00090008 size 1 bits at bit offset 111
    Adding report 1 field 0x00090009 size 1 bits at bit offset 112
    Adding report 1 field 0x0009000a size 1 bits at bit offset 113
    Adding report 1 field 0x0009000b size 1 bits at bit offset 114
    Adding report 1 field 0x0009000c size 1 bits at bit offset 115
Data: 0x15, size: 1, type: 1, tag: 1
    GlobalTagLogicalMinimum: 0
Data: 0x25, size: 1, type: 1, tag: 2
    GlobalTagLogicalMaximum: 0
Data: 0x75, size: 1, type: 1, tag: 7
    GlobalTagReportSize: 1
Data: 0x95, size: 1, type: 1, tag: 9
    GlobalTagReportCount: 4
Data: 0x81, size: 1, type: 0, tag: 8
    MainTagInput( Constant Variable Absolute No Wrap Linear Preferred State No Null Position Non Volatile Bit Field )
Data: 0x05, size: 1, type: 1, tag: 0
    GlobalTagUsagePage: 0x000c
Data: 0x0a, size: 2, type: 2, tag: 0
    LocalTagUsage: 0x00b2
Data: 0x15, size: 1, type: 1, tag: 1
    GlobalTagLogicalMinimum: 0
Data: 0x25, size: 1, type: 1, tag: 2
    GlobalTagLogicalMaximum: 1
Data: 0x95, size: 1, type: 1, tag: 9
    GlobalTagReportCount: 1
Data: 0x75, size: 1, type: 1, tag: 7
    GlobalTagReportSize: 1
Data: 0x81, size: 1, type: 0, tag: 8
    MainTagInput( Data Variable Absolute No Wrap Linear Preferred State No Null Position Non Volatile Bit Field )
    Adding report 1 field 0x000c00b2 size 1 bits at bit offset 120
Data: 0x15, size: 1, type: 1, tag: 1
    GlobalTagLogicalMinimum: 0
Data: 0x25, size: 1, type: 1, tag: 2
    GlobalTagLogicalMaximum: 0
Data: 0x75, size: 1, type: 1, tag: 7
    GlobalTagReportSize: 7
Data: 0x95, size: 1, type: 1, tag: 9
    GlobalTagReportCount: 1
Data: 0x81, size: 1, type: 0, tag: 8
    MainTagInput( Constant Variable Absolute No Wrap Linear Preferred State No Null Position Non Volatile Bit Field )
Data: 0x05, size: 1, type: 1, tag: 0
    GlobalTagUsagePage: 0x000c
Data: 0x09, size: 1, type: 2, tag: 0
    LocalTagUsage: 0x0001
Data: 0xa1, size: 1, type: 0, tag: 10
    MainTagCollection
    Application
Data: 0x0a, size: 2, type: 2, tag: 0
        LocalTagUsage: 0x0085
Data: 0x15, size: 1, type: 1, tag: 1
        GlobalTagLogicalMinimum: 0
Data: 0x26, size: 2, type: 1, tag: 2
        GlobalTagLogicalMaximum: 255
Data: 0x95, size: 1, type: 1, tag: 9
        GlobalTagReportCount: 1
Data: 0x75, size: 1, type: 1, tag: 7
        GlobalTagReportSize: 8
Data: 0x81, size: 1, type: 0, tag: 8
        MainTagInput( Data Variable Absolute No Wrap Linear Preferred State No Null Position Non Volatile Bit Field )
        Adding report 1 field 0x000c0085 size 8 bits at bit offset 128
Data: 0x0a, size: 2, type: 2, tag: 0
        LocalTagUsage: 0x0099
Data: 0x15, size: 1, type: 1, tag: 1
        GlobalTagLogicalMinimum: 0
Data: 0x26, size: 2, type: 1, tag: 2
        GlobalTagLogicalMaximum: 255
Data: 0x95, size: 1, type: 1, tag: 9
        GlobalTagReportCount: 1
Data: 0x75, size: 1, type: 1, tag: 7
        GlobalTagReportSize: 4
Data: 0x81, size: 1, type: 0, tag: 8
        MainTagInput( Data Variable Absolute No Wrap Linear Preferred State No Null Position Non Volatile Bit Field )
        Adding report 1 field 0x000c0099 size 4 bits at bit offset 136
Data: 0x15, size: 1, type: 1, tag: 1
        GlobalTagLogicalMinimum: 0
Data: 0x25, size: 1, type: 1, tag: 2
        GlobalTagLogicalMaximum: 0
Data: 0x95, size: 1, type: 1, tag: 9
        GlobalTagReportCount: 1
Data: 0x75, size: 1, type: 1, tag: 7
        GlobalTagReportSize: 4
Data: 0x81, size: 1, type: 0, tag: 8
        MainTagInput( Constant Variable Absolute No Wrap Linear Preferred State No Null Position Non Volatile Bit Field )
Data: 0x0a, size: 2, type: 2, tag: 0
        LocalTagUsage: 0x0081
Data: 0x15, size: 1, type: 1, tag: 1
        GlobalTagLogicalMinimum: 0
Data: 0x26, size: 2, type: 1, tag: 2
        GlobalTagLogicalMaximum: 255
Data: 0x95, size: 1, type: 1, tag: 9
        GlobalTagReportCount: 1
Data: 0x75, size: 1, type: 1, tag: 7
        GlobalTagReportSize: 4
Data: 0x81, size: 1, type: 0, tag: 8
        MainTagInput( Data Variable Absolute No Wrap Linear Preferred State No Null Position Non Volatile Bit Field )
        Adding report 1 field 0x000c0081 size 4 bits at bit offset 144
Data: 0x15, size: 1, type: 1, tag: 1
        GlobalTagLogicalMinimum: 0
Data: 0x25, size: 1, type: 1, tag: 2
        GlobalTagLogicalMaximum: 0
Data: 0x95, size: 1, type: 1, tag: 9
        GlobalTagReportCount: 1
Data: 0x75, size: 1, type: 1, tag: 7
        GlobalTagReportSize: 4
Data: 0x81, size: 1, type: 0, tag: 8
        MainTagInput( Constant Variable Absolute No Wrap Linear Preferred State No Null Position Non Volatile Bit Field )
Data: 0xc0, size: 0, type: 0, tag: 12
    MainTagEndCollection
Data: 0x05, size: 1, type: 1, tag: 0
    GlobalTagUsagePage: 0x000f
Data: 0x09, size: 1, type: 2, tag: 0
    LocalTagUsage: 0x0021
Data: 0x85, size: 1, type: 1, tag: 8
    GlobalTagReportID: 3
Data: 0xa1, size: 1, type: 0, tag: 10
    MainTagCollection
    Logical
Data: 0x09, size: 1, type: 2, tag: 0
        LocalTagUsage: 0x0097
Data: 0x15, size: 1, type: 1, tag: 1
        GlobalTagLogicalMinimum: 0
Data: 0x25, size: 1, type: 1, tag: 2
        GlobalTagLogicalMaximum: 1
Data: 0x75, size: 1, type: 1, tag: 7
        GlobalTagReportSize: 4
Data: 0x95, size: 1, type: 1, tag: 9
        GlobalTagReportCount: 1
Data: 0x91, size: 1, type: 0, tag: 9
        MainTagOutput( Data Variable Absolute No Wrap Linear Preferred State No Null Position Non Volatile Bit Field )
Data: 0x15, size: 1, type: 1, tag: 1
        GlobalTagLogicalMinimum: 0
Data: 0x25, size: 1, type: 1, tag: 2
        GlobalTagLogicalMaximum: 0
Data: 0x75, size: 1, type: 1, tag: 7
        GlobalTagReportSize: 4
Data: 0x95, size: 1, type: 1, tag: 9
        GlobalTagReportCount: 1
Data: 0x91, size: 1, type: 0, tag: 9
        MainTagOutput( Constant Variable Absolute No Wrap Linear Preferred State No Null Position Non Volatile Bit Field )
Data: 0x09, size: 1, type: 2, tag: 0
        LocalTagUsage: 0x0070
Data: 0x15, size: 1, type: 1, tag: 1
        GlobalTagLogicalMinimum: 0
Data: 0x25, size: 1, type: 1, tag: 2
        GlobalTagLogicalMaximum: 100
Data: 0x75, size: 1, type: 1, tag: 7
        GlobalTagReportSize: 8
Data: 0x95, size: 1, type: 1, tag: 9
        GlobalTagReportCount: 4
Data: 0x91, size: 1, type: 0, tag: 9
        MainTagOutput( Data Variable Absolute No Wrap Linear Preferred State No Null Position Non Volatile Bit Field )
Data: 0x09, size: 1, type: 2, tag: 0
        LocalTagUsage: 0x0050
Data: 0x66, size: 2, type: 1, tag: 6
        GlobalTagUnit
Data: 0x55, size: 1, type: 1, tag: 5
        GlobalTagUnitExponent
Data: 0x15, size: 1, type: 1, tag: 1
        GlobalTagLogicalMinimum: 0
Data: 0x26, size: 2, type: 1, tag: 2
        GlobalTagLogicalMaximum: 255
Data: 0x75, size: 1, type: 1, tag: 7
        GlobalTagReportSize: 8
Data: 0x95, size: 1, type: 1, tag: 9
        GlobalTagReportCount: 1
Data: 0x91, size: 1, type: 0, tag: 9
        MainTagOutput( Data Variable Absolute No Wrap Linear Preferred State No Null Position Non Volatile Bit Field )
Data: 0x09, size: 1, type: 2, tag: 0
        LocalTagUsage: 0x00a7
Data: 0x15, size: 1, type: 1, tag: 1
        GlobalTagLogicalMinimum: 0
Data: 0x26, size: 2, type: 1, tag: 2
        GlobalTagLogicalMaximum: 255
Data: 0x75, size: 1, type: 1, tag: 7
        GlobalTagReportSize: 8
Data: 0x95, size: 1, type: 1, tag: 9
        GlobalTagReportCount: 1
Data: 0x91, size: 1, type: 0, tag: 9
        MainTagOutput( Data Variable Absolute No Wrap Linear Preferred State No Null Position Non Volatile Bit Field )
Data: 0x65, size: 1, type: 1, tag: 6
        GlobalTagUnit
Data: 0x55, size: 1, type: 1, tag: 5
        GlobalTagUnitExponent
Data: 0x09, size: 1, type: 2, tag: 0
        LocalTagUsage: 0x007c
Data: 0x15, size: 1, type: 1, tag: 1
        GlobalTagLogicalMinimum: 0
Data: 0x26, size: 2, type: 1, tag: 2
        GlobalTagLogicalMaximum: 255
Data: 0x75, size: 1, type: 1, tag: 7
        GlobalTagReportSize: 8
Data: 0x95, size: 1, type: 1, tag: 9
        GlobalTagReportCount: 1
Data: 0x91, size: 1, type: 0, tag: 9
        MainTagOutput( Data Variable Absolute No Wrap Linear Preferred State No Null Position Non Volatile Bit Field )
Data: 0xc0, size: 0, type: 0, tag: 12
    MainTagEndCollection
Data: 0x05, size: 1, type: 1, tag: 0
    GlobalTagUsagePage: 0x000c
Data: 0x09, size: 1, type: 2, tag: 0
    LocalTagUsage: 0x0001
Data: 0x85, size: 1, type: 1, tag: 8
    GlobalTagReportID: 12
Data: 0xa1, size: 1, type: 0, tag: 10
    MainTagCollection
    Application
Data: 0x0a, size: 2, type: 2, tag: 0
        LocalTagUsage: 0x009e
Data: 0x15, size: 1, type: 1, tag: 1
        GlobalTagLogicalMinimum: 0
Data: 0x26, size: 2, type: 1, tag: 2
        GlobalTagLogicalMaximum: 255
Data: 0x95, size: 1, type: 1, tag: 9
        GlobalTagReportCount: 1
Data: 0x75, size: 1, type: 1, tag: 7
        GlobalTagReportSize: 8
Data: 0x81, size: 1, type: 0, tag: 8
        MainTagInput( Data Variable Absolute No Wrap Linear Preferred State No Null Position Non Volatile Bit Field )
        Adding report 12 field 0x000c009e size 8 bits at bit offset 0
Data: 0x0a, size: 2, type: 2, tag: 0
        LocalTagUsage: 0x00a1
Data: 0x15, size: 1, type: 1, tag: 1
        GlobalTagLogicalMinimum: 0
Data: 0x26, size: 2, type: 1, tag: 2
        GlobalTagLogicalMaximum: 255
Data: 0x95, size: 1, type: 1, tag: 9
        GlobalTagReportCount: 1
Data: 0x75, size: 1, type: 1, tag: 7
        GlobalTagReportSize: 8
Data: 0x81, size: 1, type: 0, tag: 8
        MainTagInput( Data Variable Absolute No Wrap Linear Preferred State No Null Position Non Volatile Bit Field )
        Adding report 12 field 0x000c00a1 size 8 bits at bit offset 8
Data: 0x0a, size: 2, type: 2, tag: 0
        LocalTagUsage: 0x00a2
Data: 0x15, size: 1, type: 1, tag: 1
        GlobalTagLogicalMinimum: 0
Data: 0x26, size: 2, type: 1, tag: 2
        GlobalTagLogicalMaximum: 255
Data: 0x95, size: 1, type: 1, tag: 9
        GlobalTagReportCount: 1
Data: 0x75, size: 1, type: 1, tag: 7
        GlobalTagReportSize: 8
Data: 0x81, size: 1, type: 0, tag: 8
        MainTagInput( Data Variable Absolute No Wrap Linear Preferred State No Null Position Non Volatile Bit Field )
        Adding report 12 field 0x000c00a2 size 8 bits at bit offset 16
Data: 0x0a, size: 2, type: 2, tag: 0
        LocalTagUsage: 0x00a3
Data: 0x15, size: 1, type: 1, tag: 1
        GlobalTagLogicalMinimum: 0
Data: 0x26, size: 2, type: 1, tag: 2
        GlobalTagLogicalMaximum: 255
Data: 0x95, size: 1, type: 1, tag: 9
        GlobalTagReportCount: 1
Data: 0x75, size: 1, type: 1, tag: 7
        GlobalTagReportSize: 8
Data: 0x81, size: 1, type: 0, tag: 8
        MainTagInput( Data Variable Absolute No Wrap Linear Preferred State No Null Position Non Volatile Bit Field )
        Adding report 12 field 0x000c00a3 size 8 bits at bit offset 24
Data: 0xc0, size: 0, type: 0, tag: 12
    MainTagEndCollection
Data: 0xc0, size: 0, type: 0, tag: 12
MainTagEndCollection
Data: 0x05, size: 1, type: 1, tag: 0
GlobalTagUsagePage: 0x0001
Data: 0x09, size: 1, type: 2, tag: 0
LocalTagUsage: 0x0006
Data: 0xa1, size: 1, type: 0, tag: 10
MainTagCollection
Application
Data: 0x85, size: 1, type: 1, tag: 8
    GlobalTagReportID: 5
Data: 0x05, size: 1, type: 1, tag: 0
    GlobalTagUsagePage: 0x0007
Data: 0x19, size: 1, type: 2, tag: 1
    LocalTagUsageMinimum: 0x00e0
Data: 0x29, size: 1, type: 2, tag: 2
    LocalTagUsageMaximum: 0x00e7
Data: 0x15, size: 1, type: 1, tag: 1
    GlobalTagLogicalMinimum: 0
Data: 0x25, size: 1, type: 1, tag: 2
    GlobalTagLogicalMaximum: 1
Data: 0x75, size: 1, type: 1, tag: 7
    GlobalTagReportSize: 1
Data: 0x95, size: 1, type: 1, tag: 9
    GlobalTagReportCount: 8
Data: 0x81, size: 1, type: 0, tag: 8
    MainTagInput( Data Variable Absolute No Wrap Linear Preferred State No Null Position Non Volatile Bit Field )
    Adding report 5 field 0x000700e0 size 1 bits at bit offset 0
    Adding report 5 field 0x000700e1 size 1 bits at bit offset 1
    Adding report 5 field 0x000700e2 size 1 bits at bit offset 2
    Adding report 5 field 0x000700e3 size 1 bits at bit offset 3
    Adding report 5 field 0x000700e4 size 1 bits at bit offset 4
    Adding report 5 field 0x000700e5 size 1 bits at bit offset 5
    Adding report 5 field 0x000700e6 size 1 bits at bit offset 6
    Adding report 5 field 0x000700e7 size 1 bits at bit offset 7
Data: 0x95, size: 1, type: 1, tag: 9
    GlobalTagReportCount: 1
Data: 0x75, size: 1, type: 1, tag: 7
    GlobalTagReportSize: 8
Data: 0x81, size: 1, type: 0, tag: 8
    MainTagInput( Constant Variable Absolute No Wrap Linear Preferred State No Null Position Non Volatile Bit Field )
Data: 0x95, size: 1, type: 1, tag: 9
    GlobalTagReportCount: 6
Data: 0x75, size: 1, type: 1, tag: 7
    GlobalTagReportSize: 8
Data: 0x15, size: 1, type: 1, tag: 1
    GlobalTagLogicalMinimum: 0
Data: 0x25, size: 1, type: 1, tag: 2
    GlobalTagLogicalMaximum: 101
Data: 0x05, size: 1, type: 1, tag: 0
    GlobalTagUsagePage: 0x0007
Data: 0x19, size: 1, type: 2, tag: 1
    LocalTagUsageMinimum: 0x0000
Data: 0x29, size: 1, type: 2, tag: 2
    LocalTagUsageMaximum: 0x0065
Data: 0x81, size: 1, type: 0, tag: 8
    MainTagInput( Data Array Absolute No Wrap Linear Preferred State No Null Position Non Volatile Bit Field )
Data: 0xc0, size: 0, type: 0, tag: 12
MainTagEndCollection
WARNING: Xbox report descriptor missing expected usages, ignoring
Added HIDAPI device 'Xbox One Elite 2 Controller' VID 0x045e, PID 0x0b22, bluetooth 1, version 0, serial 3c:fa:06:22:81:e2, interface -1, interface_class 0, interface_subclass 0, interface_protocol 0, usage page 0x0001, usage 0x0005, path = /dev/hidraw10, driver = SDL_JOYSTICK_HIDAPI_XBOX_ONE (ENABLED)
Using udev for joystick device discovery
Gamepad 5 added
Opened gamepad Xbox One Elite 2 Controller, guid 050018dc5e040000220b000000006800, /dev/hidraw10
Rumble supported
Trigger rumble supported
Player index: 0
Mapping: 050018dc5e040000220b000000006800,*,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,paddle1:b11,paddle2:b13,paddle3:b12,paddle4:b14,crc:dc18,platform:Linux,

Flame-999 avatar Dec 11 '25 17:12 Flame-999

Great, can you edit SDL_hidapi_xboxone.c and enable (#if 1) DEBUG_XBOX_PROTOCOL and then once testcontroller starts, press and release the X button and quit?

slouken avatar Dec 11 '25 18:12 slouken

There:

WARNING: Xbox report descriptor missing expected usages, ignoring
Added HIDAPI device 'Xbox One Elite 2 Controller' VID 0x045e, PID 0x0b22, bluetooth 1, version 0, serial 3c:fa:06:22:81:e2, interface -1, interface_class 0, interface_subclass 0, interface_protocol 0, usage page 0x0001, usage 0x0005, path = /dev/hidraw10, driver = SDL_JOYSTICK_HIDAPI_XBOX_ONE (ENABLED)
Using udev for joystick device discovery
Gamepad 5 added
Opened gamepad Xbox One Elite 2 Controller, guid 050018dc5e040000220b000000006800, /dev/hidraw10
Rumble supported
Trigger rumble supported
Player index: 0
Mapping: 050018dc5e040000220b000000006800,*,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,paddle1:b11,paddle2:b13,paddle3:b12,paddle4:b14,crc:dc18,platform:Linux,
Xbox One packet: size = 20
00:       0x01 0x12 0x80 0xe7 0x82 0xdd 0x78 0xe1
08:       0x79 0x00 0x00 0x00 0x00 0x00 0x04 0x00
16:       0x00 0x00 0x00 0x00
>>> Paddles: 0,0,0,0 mapped = FALSE
Xbox One packet: size = 20
00:       0x01 0x12 0x80 0xe7 0x82 0xdd 0x78 0xe1
08:       0x79 0x00 0x00 0x00 0x00 0x00 0x00 0x00
16:       0x00 0x00 0x00 0x00
>>> Paddles: 0,0,0,0 mapped = FALSE
^CGamepad 5 removed
Removing HIDAPI device 'Xbox One Elite 2 Controller' VID 0x045e, PID 0x0b22, bluetooth 1, version 0, serial 3c:fa:06:22:81:e2, interface -1, interface_class 0, interface_subclass 0, interface_protocol 0, usage page 0x0001, usage 0x0005, path = /dev/hidraw10, driver = SDL_JOYSTICK_HIDAPI_XBOX_ONE (ENABLED)

Flame-999 avatar Dec 11 '25 18:12 Flame-999

Fixed, thanks!

slouken avatar Dec 12 '25 21:12 slouken