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 vibrationsSolution:Jump to 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
37 Replies
Did you try pressing Home?
Yess it doesn't switch to xinput
Neither did it do in windows
But windows always automatically uses xinput so it wasnt a problem
Linux does not have xinput/dinput (But if programs like Dolphin do not see vibration its a problem)
You mean the emulator?
Yes
Okay..let me try
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
I did come across that page
Unfortunately the ids are not same since my controller is recognized as android gamepad
What's the IDs?
You can try just changing them
I did that as well
It simply says "success" and then no change
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
xpad is included in Linux, this is a fork
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..
Because you need this fork
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...
Wait for the wheel?
Mine is just a controller..
Am i missing something
They also try to install drivers
alright let me see
Welp I can't figure out what am I supposed to do
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
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?
Mine is event based too
well read the workaround
Can you tell me under which section should I be looking please 😵💫
There's a lot
5.7
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 saidSkip 3
Step 2 you want
Yep did that
Disconnecting and connecting again gives the same error with no changes
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
I'm not sure what exact controller they used
alright
here you go https://paste.centos.org/view/312fe0a7
I can see it cycling
It switches between a PS3 gamepad and an Android gamepad
But with a different check
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
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
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!
Weird undocumented controllers my beloved