Gamepad won't work when set to X-input, all buttons ignored

I just bought a new gamepad: Trust GXT 540 Yula. Upon plugging it in the device is detected and lights up accordingly. The issue I seem to be having is it refuses to work under Xinput mode: It will only function properly when the switch is flipped to Dinput. The device is detected in both cases but under X-input the buttons are simply ignored and no actions are registered (neither any buttons nor moving the thumb pads). I can use it fine under D input for now… however since I hear X input is the more modern and correct system, I was wondering if this is a known issue and what could be causing it.

My Linux distro is the KDE version of Manjaro OS. Kernel 5.13.5. X11 Plasma session, not using Wayland yet due to its issues with monitor standby.

lsusb calls the controller by different device names based on the active mode.

dinput (working):

Bus 005 Device 022: ID 145f:01c5 Trust Trust Gamepad

xinput (not working):

Bus 005 Device 024: ID 045e:028e Microsoft Corp. Xbox360 Controller

Someone pointed me to this issue. Looks like it might be what I’m experiencing too: The effects described are exactly the same. Not sure how to test it to be sure beyond doubt though.

Have you tried this AUR (en) - xbox-generic-controller ? See this comment too.

lsmod confirms I have xpad running:

xpad                   45056  0

usb-devices command lists the controller as follows (set as X input):

T:  Bus=05 Lev=02 Prnt=03 Port=00 Cnt=01 Dev#= 26 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=ff(vend.) Sub=ff Prot=ff MxPS=64 #Cfgs=  1
P:  Vendor=045e ProdID=028e Rev=01.10
S:  Manufacturer=SHANWAN
S:  Product=Controller
C:  #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=500mA
I:  If#=0x0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=5d Prot=01 Driver=xpad

As for xbox-generic-controller, I haven’t enabled AUR or any of the third party sources yet; Didn’t need them before and was hoping to avoid non-official packages. If needed I may try that as well.

Confirming xpad issue 199 is the cause for my issue: Upon running the fixcontroller.py script provided as a workaround, the OS senses all inputs on the gamepad under x-input as well. Really hope that bug can be fixed soon!

Considering the information in that issue: Can anyone suggest a better workaround to using that python script, in order to send whatever activation signal the device expects over USB? A user on Reddit suggested messing with the udev rules, I never did anything like that in the past and don’t even know where to begin nor what to change them to. I tried echoing stuff to the device (echo 1 > /dev/bus/usb/005/011) however this only gives me an invalid argument error. Please let me know what comes to mind, would appreciate help in solving this somehow, thank you.