Generic controller detected as android gamepad

My controller works, but is recognized as Shanwan Android Gamepad. It supports xinput, but regardless of following some solutions (like adding device id in xpad) the controller still won't connect with xinput. Rather its automatically connecting with usbhid driver since there is support for android, ps3, etc. I know I should be happy with the controller working in the first place, but there is no vibrations
Solution:
Finally I tried with X and weirdly enough it works! And now my controller is connected with xinput and recognized in lsusb as Bus 001 Device 026: ID 045e:028e Microsoft Corp. Xbox360 Controller
Jump to solution
37 Replies
Kasher_CS
Kasher_CS4w ago
Did you try pressing Home?
aMayniAc
aMayniAcOP4w ago
Yess it doesn't switch to xinput Neither did it do in windows But windows always automatically uses xinput so it wasnt a problem
Kasher_CS
Kasher_CS4w ago
Linux does not have xinput/dinput (But if programs like Dolphin do not see vibration its a problem)
aMayniAc
aMayniAcOP4w ago
You mean the emulator?
Kasher_CS
Kasher_CS4w ago
Yes
aMayniAc
aMayniAcOP4w ago
Okay..let me try
Kasher_CS
Kasher_CS4w ago
GitHub
GitHub - amardhruva/shanwan-controller-fix: A Fix for SHANWAN based...
A Fix for SHANWAN based Xbox controllers on Linux Machines. - amardhruva/shanwan-controller-fix
aMayniAc
aMayniAcOP4w ago
I did come across that page Unfortunately the ids are not same since my controller is recognized as android gamepad
Kasher_CS
Kasher_CS4w ago
What's the IDs? You can try just changing them
aMayniAc
aMayniAcOP4w ago
I did that as well It simply says "success" and then no change
aMayniAc
aMayniAcOP4w ago
No description
aMayniAc
aMayniAcOP4w ago
No description
aMayniAc
aMayniAcOP4w ago
My inital question was actually how to install xpad in bazzite since this page said it fixed it But later figured xpad is included in bazzite
Kasher_CS
Kasher_CS4w ago
xpad is included in Linux, this is a fork
aMayniAc
aMayniAcOP4w ago
But how can I add more id in the xpad config I tried modprobe to add ids, and now when I connect my controller the system plays "device connected" sound then right after "device disconnected" sound But the conntroller is still recognized as Android Gamepad Is there a way to not let linux pickup usbhid driver? Let xpad see it first 🥺 I tried dolphin controller config but no input is recognized..
Kasher_CS
Kasher_CS4w ago
Because you need this fork
Kasher_CS
Kasher_CS4w ago
https://github.com/ublue-os/bazzite/issues/901 Use similar steps to the wheel drivers
GitHub
Add kernel driver modules for steering wheels (hid-tmff2 in particu...
Describe the package First of all, thank you for including a simple one-click method to install oversteer! Unfortunately though that's not sufficient to use my steering wheel (a Thrustmaster T3...
aMayniAc
aMayniAcOP4w ago
Wait for the wheel? Mine is just a controller.. Am i missing something
Kasher_CS
Kasher_CS4w ago
They also try to install drivers
aMayniAc
aMayniAcOP4w ago
alright let me see Welp I can't figure out what am I supposed to do
antheas
antheas4w ago
whats going on here ok so the shaswan controller you have needs a fixup to work on linux it has an error in its hid descriptor purposely to cause android tablets to treat it as dinput and windows to see it as xinput
aMayniAc
aMayniAcOP4w ago
Oh that makes sense So what would be the fixup xD Also then why is linux defaulting to dinput? From what I understand, can we stop linux from using the driver its taking it as dinput so that we make xpad work?
aMayniAc
aMayniAcOP4w ago
Mine is event based too
No description
antheas
antheas4w ago
well read the workaround
aMayniAc
aMayniAcOP4w ago
Can you tell me under which section should I be looking please 😵‍💫 There's a lot
antheas
antheas4w ago
5.7
aMayniAc
aMayniAcOP4w ago
Oh shoot my bad sorry! Hey man, at first I thought it looks promising, but when I tried the steps I found out a few things: 1. Well firstly the wiki states that the device first tries to connect as a Switch controller and gave its IDs. I'm assuming so since the wiki doesn't have the entire dmesg. But when I ran dmesg I got the following: [ 6763.432839] usb 1-2: new full-speed USB device number 18 using xhci_hcd [ 6765.792839] usb 1-2: New USB device found, idVendor=2563, idProduct=0575, bcdDevice=52.00 [ 6765.792850] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 6765.792854] usb 1-2: Product: PS3/PC Gamepad [ 6765.792857] usb 1-2: Manufacturer: SHANWAN Its PS3/PC Gamepad. Regardless I assumed I'm supposed to take this devices IDs. 2. The error stated in the wiki is about a bad descriptor, giving errors like: usb 1-5.3: new full-speed USB device number 37 using xhci_hcd usb 1-5.3: unable to read config index 0 descriptor/start: -32 usb 1-5.3: chopping to 0 config(s) usb 1-5.3: can't read configurations, error -32 But when I run dmesg I get the following: [ 6761.084527] usb 1-2: USB disconnect, device number 17 [ 6763.432839] usb 1-2: new full-speed USB device number 18 using xhci_hcd [ 6765.792839] usb 1-2: New USB device found, idVendor=2563, idProduct=0575, bcdDevice=52.00 [ 6765.792850] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 6765.792854] usb 1-2: Product: PS3/PC Gamepad [ 6765.792857] usb 1-2: Manufacturer: SHANWAN [ 6765.797313] hid-generic 0003:2563:0575.0017: unknown main item tag 0x0 [ 6765.797327] hid-generic 0003:2563:0575.0017: unknown main item tag 0x0 [ 6765.797336] hid-generic 0003:2563:0575.0017: unknown main item tag 0x0 [ 6765.797346] hid-generic 0003:2563:0575.0017: unknown main item tag 0x0 [ 6765.797355] hid-generic 0003:2563:0575.0017: unknown main item tag 0x0 [ 6765.797364] hid-generic 0003:2563:0575.0017: unknown main item tag 0x0 [ 6765.797374] hid-generic 0003:2563:0575.0017: unknown main item tag 0x0 [ 6765.797383] hid-generic 0003:2563:0575.0017: unknown main item tag 0x0 the last line running couple more lines (40 times to be precise). Yet again I proceeded with the fix. 3. Then I had to run a modprobe for usbhid as the wiki stated: sudo modprobe -r usbhid ; sleep 4 ; sudo modprobe -v usbhid "quirks=0x057e:0x2009:0x400" but when I ran it I got an error saying: modprobe: FATAL: Module usbhid is builtin. Tho this step was optional, neither of this seems to work. When I connect my controller back its again Android Gamepad and not PS3/PC Gamepad as the wiki said
antheas
antheas4w ago
Skip 3 Step 2 you want
aMayniAc
aMayniAcOP4w ago
Yep did that Disconnecting and connecting again gives the same error with no changes
antheas
antheas4w ago
If it doesn't work dunno This looks correct when that happens Is the gamepad different? Oh no ok send the full dmesg sudo dmesg | fpaste
aMayniAc
aMayniAcOP4w ago
I'm not sure what exact controller they used alright here you go https://paste.centos.org/view/312fe0a7
antheas
antheas4w ago
I can see it cycling It switches between a PS3 gamepad and an Android gamepad But with a different check
aMayniAc
aMayniAcOP4w ago
Yepp No idea what’s wrong Guys! I found it working by the worst way possible! I was going throught an issue in github and someone suggested to press and hold A while connecting, doing that connects as Android Gamepad only ofc. But when I tried pressing B while connecting the lights on the controller switched to PS3/PC mode.
Solution
aMayniAc
aMayniAc4w ago
Finally I tried with X and weirdly enough it works! And now my controller is connected with xinput and recognized in lsusb as Bus 001 Device 026: ID 045e:028e Microsoft Corp. Xbox360 Controller
aMayniAc
aMayniAcOP4w ago
Even gamepad tester recognizes and vibration works too Edit: the post did say X but I got confused it to be the X from playstation controllers, and was pressing A instead. My bad. 😅 Thanks @antheas and @Kasher_CS for the help!
Kasher_CS
Kasher_CS4w ago
Weird undocumented controllers my beloved
Want results from more Discord servers?
Add your server