Off-Topic > Off-Topic - Tiny Core Lounge

[Solved] xbox controller not working on TCL16 x86_64

(1/19) > >>

GNUser:
I just purchased two new controllers for my kids' TCL-powered retro gaming laptop, made by PowerA. The gaming laptop runs mednafen to emulate various videogame consoles. Kids were using two old Logitech gamepads up to now, but the Logitech gamepads got pretty beaten up so needed to be replaced.

mednafen and other games running in TCL do not recognize these xbox controllers at all, so games can only be played using the keyboard for now :(

Interestingly, these xbox controllers work out of the box in Devuan without any special configuration. However, I prefer running TCL on the gaming laptop because it's lighter, easier to understand, easier to customize, etc. So here we are.

I can confirm that the  input-joystick-KERNEL  extension is loaded:


--- Code: ---TCL$ tce-status -i | grep joystick
input-joystick-6.12.11-tinycore64
--- End code ---

When I plug in the gamepad in TCL, the  xpad  kernel module appears in the list of loaded modules:


--- Code: ---TCL$ sudo lsmod | sort
Module                  Size  Used by    Not tainted
ac                     12288  0
agpgart                28672  2 intel_gtt,ttm
backlight              12288  4 i915,drm_display_helper,drm,video
battery                16384  0
ccm                    16384  6
cec                    36864  2 i915,drm_display_helper
cfg80211              303104  4 mt76x2_common,mt76x02_lib,mt76,mac80211
cpufreq_conservative    12288  0
cpufreq_powersave      12288  0
cpufreq_userspace      12288  0
cqhci                  20480  1 sdhci_pci
drm                   348160 12 i915,drm_display_helper,drm_kms_helper,ttm,drm_buddy
drm_buddy              16384  1 i915
drm_display_helper    114688  1 i915
drm_kms_helper        102400  2 i915,drm_display_helper
e1000e                167936  0
ff_memless             12288  1 xpad
i2c_i801               24576  0
i2c_smbus              12288  1 i2c_i801
i915                 2289664 345
intel_gtt              16384  1 i915
joydev                 20480  0
loop                   24576 586
lpc_ich                24576  0
mac80211              425984  3 mt76x2e,mt76x02_lib,mt76
mei                    69632  1 mei_me
mei_me                 24576  0
mmc_core              110592  3 sdhci_pci,sdhci,cqhci
mt76                   57344  3 mt76x2e,mt76x2_common,mt76x02_lib
mt76x02_lib            49152  2 mt76x2e,mt76x2_common
mt76x2_common          16384  1 mt76x2e
mt76x2e                20480  0
pcspkr                 12288  0
sdhci                  40960  1 sdhci_pci
sdhci_pci              53248  0
snd                    65536  9 snd_hda_codec_hdmi,snd_ctl_led,snd_hda_codec_realtek,snd_hda_codec_generic,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_timer
snd_ctl_led            20480  0
snd_hda_codec          81920  4 snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_codec_generic,snd_hda_intel
snd_hda_codec_generic    57344  1 snd_hda_codec_realtek
snd_hda_codec_hdmi     49152  1
snd_hda_codec_realtek   118784  1
snd_hda_core           49152  5 snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_codec_generic,snd_hda_intel,snd_hda_codec
snd_hda_intel          28672  0
snd_hda_scodec_component    12288  1 snd_hda_codec_realtek
snd_hwdep              12288  1 snd_hda_codec
snd_intel_dspcfg       12288  1 snd_hda_intel
snd_pcm                86016  4 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_core
snd_timer              24576  1 snd_pcm
soundcore              12288  2 snd_ctl_led,snd
squashfs               40960 293
ttm                    49152  1 i915
uinput                 16384  1
uvc                    12288  1 uvcvideo
uvcvideo               81920  0
video                  57344  1 i915
videobuf2_common       40960  4 uvcvideo,videobuf2_v4l2,videobuf2_vmalloc,videobuf2_memops
videobuf2_memops       12288  1 videobuf2_vmalloc
videobuf2_v4l2         20480  1 uvcvideo
videobuf2_vmalloc      12288  1 uvcvideo
wmi                    16384  1 video
xhci_hcd              114688  1 xhci_pci
xhci_pci               16384  0
xpad                   36864  0
--- End code ---

Also, I see the correct  VID:PID  in the output of  lsusb  , but no human-friendly description of the gamepad:


--- Code: ---TCL$ sudo lsusb
...
Bus 002 Device 007: ID 20d6:2062 
--- End code ---

lshw  doesn't see the gamepad at all:

--- Code: ---TCL$ sudo lshw -class input
  *-pnp00:05               
       product: PnP device PNP0303
       physical id: 8
       capabilities: pnp
       configuration: driver=i8042 kbd
--- End code ---

Here are the same commands running on Devuan on identical hardware (same laptop, same gamepad plugged in):


--- Code: ---Devuan$ sudo lsmod | sort
ac                     16384  0
aesni_intel           122880  4
ahci                   49152  2
at24                   28672  0
battery                28672  1 thinkpad_acpi
button                 24576  0
ccm                    20480  6
cec                    69632  2 drm_display_helper,i915
cfg80211             1392640  4 mt76,mt76x02_lib,mac80211,mt76x2_common
coretemp               16384  0
cqhci                  32768  1 sdhci_pci
crc16                  12288  1 ext4
crc32c_generic         12288  0
crc32c_intel           16384  4
crc32_pclmul           12288  0
crct10dif_pclmul       12288  1
cryptd                 28672  2 crypto_simd,ghash_clmulni_intel
crypto_simd            16384  1 aesni_intel
drm                   774144  12 drm_kms_helper,drm_display_helper,drm_buddy,thinkpad_acpi,i915,ttm
drm_buddy              20480  1 i915
drm_display_helper    274432  1 i915
drm_kms_helper        253952  2 drm_display_helper,i915
e1000e                368640  0
ehci_hcd              110592  1 ehci_pci
ehci_pci               16384  0
evdev                  28672  25
ext4                 1142784  2
fan                    24576  0
ff_memless             16384  1 xpad
gf128mul               16384  1 aesni_intel
ghash_clmulni_intel    16384  0
i2c_algo_bit           16384  1 i915
i2c_i801               36864  0
i2c_smbus              16384  1 i2c_i801
i915                 4386816  11
intel_cstate           20480  0
intel_pmc_bxt          16384  1 iTCO_wdt
intel_powerclamp       16384  0
intel_rapl_common      53248  1 intel_rapl_msr
intel_rapl_msr         20480  0
intel_uncore          258048  0
irqbypass              12288  1 kvm
iTCO_vendor_support    12288  1 iTCO_wdt
iTCO_wdt               16384  0
jbd2                  200704  1 ext4
joydev                 24576  0
kvm                  1396736  1 kvm_intel
kvm_intel             413696  0
libahci                61440  1 ahci
libarc4                12288  1 mac80211
libata                462848  2 libahci,ahci
lpc_ich                28672  0
lz4_compress           24576  1 zram
lz4hc_compress         20480  1 zram
mac80211             1449984  3 mt76,mt76x2e,mt76x02_lib
mbcache                16384  1 ext4
mc                     94208  4 videodev,videobuf2_v4l2,uvcvideo,videobuf2_common
memconsole             12288  1 memconsole_coreboot
memconsole_coreboot    12288  0
mmc_core              253952  3 sdhci,cqhci,sdhci_pci
Module                  Size  Used by
mt76                  139264  3 mt76x2e,mt76x02_lib,mt76x2_common
mt76x02_lib           102400  2 mt76x2e,mt76x2_common
mt76x2_common          32768  1 mt76x2e
mt76x2e                28672  0
nvram                  16384  1 thinkpad_acpi
pcspkr                 12288  0
platform_profile       12288  1 thinkpad_acpi
psmouse               217088  0
rapl                   20480  0
rc_core                73728  1 cec
rfkill                 40960  4 thinkpad_acpi,cfg80211
scsi_common            16384  4 scsi_mod,sd_mod,libata,sg
scsi_mod              327680  3 sd_mod,libata,sg
sdhci                  86016  1 sdhci_pci
sdhci_pci              98304  0
sd_mod                 81920  2
serio_raw              16384  0
sg                     45056  0
sha1_ssse3             32768  0
sha256_ssse3           32768  0
sha512_ssse3           53248  0
snd                   151552  16 snd_ctl_led,snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,thinkpad_acpi,snd_pcm
snd_ctl_led            24576  0
snd_hda_codec         217088  4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek
snd_hda_codec_generic   114688  1 snd_hda_codec_realtek
snd_hda_codec_hdmi     98304  1
snd_hda_codec_realtek   217088  1
snd_hda_core          143360  5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek
snd_hda_intel          61440  3
snd_hda_scodec_component    20480  1 snd_hda_codec_realtek
snd_hwdep              20480  1 snd_hda_codec
snd_intel_dspcfg       40960  1 snd_hda_intel
snd_intel_sdw_acpi     16384  1 snd_intel_dspcfg
snd_pcm               184320  4 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_core
snd_timer              53248  1 snd_pcm
soundcore              16384  2 snd_ctl_led,snd
sparse_keymap          12288  1 thinkpad_acpi
thinkpad_acpi         163840  0
ttm                   106496  1 i915
uinput                 20480  1
usb_common             16384  4 xhci_hcd,usbcore,uvcvideo,ehci_hcd
usbcore               409600  6 xhci_hcd,ehci_pci,xpad,uvcvideo,ehci_hcd,xhci_pci
uvc                    12288  1 uvcvideo
uvcvideo              155648  0
video                  81920  2 thinkpad_acpi,i915
videobuf2_common       81920  4 videobuf2_vmalloc,videobuf2_v4l2,uvcvideo,videobuf2_memops
videobuf2_memops       16384  1 videobuf2_vmalloc
videobuf2_v4l2         36864  1 uvcvideo
videobuf2_vmalloc      20480  1 uvcvideo
videodev              368640  2 videobuf2_v4l2,uvcvideo
watchdog               49152  1 iTCO_wdt
wmi                    28672  1 video
x86_pkg_temp_thermal    16384  0
xhci_hcd              364544  1 xhci_pci
xhci_pci               24576  0
xpad                   49152  0
zram                   49152  1

--- End code ---

--- Code: ---Devuan$ sudo lsusb
...
Bus 001 Device 006: ID 20d6:2062 PowerA Xbox Series X Wired Controller Black
--- End code ---


--- Code: ---Devuan$ sudo lshw -class input
...
  *-input:2
       product: Generic X-Box pad
       physical id: 4
       logical name: input19
       logical name: /dev/input/event17
       logical name: /dev/input/js0
       capabilities: usb
--- End code ---

What am I missing for this gamepad to work in TCL (i.e., for it to show up in the output of  lshw  and for games to recognize it)?

Rich:
Hi GNUser
Looks like you need modules xpad.ko and ff_memless.ko.

GNUser:
Hi Rich. Yes, I noticed that when I plug the controller in, those two modules appear in the output of lsmod in both Devuan and TCL.

Doesn't this output confirm that those two modules are loaded?


--- Code: ---TCL$ sudo lsmod | sort
Module                  Size  Used by    Not tainted
ac                     12288  0
agpgart                28672  2 intel_gtt,ttm
backlight              12288  4 i915,drm_display_helper,drm,video
battery                16384  0
ccm                    16384  6
cec                    36864  2 i915,drm_display_helper
cfg80211              303104  4 mt76x2_common,mt76x02_lib,mt76,mac80211
cpufreq_conservative    12288  0
cpufreq_powersave      12288  0
cpufreq_userspace      12288  0
cqhci                  20480  1 sdhci_pci
drm                   348160 12 i915,drm_display_helper,drm_kms_helper,ttm,drm_buddy
drm_buddy              16384  1 i915
drm_display_helper    114688  1 i915
drm_kms_helper        102400  2 i915,drm_display_helper
e1000e                167936  0
ff_memless             12288  1 xpad
i2c_i801               24576  0
i2c_smbus              12288  1 i2c_i801
i915                 2289664 345
intel_gtt              16384  1 i915
joydev                 20480  0
loop                   24576 586
lpc_ich                24576  0
mac80211              425984  3 mt76x2e,mt76x02_lib,mt76
mei                    69632  1 mei_me
mei_me                 24576  0
mmc_core              110592  3 sdhci_pci,sdhci,cqhci
mt76                   57344  3 mt76x2e,mt76x2_common,mt76x02_lib
mt76x02_lib            49152  2 mt76x2e,mt76x2_common
mt76x2_common          16384  1 mt76x2e
mt76x2e                20480  0
pcspkr                 12288  0
sdhci                  40960  1 sdhci_pci
sdhci_pci              53248  0
snd                    65536  9 snd_hda_codec_hdmi,snd_ctl_led,snd_hda_codec_realtek,snd_hda_codec_generic,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_timer
snd_ctl_led            20480  0
snd_hda_codec          81920  4 snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_codec_generic,snd_hda_intel
snd_hda_codec_generic    57344  1 snd_hda_codec_realtek
snd_hda_codec_hdmi     49152  1
snd_hda_codec_realtek   118784  1
snd_hda_core           49152  5 snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_codec_generic,snd_hda_intel,snd_hda_codec
snd_hda_intel          28672  0
snd_hda_scodec_component    12288  1 snd_hda_codec_realtek
snd_hwdep              12288  1 snd_hda_codec
snd_intel_dspcfg       12288  1 snd_hda_intel
snd_pcm                86016  4 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_core
snd_timer              24576  1 snd_pcm
soundcore              12288  2 snd_ctl_led,snd
squashfs               40960 293
ttm                    49152  1 i915
uinput                 16384  1
uvc                    12288  1 uvcvideo
uvcvideo               81920  0
video                  57344  1 i915
videobuf2_common       40960  4 uvcvideo,videobuf2_v4l2,videobuf2_vmalloc,videobuf2_memops
videobuf2_memops       12288  1 videobuf2_vmalloc
videobuf2_v4l2         20480  1 uvcvideo
videobuf2_vmalloc      12288  1 uvcvideo
wmi                    16384  1 video
xhci_hcd              114688  1 xhci_pci
xhci_pci               16384  0
xpad                   36864  0
--- End code ---

Rich:
Hi GNUser
I missed that.
But I saw this for Devuan:

--- Code: ---usbcore               409600  6 xhci_hcd,ehci_pci,xpad,uvcvideo,ehci_hcd,xhci_pci
--- End code ---

GNUser:
Hmm, TCL does not seem to have any extension containing "usbcore":


--- Code: ---$ provides.sh usbcore
$
--- End code ---

Maybe  usbcore  is a dependency of  xpad  for Devuan's kernel version (6.12.43) but not for TCL's (6.12.11) for some reason?

"usbcore" does appear in output of dmesg when I plug in the gamepad, even though it does not appear in output of lsmod:

--- Code: ---TCL$ dmesg
...
[  544.800512] usb 2-1.2: new full-speed USB device number 6 using ehci-pci
[  544.902957] input: Generic X-Box pad as /devices/pci0000:00/0000:00:1a.0/usb2/2-1/2-1.2/2-1.2:1.0/input/input17
[  544.903260] usbcore: registered new interface driver xpad

--- End code ---

dmesg  and  lsmod  seem to show the expected things, but  lsusb  and  lshw  do not :-\

Navigation

[0] Message Index

[#] Next page

Go to full version