Off-Topic > Off-Topic - Tiny Core Lounge

[Solved] xbox controller not working on TCL16 x86_64

<< < (3/19) > >>

aus9:
GNUser
Your problem is with ids
1) your ids are not yet uploaded to http://www.linux-usb.org/usb.ids

2)  yours are vendor 20d6 and product 2062

--- Code: ---modinfo xpad | grep v20D6
alias:          usb:v20D6p*d*dc*dsc*dp*icFFisc47ipD0in*
alias:          usb:v20D6p*d*dc*dsc*dp*icFFisc5Dip81in*
alias:          usb:v20D6p*d*dc*dsc*dp*icFFisc5Dip01in*

--- End code ---

Rich correctly spots that modinfo xpad | grep depends -> ffmless
I wonder if Rich has any suggestions on the top part of modinfo...to try a diff parameter?

--- Code: ---modinfo xpad
filename:       /lib/modules/6.12.11-tinycore64/kernel.tclocal/drivers/input/joystick/xpad.ko.gz
author:         Marko Friedemann <mfr@bmx-chemnitz.de>
description:    Xbox pad driver
license:        GPL
parm:           auto_poweroff:Power off wireless controllers on suspend
parm:           sticks_to_null:Do not map sticks at all for unknown pads
parm:           triggers_to_buttons:Map triggers to buttons rather than axes for unknown pads
parm:           dpad_to_buttons:Map D-PAD to buttons rather than axes for unknown pads
alias:          usb:v3537p*d*dc*dsc*dp*icFFisc47ipD0in*
SNIP
depends:        ff-memless
intree:         Y
vermagic:       6.12.11-tinycore64 SMP mod_unload

--- End code ---

aus9:
Ok  I was half right. as usual ;)

1) We agree your device is unknown by product id so I found this page
https://docs.kernel.org/6.18/input/devices/xpad.html
go to this quote but it references dance pads....is that a mat?

--- Quote ---17.1.3. Unknown Controllers
If you have an unknown Xbox controller, it should work just fine with the default settings.
HOWEVER if you have an unknown dance pad not listed below, it will not work UNLESS you set “dpad_to_buttons” to 1 in the module configuration.
--- End quote ---

If your device is not a mat, agreed it claims
Unrecognized models of Xbox controllers should function as Generic Xbox controllers.
And we are back to square one

(2) You could try modding the driver C file from here
https://github.com/paroj/xpad/blob/master/xpad.c

search for 20d6 gives me hits for lines 385/6/7 PLUS there are other lines too
{ 0x20d6, 0x2001, "BDA Xbox Series X Wired Controller", 0, XTYPE_XBOXONE },
{ 0x20d6, 0x2009, "PowerA Enhanced Wired Controller for Xbox Series X|S", 0, XTYPE_XBOXONE },
{ 0x20d6, 0x281f, "PowerA Wired Controller For Xbox 360", 0, XTYPE_XBOX360 },

and other lines. So either raise an issue or copy and modify  the 2009 line to 0x2062 and compile it?

aus9:
if you are able to built it....then that git website refers to an executable called jstest and that can be found here https://salsa.debian.org/debian/joystick

GNUser:
Hi aus9. Nice to see you here :)

Thank you for the suggestions, but I'm still puzzled about:

a) why this gamepad works in Devuan without any hacks

and

b) why it doesn't work in TCL even though the correct kernel module (xpad) gets loaded automatically when the gamepad is connected

Is there something I could copy from Devuan over to TCL that might help? I'm going to see whether there's a udev rule in Devuan that is responsible for the trouble-free experience there.

PS: jstest is not installed in Devuan, which actually has very few packages installed (only 997 packages are installed, which on a Debian derivative is quite barebones)

PS2: The new controller is a regular handheld gamepad, not a dancepad.

GNUser:
/dev/input/js0 is something that we expect to be created without user intervention when things are working correctly, right? If so, which system component is responsible for its creation? That component may be the culprit and may need some kind of nudge.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version