Tiny Core Linux
Off-Topic => Off-Topic - Tiny Core Lounge => Topic started by: GNUser on December 22, 2025, 09:43:43 PM
-
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:
TCL$ tce-status -i | grep joystick
input-joystick-6.12.11-tinycore64
When I plug in the gamepad in TCL, the xpad kernel module appears in the list of loaded modules:
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
Also, I see the correct VID:PID in the output of lsusb , but no human-friendly description of the gamepad:
TCL$ sudo lsusb
...
Bus 002 Device 007: ID 20d6:2062
lshw doesn't see the gamepad at all:
TCL$ sudo lshw -class input
*-pnp00:05
product: PnP device PNP0303
physical id: 8
capabilities: pnp
configuration: driver=i8042 kbd
Here are the same commands running on Devuan on identical hardware (same laptop, same gamepad plugged in):
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
Devuan$ sudo lsusb
...
Bus 001 Device 006: ID 20d6:2062 PowerA Xbox Series X Wired Controller Black
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
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)?
-
Hi GNUser
Looks like you need modules xpad.ko and ff_memless.ko.
-
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?
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
-
Hi GNUser
I missed that.
But I saw this for Devuan:
usbcore 409600 6 xhci_hcd,ehci_pci,xpad,uvcvideo,ehci_hcd,xhci_pci
-
Hmm, TCL does not seem to have any extension containing "usbcore":
$ provides.sh usbcore
$
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:
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
dmesg and lsmod seem to show the expected things, but lsusb and lshw do not :-\
-
Do I need to manually create /dev/input/js0 for some reason? I'm going to try it even though I'm not optimistic it's going to help.
EDIT: Manually creating /dev/input/js0 didn't help, but that could be because I'm not creating it correctly. Another thought: Is it possible that TCL's xpad kernel module is missing some required functionality?
-
Hi GNUser
Maybe usbcore is built in?
I think you may have to:
dmesg | grep -iE 'VID:PID|X-BOX|other related stuff'for Duvuan and TC and compare what each of them find.
By grepping for just the xbox related stuff you should be able to
see why Devuan works and what TC is missing.
-
Hi GNUser
...Is it possible that TCL's xpad kernel module is missing some required functionality?
You mean like SPI:
CONFIG_JOYSTICK_XPAD=m
CONFIG_JOYSTICK_XPAD_FF=y
CONFIG_JOYSTICK_XPAD_LEDS=y
# CONFIG_JOYSTICK_PSXPAD_SPI is not set
-
I think you may have to:
dmesg | grep -iE 'VID:PID|X-BOX|other related stuff'for Duvuan and TC and compare what each of them find.
Hi Rich. Devuan shows one line more than TCL:
TCL$ dmesg | grep -iE '20d6:2062|x-box|xbox'
[ 14.829527] input: Generic X-Box pad as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/input/input8
Devuan$ sudo dmesg | grep -iE '20d6:2062|x-box|xbox'
[ 30.799826] usb 1-1.2: Product: Xbox Series X Wired Controller Black
[ 30.824141] input: Generic X-Box pad as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/input/input19
-
Hi GNUser
...Is it possible that TCL's xpad kernel module is missing some required functionality?
You mean like SPI:
CONFIG_JOYSTICK_XPAD=m
CONFIG_JOYSTICK_XPAD_FF=y
CONFIG_JOYSTICK_XPAD_LEDS=y
# CONFIG_JOYSTICK_PSXPAD_SPI is not set
Hi Rich. That can't be it, because Devuan treats SPI the same way. This is from Devuan's kernel config:
CONFIG_JOYSTICK_XPAD=m
CONFIG_JOYSTICK_XPAD_FF=y
CONFIG_JOYSTICK_XPAD_LEDS=y
CONFIG_JOYSTICK_WALKERA0701=m
# CONFIG_JOYSTICK_PSXPAD_SPI is not set
-
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
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*
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?
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
-
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?
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.
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?
-
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
-
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.
-
/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.
-
I've poked around Devuan so much that my eyes hurt. I feel like I'm looking for a needle in a haystack and am not optimistic about finding what I'm looking for.
I think our best clues at this point are the output of the lsusb and lshw commands in TCL, which I provided up in the first post of this thread.
I have no further leads at this point, would be grateful for any assistance.
-
Hi GNUser
If you run this on Duvuan:
dmesg > dmesgDuvuan,txtand attach it to your next post, I'll take a look and see if I
can spot anything.
Doing the same for TC would also be helpful.
-
Hi Rich. See attached. The relevant part is at the end--I plug in the gamepad at the 998 timestamp in TCL, 41 timestamp in Devuan.
Note how much more activity from usb occurs in Devuan.
Thank you so much for your help.
-
Hi GNUser
Do I need to manually create /dev/input/js0 ...
Is it possible the device was created as /dev/js0 ?
-
Hi Rich. No /dev/js0, either.
My suspicion is beginning to turn to the controller itself. Maybe the manufacturer makes assumptions about GNU+Linux that aren't true of minimalistic distros.
I think the easiest thing to do at this point is to return these gamepads and purchase Logitech ones instead (used if need be). Every Logitech gamepad I've ever used work out of the box with mednafen on every distro including TCL.
-
well some good news and lots of bad
voidlinux has a joystick udev rule which is a text file that mentions hwdb.....and not sure how devuan rules for joystick are....but on voidlinux init=runit it is using a fork of systemd for a package called eudev
and it appears to have a hwdb.bin under /etc/udev and I have been unable to run strings /path/file | grep 20d6 or 20D6 to get any hits.
I get no hits searching for hwdb but instead I have a hit for a file called /usr/lib/udev/hwdb.d/70-joystick.hwdb and its text file but me thinks it would be a distraction to post here when you lack the hwdb files to begin with.
We do have our own hdwb TCE but its not the same and its usb ids do not appear to have your vendor product ids
Maybe you can look to see if Devuan has 70-joystick.rules and if that is the reason you have more success there?
-
Manually creating /dev/input/js0 didn't help, but that could be because I'm not creating it correctly.
https://www.kernel.org/doc/html/latest/input/joydev/joystick.html#device-nodes
-
Hi Rich and aus9. I returned the gamepad to the store, so cannot investigate this further.
While my kids have fun with logitech gamepads, I will educate myself about gamepads on linux and will take another stab at this (getting xbox gamepads to work on TCL) at some later date.
Happy hacking!
-
I have a gamepad that works on another distro but not on TC64 16x too. K config line 6711 for TC is
CONFIG_USB=y
while on voidlinux its CONFIG_USB=m
IMHO this explains why I was unable to use on TC as its inbuilt and next command fails sudo modprobe usbcore while on void I have
$ modinfo xpad | grep depends
depends: usbcore,ff-memless I have a 6 core CPU and am going to recompile and see if my gamepad is visible in the same game that its visible on void. As I want to submit that game if things work out.
I am not a coder but can not see any mention of the following search terms in the C file
"depends usbcore" at
https://raw.githubusercontent.com/torvalds/linux/refs/heads/master/drivers/input/joystick/xpad.c
2) A number of gamepads have a mode button. I have a device I can not name here....but it defaults to a mode that claims to be a certain manufacturer....when if I press the mode button for 5 seconds it shows up with its true usb ids.....still no joy in the my test game on TC ....game plays as expected on void
-
When set to “y” it means the driver is built into the kernel, rather than a module. The xpad driver is a usb driver, so of course it needs usbcore ( anything usb related needs usbcore, which is why it’s built in).
Do you get any symbol errors when “modprobe xpad”?
This could just be a udev issue. Do you need special rulesets for xpad?
-
Hi Paul_123
agreed inbuilt on TC for usbcore. On TC if I boot up....I have alsa which loads input-joystick-KERNEL and dmesg does not show up my gamepad, that is why I plan to rebuild our kernel and generate the usbcore as a module. Here is the relevant line for dmesg for my gamepad on other distro.....after I insert usb cable
[ 711.916395] usbcore: registered new interface driver xpad
I agree, it could be a udev rule so here is the other distro rule
70-joystick.rules
# do not edit this file, it will be overwritten on update
ACTION=="remove", GOTO="joystick_end"
ENV{ID_INPUT_JOYSTICK}=="", GOTO="joystick_end"
KERNEL!="event*", GOTO="joystick_end"
# joystick:<bustype>:v<vid>p<pid>:name:<name>:*
KERNELS=="input*", ENV{ID_BUS}!="", \
IMPORT{builtin}="hwdb 'joystick:$env{ID_BUS}:v$attr{id/vendor}p$attr{id/product}:name:$attr{name}:'", \
GOTO="joystick_end"
LABEL="joystick_end"
Notice it mentions hwdb in this rule?
This appears to come from a kind of udev that this distro uses called eudev
https://github.com/void-linux/void-packages/blob/master/srcpkgs/eudev/template
To save you clicking link, this IMHO relevant lines
configure_args="--enable-hwdb --enable-manpages"
https://github.com/eudev-project/eudev
I have no idea if this type of udev could work with a BSD type.
It seems that this joystick rule depending on hwdb and so its man page is visible here
https://www.man7.org/linux/man-pages/man7/hwdb.7.html
I want to make it clear....I am not asking any dev member to convert to eudev.
and ....voidlinux does not use systemd....it uses runit
I find /lib/udev/hwdb.d/70-joystick.hwdb which is a text file and instead of posting full contents this seems relevant
Note: The format of the "joystick:" prefix match key is a contract between the rules file and the hardware data
and so I have
file /etc/udev/hwdb.bin
/etc/udev/hwdb.bin: data
My plan is...with luck today.....rebuild the kernel to not inbuild usbcore and generate usbcore as a module
I am happy to be regarded as an idiot as I have made numerous mistakes in the past.
But my goal is try and get my gamepad working on TC....knowing it works on another distro
Thanks for reading ...I will report back if I succeed or fail
-
Run “udevadm monitor” then plugin the pad.
What does lsusb show. Use the full version, not the busybox version
What is the usbid of the game pad.
-
I have failed to compile kernel...for reasons I know not.
After copying .config to my build dir
file:///home/tc/1builds/KERNEL/linux-6.12.11/.config was editted to
CONFIG_USB=y -> CONFIG_USB=m
and after I ran make -j6 bzImage # 8 minutes
I went back to just to check my .config and it has reverted
Feel free to have a laugh. I have built external modules in the past.
I did not attempt to run make -j6 modules with that bad config as the kernel would still have usbcore inbuilt
-
It’s because other kernel drivers that require usbcore are also set to “y” so that forces usbcore to be “y” as well.
it would be best for you to use make menuconfig, and make sure all usb stuff is set to “M”. But then you will likely need to include the modules in the initrd too.
But the kernel is not your problem, it’s a missing driver or udev interaction, or user space driver
-
sorry you were too fast for me....here are your requests
Firstly all modes I refer to ....controller not detected...the game works without a controller I can use kb and mouse image....if interested expires in one week....its the same image no matter what mode I put this gamepad
https://i.postimg.cc/0y4sDCpN/screenshot-1228114912.png
now for the udevadm monitor request(s) done in separate posts
this post....insert controller yet to change mode
udevadm monitor
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent
KERNEL[12519.963307] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)
KERNEL[12519.973386] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0 (usb)
KERNEL[12519.980796] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0575.0008 (hid)
KERNEL[12519.980926] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0575.0008/input/input21 (input)
KERNEL[12520.032609] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0575.0008/input/input21/event14 (input)
KERNEL[12520.032638] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0575.0008/hidraw/hidraw1 (hidraw)
KERNEL[12520.032651] bind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0575.0008 (hid)
KERNEL[12520.032665] bind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0 (usb)
KERNEL[12520.032716] bind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)
KERNEL[12520.048927] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0575.0008/input/input21/event14 (input)
KERNEL[12520.079356] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0575.0008/input/input21 (input)
KERNEL[12520.079390] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0575.0008/hidraw/hidraw1 (hidraw)
KERNEL[12520.079404] unbind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0575.0008 (hid)
KERNEL[12520.079421] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0575.0008 (hid)
KERNEL[12520.079434] unbind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0 (usb)
KERNEL[12520.079448] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0 (usb)
KERNEL[12520.081682] unbind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)
KERNEL[12520.081711] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)
UDEV [12520.202834] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)
UDEV [12520.206267] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0 (usb)
UDEV [12520.209098] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0575.0008 (hid)
UDEV [12520.209377] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0575.0008/hidraw/hidraw1 (hidraw)
UDEV [12520.211919] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0575.0008/input/input21 (input)
UDEV [12520.212563] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0575.0008/input/input21/event14 (input)
UDEV [12520.212732] bind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0575.0008 (hid)
UDEV [12520.212868] bind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0 (usb)
UDEV [12520.213038] bind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)
UDEV [12520.213175] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0575.0008/hidraw/hidraw1 (hidraw)
UDEV [12520.213268] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0575.0008/input/input21/event14 (input)
UDEV [12520.213430] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0575.0008/input/input21 (input)
UDEV [12520.213537] unbind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0575.0008 (hid)
UDEV [12520.213590] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0575.0008 (hid)
UDEV [12520.213674] unbind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0 (usb)
UDEV [12520.213715] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0 (usb)
UDEV [12520.213831] unbind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)
UDEV [12520.213912] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)
KERNEL[12520.931118] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)
KERNEL[12520.944450] change /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)
KERNEL[12520.944491] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0 (usb)
KERNEL[12520.944562] bind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)
UDEV [12520.944964] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)
UDEV [12520.945268] change /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)
UDEV [12520.948068] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0 (usb)
UDEV [12520.948350] bind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)
KERNEL[12521.039277] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0 (usb)
UDEV [12521.039457] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0 (usb)
KERNEL[12521.041075] unbind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)
KERNEL[12521.041087] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)
UDEV [12521.162833] unbind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)
UDEV [12521.163000] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)
KERNEL[12521.883265] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)
KERNEL[12521.897567] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0 (usb)
KERNEL[12521.903896] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0526.0009 (hid)
KERNEL[12521.903918] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0526.0009/input/input22 (input)
KERNEL[12521.955925] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0526.0009/input/input22/event14 (input)
KERNEL[12521.955961] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0526.0009/hidraw/hidraw1 (hidraw)
KERNEL[12521.955977] bind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0526.0009 (hid)
KERNEL[12521.955996] bind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0 (usb)
KERNEL[12521.956076] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.1 (usb)
KERNEL[12521.960988] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.1/0003:2563:0526.000A (hid)
KERNEL[12521.961080] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.1/0003:2563:0526.000A/input/input23 (input)
KERNEL[12522.012240] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.1/0003:2563:0526.000A/input/input23/event15 (input)
KERNEL[12522.012271] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.1/0003:2563:0526.000A/input/input24 (input)
KERNEL[12522.012312] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.1/0003:2563:0526.000A/input/input24/event16 (input)
KERNEL[12522.012343] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.1/0003:2563:0526.000A/hidraw/hidraw2 (hidraw)
KERNEL[12522.012377] bind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.1/0003:2563:0526.000A (hid)
KERNEL[12522.012395] bind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.1 (usb)
KERNEL[12522.012447] bind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)
UDEV [12522.012987] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)
UDEV [12522.013229] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0 (usb)
UDEV [12522.013242] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.1 (usb)
UDEV [12522.013485] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0526.0009 (hid)
UDEV [12522.013498] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.1/0003:2563:0526.000A (hid)
UDEV [12522.013751] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0526.0009/hidraw/hidraw1 (hidraw)
UDEV [12522.014446] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.1/0003:2563:0526.000A/hidraw/hidraw2 (hidraw)
UDEV [12522.016834] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0526.0009/input/input22 (input)
UDEV [12522.017009] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.1/0003:2563:0526.000A/input/input24 (input)
UDEV [12522.017038] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.1/0003:2563:0526.000A/input/input23 (input)
UDEV [12522.019266] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.1/0003:2563:0526.000A/input/input23/event15 (input)
UDEV [12522.019447] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.1/0003:2563:0526.000A/input/input24/event16 (input)
UDEV [12522.019624] bind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.1/0003:2563:0526.000A (hid)
UDEV [12522.019757] bind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.1 (usb)
UDEV [12522.021054] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0526.0009/input/input22/event14 (input)
UDEV [12522.021198] bind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0526.0009 (hid)
UDEV [12522.021312] bind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0 (usb)
UDEV [12522.021567] bind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)
/usr/local/bin/lsusb
Bus 001 Device 010: ID 2563:0575 ShenZhen ShanWan Technology Co., Ltd. ZD-V+ Wired Gaming Controller
-
change mode xinput
KERNEL[12752.355903] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0526.0009/input/input22/event14 (input)
UDEV [12752.356470] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0526.0009/input/input22/event14 (input)
KERNEL[12752.382210] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0526.0009/input/input22 (input)
KERNEL[12752.382234] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0526.0009/hidraw/hidraw1 (hidraw)
KERNEL[12752.382262] unbind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0526.0009 (hid)
KERNEL[12752.382277] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0526.0009 (hid)
KERNEL[12752.382321] unbind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0 (usb)
KERNEL[12752.382336] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0 (usb)
UDEV [12752.382530] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0526.0009/input/input22 (input)
UDEV [12752.382605] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0526.0009/hidraw/hidraw1 (hidraw)
KERNEL[12752.462215] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.1/0003:2563:0526.000A/input/input23/event15 (input)
UDEV [12752.462776] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.1/0003:2563:0526.000A/input/input23/event15 (input)
KERNEL[12752.505879] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.1/0003:2563:0526.000A/input/input23 (input)
UDEV [12752.506199] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.1/0003:2563:0526.000A/input/input23 (input)
KERNEL[12752.555871] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.1/0003:2563:0526.000A/input/input24/event16 (input)
UDEV [12752.556345] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.1/0003:2563:0526.000A/input/input24/event16 (input)
KERNEL[12752.582294] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.1/0003:2563:0526.000A/input/input24 (input)
KERNEL[12752.582331] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.1/0003:2563:0526.000A/hidraw/hidraw2 (hidraw)
KERNEL[12752.582345] unbind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.1/0003:2563:0526.000A (hid)
KERNEL[12752.582390] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.1/0003:2563:0526.000A (hid)
KERNEL[12752.582430] unbind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.1 (usb)
KERNEL[12752.582442] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.1 (usb)
UDEV [12752.582630] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.1/0003:2563:0526.000A/input/input24 (input)
UDEV [12752.583011] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.1/0003:2563:0526.000A/hidraw/hidraw2 (hidraw)
KERNEL[12752.584507] unbind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)
UDEV [12752.584521] unbind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0526.0009 (hid)
KERNEL[12752.584536] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)
UDEV [12752.584546] unbind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.1/0003:2563:0526.000A (hid)
UDEV [12752.584654] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0526.0009 (hid)
UDEV [12752.584667] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.1/0003:2563:0526.000A (hid)
UDEV [12752.706051] unbind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0 (usb)
UDEV [12752.706080] unbind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.1 (usb)
UDEV [12752.706157] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0 (usb)
UDEV [12752.706168] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.1 (usb)
UDEV [12752.706469] unbind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)
UDEV [12752.706610] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)
KERNEL[12753.258602] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)
KERNEL[12753.267127] change /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)
KERNEL[12753.267178] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0 (usb)
KERNEL[12753.267262] bind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)
UDEV [12753.267689] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)
UDEV [12753.268051] change /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)
UDEV [12753.270997] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0 (usb)
UDEV [12753.271433] bind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)full usb changes to
lsusb changes to
Bus 001 Device 009: ID 045e:028e Microsoft Corp. Xbox360 Controller
-
change mode to DINPUT
KERNEL[12985.744906] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0 (usb)
UDEV [12985.745076] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0 (usb)
KERNEL[12985.747151] unbind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)
KERNEL[12985.747197] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)
UDEV [12985.869431] unbind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)
UDEV [12985.869599] remove /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)
KERNEL[12986.589340] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)
KERNEL[12986.601722] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0 (usb)
KERNEL[12986.608033] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0575.000B (hid)
KERNEL[12986.608168] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0575.000B/input/input25 (input)
KERNEL[12986.659162] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0575.000B/input/input25/event14 (input)
KERNEL[12986.659195] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0575.000B/hidraw/hidraw1 (hidraw)
KERNEL[12986.659211] bind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0575.000B (hid)
KERNEL[12986.659226] bind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0 (usb)
KERNEL[12986.659271] bind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)
UDEV [12986.659776] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)
UDEV [12986.660013] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0 (usb)
UDEV [12986.660253] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0575.000B (hid)
UDEV [12986.660694] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0575.000B/hidraw/hidraw1 (hidraw)
UDEV [12986.664119] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0575.000B/input/input25 (input)
UDEV [12986.668536] add /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0575.000B/input/input25/event14 (input)
UDEV [12986.669069] bind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0/0003:2563:0575.000B (hid)
UDEV [12986.669300] bind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4/1-4:1.0 (usb)
UDEV [12986.669619] bind /devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-4 (usb)
full ids are 2563:0575
-
change mode to DINPUT simulation mode
no change to udevadm monitor
ids are ID 2563:0575
-
But the kernel is not your problem, it’s a missing driver or udev interaction, or user space driver
I don't have a problem not being able to build the K and its modules correctly to get usbcore.
Based on your answer....I will wait to see if anyone, including you can spot something we have not discussed....and because the game works....and its open source not any naughty wad licence issues etc
I plan to submit it for checking in a week from now....if its rejected I have to accept reality
thankyou for your time and expertise in spotting its not what I thought it was.
-
I have failed to compile kernel...for reasons I know not.
After copying .config to my build dir
file:///home/tc/1builds/KERNEL/linux-6.12.11/.config was editted to
CONFIG_USB=y -> CONFIG_USB=m
and after I ran make -j6 bzImage # 8 minutes
I went back to just to check my .config and it has reverted
Feel free to have a laugh. I have built external modules in the past.
I did not attempt to run make -j6 modules with that bad config as the kernel would still have usbcore inbuilt
I don't laugh about another's problems, I tries to solve them. :)
My best suggestion of what to do is to run make menuconfig and search for USB(with the "/" key)
And get the "Selected by [n]: " to determined whats config that's selects the CONFIG_USB.
-
hi patrikg
Paul_123 is suggesting my issue is not the kernel with inbuilt usbcore.
I will defer to his judgement. As I said...I can play the game without a controller so its not the end of the world.
I am interested if anyone on TC x86_64 has a working gamepad tho.
-
That all looks like it’s working, so then that might point to a user space driver issue.
I wonder if something like evtest would show what/if data is coming from the input devices.
-
Hi aus9
I agree with Paul_123, I don't think it's because CONFIG_USB is built in.
However, for future reference, Paul_123 and patrikg are absolutely
correct about using make menuconfig if you wish to make changes
to the .config file. The .config file is too complex to edit manually.
There are interactions between CONFIG_ options, including:
Certain options behave as a group:
if one is built in, all must be built in.
If one is a module, all must be modules.
Some options force other options to be enabled or disabled.
Some options control whether other categories of options can be accessed:
CONFIG_USB_SUPPORT=y makes usb options accessible.
I'll end this by saying I personally would never edit .config manually.
-
Hi aus9
... I wonder if something like evtest would show what/if data is coming from the input devices.
If you want to see the data coming from the controller, try this:
udevadm monitor --property > xbox.txt
Then plug in the controller.
wait 5 or 10 seconds, then:
Ctrl-C
If you look at xbox.txt, you should find KERNEL events:
KERNEL[1299700.962279] add /devices/pci0000:00/0000:00:1d.7/usb1/1-5/1-5:1.0/host7/scsi_host/host7 (scsi_host)
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb1/1-5/1-5:1.0/host7/scsi_host/host7
SEQNUM=10672
SUBSYSTEM=scsi_host
UDEV_LOG=3
and UDEV events:
UDEV [1299700.964345] add /devices/pci0000:00/0000:00:1d.7/usb1/1-5/1-5:1.0/host7/scsi_host/host7 (scsi_host)
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb1/1-5/1-5:1.0/host7/scsi_host/host7
SEQNUM=10672
SUBSYSTEM=scsi_host
UDEV_LOG=3
USEC_INITIALIZED=1299700964241(The above are examples, not actual xbox events).
I don't know how many events that will create, but I wrote a script that
lets you find the events that interest you. I will attach a copy.
... I agree, it could be a udev rule so here is the other distro rule
70-joystick.rules
# do not edit this file, it will be overwritten on update
ACTION=="remove", GOTO="joystick_end"
ENV{ID_INPUT_JOYSTICK}=="", GOTO="joystick_end"
KERNEL!="event*", GOTO="joystick_end"
# joystick:<bustype>:v<vid>p<pid>:name:<name>:*
KERNELS=="input*", ENV{ID_BUS}!="", \
IMPORT{builtin}="hwdb 'joystick:$env{ID_BUS}:v$attr{id/vendor}p$attr{id/product}:name:$attr{name}:'", \
GOTO="joystick_end"
LABEL="joystick_end" ...
It appears to be looking for KERNEL events that have both
ID_INPUT_JOYSTICK and ID_BUS present in them.
So if udevadm returned a lot of events, you can try reducing the clutter
by searching for events that contain items of interest, for example:
./RecordScan.sh xbox.txt KERNEL 'ID_INPUT_JOYSTICK' 'ID_BUS'
-
That all looks like it’s working, so then that might point to a user space driver issue.
Yes and my fault for not reporting earlier results that I knew....but we got there eventually. So this is why I won't pursue Rich suggestion. I have built linuxconsoletools that contain jstest.....a cli tester of pressing buttons or triggers. And I planned to submit it.....depending on what we discovered here.
I built a GUI that fails on wayland but show the Xorg output here. Image expires in one week. I did not need to screenshot the terminal output but the terminal output is a little like jstest.
https://i.postimg.cc/fLH4jbfk/screenshot-1226140509.png
If you look at the GUI image if interested, I have held up the left stick and screenshot. GUI can also map....but I have not mapped a keyboard button which is why you are seeing "No Key"
At the risk of repeating myself.....I knew that I could see joystick/gamepad events. What I did not compute was that my failure to see any controller is because either:
(a) have built the game poorly, or
(b) the game is looking for something that I have not compiled....or
(c) the game developer is expecting a different environment and so is not giving me the information I need to make the userland package work with a gamepad.
There may be more permutations. But in compiling the various games I never saw an output saying I was missing something....or equally it would bork if I was missing something the developer wanted....so I am stumped on this userland reality.
I tried to use a gamepad with some of the other games I build where I mention
input-joystick-KERNEL. EG I built abe in jan 2025 and did not own a gamepad at time of build. I can not get the gamepad recognised. I am still interested if anyone on either x86 x86_64 or RPi has any gamepad/joystick working. I could then build the game (privately or submit) once I know what I am doing.
-
Rich
Certain options behave as a group:
if one is built in, all must be built in.
If one is a module, all must be modules.
hmm then maybe we need to look at the 64 if that is a rule I can see potential configs that conflict?
Groups below indicate consecutive lines....a non-exhaustive list of lines
CONFIG_USB_NET_DRIVERS=y
CONFIG_USB_CATC=m
CONFIG_USB_KC2190=y
CONFIG_USB_NET_ZAURUS=m
# end of Surface System Aggregator Module HID support
CONFIG_SURFACE_HID_CORE=m
CONFIG_USB_OHCI_LITTLE_ENDIAN=y
CONFIG_USB_SUPPORT=y
CONFIG_USB_COMMON=y
CONFIG_USB_LED_TRIG=y
# CONFIG_USB_ULPI_BUS is not set
# CONFIG_USB_CONN_GPIO is not set
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB=y
CONFIG_USB_PCI=y
CONFIG_USB_PCI_AMD=y
# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
-
Hi aus9
It has nothing to do with where they show up in the .config file.
It's about module dependencies and resolving the symbols of
those modules. Loadable modules can resolve those symbols
when those modules and their dependencies get loaded.
When a module gets compiled into the kernel, its dependencies
get compiled in too and symbols get resolved somewhere in the
compile and link process.
... I went back to just to check my .config and it has reverted ...
After you copy .config to your build directory, you want to:
make oldconfig
make menuconfigThe first line reads the current configuration to use as a starting point.
The second line is where you use the menu system to make any changes.
-
Hello, Rich, Paul_123, aus9. I got my hands on another one of these xbox gamepads, to take another stab at solving this.
I'm comparing the behavior of a fully updated TCL16 x86_64 frugal install vs. fully updated Devuan Excalibur install. Same gamepad, same laptop (X230 Thinkpad), same game.
What's the same for TCL16 and Devuan:
1. xpad kernel module is automatically loaded and /dev/input/js0 is automatically created when I plugin the gamepad
2. I see activity in the terminal when I run jstest /dev/input/js0 and press buttons on the gamepad
What's different for TCL16 vs. Devuan:
1. Random game from gog.com (Baldur's Gate: Dark Alliance) is perfectly playable with gamepad when running in Devuan, but the game does not respond to any gamepad button presses when running in TCL
Note that the game otherwise works well in TCL (smooth video and sound) and is playable with the keyboard, although using the keyboard for this game is really not what we want.
I see in this thread that udev rules have been suggested as a possible culprit. Based on the output of udevadm test in both Devuan and TCL (see attached), I think udev rules may be innocent. What other possibilities should we investigate?
-
perhaps this may have clues:
https://www.reddit.com/r/linux_gaming/comments/l1ty23/getting_a_generic_xboxone_gamepad_to_work_on_linux/
-
Hi gadget42. Thanks for the link. That user's problem was that his system didn't have any driver listed for the gamepad in the output of lsusb -t . I don't think that's my problem, though, since I am seeing a driver (xpad) listed:
TCL$ lsusb -t
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
|__ Port 2: Dev 2, If 0, Class=Vendor Specific Class, Driver=xpad, 12M # xpad appears here as expected
...
-
I know you have dismissed udev rules but I have not...hehe
your non-logitech device has a rule here
https://codeberg.org/fabiscafe/game-devices-udev/src/branch/main/71-powera-controllers.rules
but when you look at main page https://codeberg.org/fabiscafe/game-devices-udev
it claims it changed to support systemd
so downloading the tag 6 months ago and looking at that rule we have
# PowerA Wired Controller for Nintendo Switch; USB
KERNEL=="hidraw*", ATTRS{idVendor}=="20d6", ATTRS{idProduct}=="a711", MODE="0660", TAG+="uaccess"
# PowerA Zelda Wired Controller for Nintendo Switch; USB
KERNEL=="hidraw*", ATTRS{idVendor}=="20d6", ATTRS{idProduct}=="a713", MODE="0660", TAG+="uaccess"
# PowerA Wireless Controller for Nintendo Switch; Bluetooth
# We have to use ATTRS{name} since VID/PID are reported as zeros.
# We use /bin/sh instead of udevadm directly becuase we need to
# use '*' glob at the end of "hidraw" name since we don't know the index it'd have.
# Thanks @https://github.com/ValveSoftware
KERNEL=="input*", ATTRS{name}=="Lic Pro Controller", RUN{program}+="/bin/sh -c 'udevadm test-builtin uaccess /sys/%p/../../hidraw/hidraw*'"
I have yet to try it ...GNUser want to edit it to see if it works?
"uaccess" might refer to using elogind?
-
Hi aus9. My PowerA gamepad is for xbox, not nintendo switch. Also, Devuan does not have this (or similar) udev rule and the gamepad works with my test game just fine.
-
Hi GNUser
I noticed a couple of things present in Devuan.txt that might be
pertinent that are not present in TCL.txt.
Devuan includes these rules:
51-these-are-not-joysticks-rm.rules
60-input-id.rules
60-joystick.rules
70-joystick.rules
I also noticed libmtp.rules and mtp-probe (both provided by libmtp.tcz):
69-libmtp.rules
PROGRAM '/usr/lib/udev/mtp-probe /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2 3 2' /usr/lib/udev/rules.d/69-libmtp.rules:34
starting '/usr/lib/udev/mtp-probe /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2 3 2'
'/usr/lib/udev/mtp-probe /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2 3 2'(out) '0'
'/usr/lib/udev/mtp-probe /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2 3 2' [6852] exit with return code 0
-
and a correction to my musing
"uaccess" might refer to using elogind?
Nope I did an apps provide search to come up with that.....I now lean towards
https://github.com/torvalds/linux/blob/master/include/linux/uaccess.h
find /lib/modules/ -name uaccess* # no hitsapps provides search uaccess.ko.gz no hits
but we do have that header
tc@box:~/1builds/KERNEL/linux-6.12.11$ find include/ -name uaccess.h
include/linux/uaccess.h
include/asm-generic/uaccess.h
-
My PowerA gamepad is for xbox, not nintendo switch.
Yes I know....but a number of devices that work for various consoles can be used on an intel/amd PC
https://wiki.debian.org/Gamepad#Xbox_and_PlayStation_controllers
-
Hi
I know that devuan is not debian but have seen https://packages.debian.org/trixie/xboxdrv
support for Xbox1 gamepads, Xbox360 USB gamepads and Xbox360 wireless gamepads. The Xbox360 guitar and some Xbox1 dancemats might work too
upstream broken link https://gitlab.com/xboxdrv/xboxdrv/
I have joined github to provide feedback to woodland developer and then used those creditials to get into gitlab and cloned someone else's clone.
Do you want it if you have not already tried it?
-
ok half built xboxdrv but getting nowhere fast with the python script....the elfs seem to work ok but no controller visible in my game still. If interested here is what I have done....allegedly in accordance with the readme for xboxdrv
$ sudo modprobe uinput
$ sudo /usr/local/etc/init.d/dbus restart
(Your web browser may need to be restarted)
I injected a new dbus file into /usr/local/etc/dbus-1/system.d/org.seul.Xboxdrv.conf
without it....initial error on running a python script has "The name org.seul.Xboxdrv was not provided by any .service files"
dbus file contents are<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<policy context="default">
<allow own="org.seul.Xboxdrv"/>
</policy>
</busconfig>
Now we have xboxdrvctl -S
Traceback (most recent call last):
File "/usr/local/bin/xboxdrvctl", line 68, in <module>
bus = dbus.SessionBus()
File "/usr/local/lib/python3.9/site-packages/dbus/_dbus.py", line 209, in __new__
return Bus.__new__(cls, Bus.TYPE_SESSION, private=private,
File "/usr/local/lib/python3.9/site-packages/dbus/_dbus.py", line 99, in __new__
bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
File "/usr/local/lib/python3.9/site-packages/dbus/bus.py", line 120, in __new__
bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
dbus.exceptions.DBu.ception: org.freedesktop.DBus.Error.FileNotFound: Failed to connect to socket /tmp/dbus-cpGDL1Glu5: No such file or directory
tc@box:~$ ls /tmp/dbus*
ls: cannot access '/tmp/dbus*': No such file or directory
I have loaded dbus-python3.9 so the issue looks like I need to kill dbus then load this TCE then load the module
and then try the python script?
my brain hurts....I have run out of xmas cheer (beer) ;)
-
yikes on reboot...I have no module=uinput....somehow I failed to spot it not loading
There is a header for it tho under source
/linux-6.12.11//include/uapi/linux/uinput.h
-
Hi GNUser
I noticed a couple of things present in Devuan.txt that might be
pertinent that are not present in TCL.txt.
Devuan includes these rules:
51-these-are-not-joysticks-rm.rules
60-input-id.rules
60-joystick.rules
70-joystick.rules
I also noticed libmtp.rules and mtp-probe (both provided by libmtp.tcz):
69-libmtp.rules
PROGRAM '/usr/lib/udev/mtp-probe /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2 3 2' /usr/lib/udev/rules.d/69-libmtp.rules:34
starting '/usr/lib/udev/mtp-probe /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2 3 2'
'/usr/lib/udev/mtp-probe /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2 3 2'(out) '0'
'/usr/lib/udev/mtp-probe /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2 3 2' [6852] exit with return code 0
Hi Rich. Your tips above got my hopes up...but still no joy.
I copied the four udev rules you identified from Devuan to TCL's /etc/udev/rules.d then I ran these commands:
$ tce-load -wil libmtp
$ sudo udevadm control --reloadThen I tried the game again. Alas, the game still does not respond to any button presses :(
-
Hi GNUser
Did you run:
sudo udevadm test /sys/bus/usb/devices/3-2
Did it show mtp-probe being run:
PROGRAM '/usr/lib/udev/mtp-probe /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2 3 2' /usr/lib/udev/rules.d/69-libmtp.rules:34
starting '/usr/lib/udev/mtp-probe /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2 3 2'
'/usr/lib/udev/mtp-probe /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2 3 2'(out) '0'
'/usr/lib/udev/mtp-probe /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2 3 2' [6852] exit with return code 0
-
Ok, friends, finally some progress!
If I run the game in TCL with sudo then the gamepad WORKS!! No need for libmtp or supplemental udev rules.
But of course this is not a solution: It just suggests what the underlying problem might be.
I checked in Devuan and I am not part of an "input" group:
Devuan$ id
uid=1000(bruno) gid=1000(bruno) groups=1000(bruno),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),102(netdev),108(bluetooth)
I tried this in TCL...
TCL$ sudo chown bruno:staff /dev/input
TCL$ sudo chown bruno:staff /dev/input/js0
...but found that running the game with sudo is still needed for gamepad to work.
Any suggestions what needs to be done in order for the gamepad to be usable in TCL without running the game with sudo?
EDIT: In TCL I also tried loading polkit, starting dbus, then starting polkitd. Alas, no change--sudo still required for the game to respond to gamepad input.
-
Hi aus9
yikes on reboot...I have no module=uinput.... ...
uinput.ko.gz is part of the base install.
You should find it under:
/lib/modules/6.12.11-tinycore64/kernel/drivers/input/misc/uinput.ko.gz
... somehow I failed to spot it not loading ...
Unless another loaded module depends on it, you need to load it yourself.
-
brain fade sorry
I must have loaded it the first time....and I think I mis-spelt the second time, time for bed
-
Hi GNUser
... Did it show mtp-probe being run:
PROGRAM '/usr/lib/udev/mtp-probe /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2 3 2' /usr/lib/udev/rules.d/69-libmtp.rules:34
----- Snip -----
Just realized, in Tinycore, mtp-probe is in:
/lib/udev/mtp-probe
... I checked in Devuan and I am not part of an "input" group:
Devuan$ id
uid=1000(bruno) gid=1000(bruno) groups=1000(bruno),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),102(netdev),108(bluetooth) ...
plugdev looks interesting.
... ...but found that running the game with sudo is still needed for gamepad to work. ...
If you run without sudo, shouldn't syslog (/var/log/messages) show an error?
-
Hi Rich.
plugdev looks interesting.
I agree that I need to explore ownerships a bit more. I see this in Devuan:
Devuan$ ls -ld /dev/input
drwxr-xr-x 4 root root 540 Dec 30 09:35 /dev/input
Devuan$ ls -l /dev/input/js0
crw-rw-r--+ 1 root input 13, 0 Dec 30 09:35 /dev/input/js0
If you run without sudo, shouldn't syslog (/var/log/messages) show an error?
Hi Rich. No. If I run with sudo, this appears in /var/log/messages as expected:
TCL$ cat /var/log/messages
...
Dec 30 09:28:41 x230 authpriv.notice sudo: bruno : TTY=pts/1 ; PWD=/home/bruno ; USER=root ; ENV=ENV=/home/bruno/.ashrc ; COMMAND=Games/GOG Games/Baldurs Gate Dark Alliance/start.shIf I run the game without sudo, no new lines (errors or otherwise) appear in /var/log/messages
-
I think the problem in TCL has something to do with ACL.
When I plug the controller in, this appears in /var/log/messages (strangely, the time in the ACL-related timestamps is incorrect):
Dec 30 09:43:36 x230 kern.info kernel: usb 3-2: new full-speed USB device number 2 using xhci_hcd
Dec 30 09:43:36 x230 kern.info kernel: input: Generic X-Box pad as /devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0/input/input17
Dec 30 09:43:36 x230 kern.info kernel: usbcore: registered new interface driver xpad
Dec 30 14:43:36 x230 daemon.err elogind-uaccess-command[7313]: Failed to apply ACL: Operation not supported
Dec 30 14:43:36 x230 daemon.err elogind-uaccess-command[7314]: Failed to apply ACL: Operation not supported
Also, note in my previous post how /dev/input/js0 in Devuan has a + in the permissions, whereas in TCL there is no +
TCL$ ls -l /dev/input/js0
crw-r--r-- 1 root root 13, 0 Dec 30 09:43 /dev/input/js0Does TCL support ACL (access control lists)?
EDIT: I was surprised to find that acl.tcz is already loaded (it must be a dependency of one of my extensions):
$ tce-status -i | grep acl
aclMaybe my root filesystem needs to be mounted with the acl option? How would I do that?
-
Hi GNUser
... Also, note in my previous post how /dev/input/js0 in Devuan has a + in the permissions, whereas in TCL there is no +
TCL$ ls -l /dev/input/js0
crw-r--r-- 1 root root 13, 0 Dec 30 09:43 /dev/input/js0 ...
I did not notice that. It's like an extra bit appended to the permissions field.
I searched my entire /dev directory and could not find a single plus sign anywhere.
I did notice your js0 is "root root" while Devuan is set as "root input"
-
Hi GNUser
I've never had to deal with ACLs, but this suggests that's what
the plus sign indicates:
https://serverfault.com/questions/227852/what-does-a-mean-at-the-end-of-the-permissions-from-ls-l
-
Hi GNUser
... I did notice your js0 is "root root" while Devuan is set as "root input"
And Devuan has rw for group permissions.
-
I did notice your js0 is "root root" while Devuan is set as "root input"
Hi Rich. Yes, I noticed the "root input" ownership of /dev/input/js0 in Devuan. But since I'm not part of the input group in Devuan, I think it's ACL and the extra + permission bit that's allowing my normal user to use input device without sudo.
Here https://wiki.archlinux.org/title/Access_Control_Lists#Enable_ACL it says that filesystem must be mounted with the acl option for ACL to work. My frugal TCL install is in /dev/sda1...
TCL$ cat /etc/fstab
# /etc/fstab
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
devpts /dev/pts devpts defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
/dev/zram0 swap swap defaults,noauto 0 0
/dev/sda1 /mnt/sda1 ext4 noauto,users,exec 0 0 # Added by TC
/dev/sda2 /mnt/sda2 ext4 noauto,users,exec 0 0 # Added by TC
/dev/sda3 /mnt/sda3 ext4 noauto,users,exec 0 0 # Added by TC
/dev/sda4 /mnt/sda4 ext4 noauto,users,exec 0 0 # Added by TC
/dev/sda6 /mnt/sda6 vfat noauto,users,exec,umask=000 0 0 # Added by TC...but I'm not sure whether adding acl to the options for /dev/sda1 would help since TCL's root filesystem is in RAM. How do I change options of TCL's root filesystem?
-
Hi Rich. rw for group permissions noted. In TCL I'm already part of the staff group, so I tried this:
TCL$ sudo chown root:staff /dev/input/js0
TCL$ sudo chmod 664 /dev/input/js0
TCL$ ls -l /dev/input/js0
crw-rw-r-- 1 root staff 13, 0 Dec 30 10:10 /dev/input/js0
Still no luck after the above: sudo is still required for game to respond to gamepad input. What a tough nut to crack this is proving to be!
-
Hi GNUser
Some dumb questions to try to isolate the issue further:
Do you permission to run this:
Games/GOG Games/Baldurs Gate Dark Alliance/start.sh
Do you have permission to run each of the commands in that file?
-
Hi GNUser
Some dumb questions to try to isolate the issue further:
Do you permission to run this:
Games/GOG Games/Baldurs Gate Dark Alliance/start.sh
Do you have permission to run each of the commands in that file?
I hadn't thought of that. Not dumb question at all. Let me investigate.
EDIT: Yes, I am owner and have permission to execute everything related to this game. I just did this to make sure:
$ chown -R bruno:staff Games/GOG\ Games/Baldurs\ Gate\ Dark\ Alliance/
$ chmod -R 775 Games/GOG\ Games/Baldurs\ Gate\ Dark\ Alliance/The need for sudo persists after doing the above.
-
Hi GNUser
Actually it was dumb. Look at this:
... Do you permission to run this:
Games/GOG Games/Baldurs Gate Dark Alliance/start.sh ...
I couldn't even form a proper sentence. ;D
-
Maybe one of the steps involved in launching the game uses a command in /sbin that requires sudo? I'm going to explore this.
-
Hi GNUser
Actually it was dumb. Look at this:
... Do you permission to run this:
Games/GOG Games/Baldurs Gate Dark Alliance/start.sh ...
I couldn't even form a proper sentence. ;D
Hi Rich. Haha, I understood your meaning well enough ;D
Understanding context and intent is one of the many instances in which natural intelligence easily beats AI ;)
-
Hi GNUser
... Understanding context and intent is one of the many instances in which natural intelligence easily beats AI ;)
You shouldn't compare "natural intelligence" to "Artificial Ignorance". :o
-
Ok, friends, finally some progress!
If I run the game in TCL with sudo then the gamepad WORKS!! No need for libmtp or supplemental udev rules.
But of course this is not a solution: It just suggests what the underlying problem might be.
I checked in Devuan and I am not part of an "input" group:
Devuan$ id
uid=1000(bruno) gid=1000(bruno) groups=1000(bruno),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),102(netdev),108(bluetooth)
I tried this in TCL...
TCL$ sudo chown bruno:staff /dev/input
TCL$ sudo chown bruno:staff /dev/input/js0
...but found that running the game with sudo is still needed for gamepad to work.
Any suggestions what needs to be done in order for the gamepad to be usable in TCL without running the game with sudo?
EDIT: In TCL I also tried loading polkit, starting dbus, then starting polkitd. Alas, no change--sudo still required for the game to respond to gamepad input.
Sorry have to ask a very stupid question.
Have you tried to add you user to input group ?
-
Hi GNUser
... Understanding context and intent is one of the many instances in which natural intelligence easily beats AI ;)
You shouldn't compare "natural intelligence" to "Artificial Ignorance". :o
We're on the same page there ;)
-
Sorry have to ask a very stupid question.
Have you tried to add you user to input group ?
Hi patrikg. I'm not part of the input group in Devuan. Creating that group in TCL, adding myself to it, and changing ownership of /dev/input/js0 to root:input would be a big hassle with very low chance of success. But I'll give it a shot.
-
On what group will the udev rules add your device ?
-
On what group will the udev rules add your device ?
udev creates /dev/input/js0 with root:root ownership in TCL, root:input ownership in Devuan
-
On modern Linux systems, /dev/input/js0 (joystick devices) should normally belong to the input group.
So that's correct so my advice to you is:
1. Add input group in TC.
2. Change the udev rules to input group.
3. Add user bruno to input group.
Happy hacking :)
-
Wouldn’t it be better to change it to the staff group?
-
On modern Linux systems, /dev/input/js0 (joystick devices) should normally belong to the input group.
So that's correct so my advice to you is:
1. Add input group in TC.
2. Change the udev rules to input group.
3. Add user bruno to input group.
Happy hacking :)
Hi patrikg. I followed your advice. I appended this line to /etc/group:
input:x:103:root,brunoand in /etc/udev/rules.d/50-udev-default.rules I changed this line:
KERNEL=="js[0-9]*", MODE="0644"
to this:
KERNEL=="js[0-9]*", MODE="0664", GROUP="input"
Then I logged out, logged back in, plugged in the gamepad. Everything is as expected:
$ id
uid=1000(bruno) gid=50(staff) groups=10(wheel),50(staff),103(input),1000(bruno)
$ ls -l /dev/input/js0
crw-rw-r-- 1 root input 13, 0 Dec 30 11:27 /dev/input/js0
Despite all the above, game still does not respond to gamepad input unless I run the game with sudo.
Wouldn’t it be better to change it to the staff group?
Hi Juanito. I'll give that a try.
EDIT: No luck with your idea, Juanito :(
-
I'd like to investigate whether these errors in /var/log/messages have anything to do with the problem:
Dec 30 16:32:31 x230 daemon.err elogind-uaccess-command[19418]: Failed to apply ACL: Operation not supported
Dec 30 16:32:31 x230 daemon.err elogind-uaccess-command[19419]: Failed to apply ACL: Operation not supportedCan anyone assist me in enabling acl on TCL's root filesystem? I tried adding acl to options in /etc/fstab , adding /etc/fstab to my backup, then booting with the nofstab bootcode, but that causes my system to hang during boot.
I also tried remixing the rootfs--replacing the default /etc/fstab in corepure64.gz with version copied from my running system, just adding acl by the partition that contains my frugal install. This also causes a hang during boot.
-
EDIT: No luck with your idea, Juanito
..strange, see: grep staff /etc/udev/rules.d/*
-
Hi Juanito. I made the appropriate edit, going into etc/udev/rules.d/50-udev-default.rules and changing this line:
KERNEL=="js[0-9]*", MODE="0644"
to this:
KERNEL=="js[0-9]*", MODE="0664", GROUP="staff"
The change has the expected effect: When I plugin the gamepad now, /dev/input/js0 is owned by root:staff and has 664 permissions.
By "no luck" I meant that the above did not solve my problem--running the game with sudo is still needed for game to respond to gamepad input.
-
Maybe one of the steps involved in launching the game uses a command in /sbin that requires sudo?
To answer my own question: No. I renamed /sbin to /__sbin and /usr/sbin to /usr/__sbin then launched the game with and without sudo: Game launches just fine, but gamepad works only when launched with sudo.
So here is where I am at the moment:
1. everything in the game's directory is owned by my regular user (bruno), with rwx permissions
2. game does not need anything in /sbin or /usr/sbin (so presumably there are no sudo-requiring steps to launching or running the game)
3. I downgraded ownership of /dev/input/js0 from root:root to root:staff (and also tried bruno:staff)
Yet:
4. game only recognizes button presses if game is run with sudo
It doesn't seem to make sense. It seems I've eliminated all the obvious possibilities. The cause of this problem must be something strange and un-unix-like. I think I'm ready to throw in the towel :(
-
I think you can solved it with strace, but i think you need a lot of storage :)
-
I think you can solved it with strace, but i think you need a lot of storage :)
strace of game with and without sudo is attached. Before stopping the strace I used the gamepad at game's title screen.
-
I think when you start the game with the shell script, it fork's it self.
So you need to strace with the follow options to also trace to child's.
strace -f
-
So you need to strace with the follow options to also trace to child's.
strace -f
Oops. Of course. I used the -f flag this time. As expected, the output is much more extensive. I uploaded the results here:
http://files.dantas.airpost.net/public/sudo.txt
http://files.dantas.airpost.net/public/no_sudo.txt
-
Hi patrikg. Your idea of running strace -f led me to the answer :) :) :)
There's a bunch of "Permission denied" lines in no_sudo.txt:
[pid 1770] stat("/dev/input/event1", {st_mode=S_IFCHR|0640, st_rdev=makedev(13, 65), ...}) = 0
[pid 1770] openat(AT_FDCWD, "/dev/input/event1", O_RDONLY) = -1 EACCES (Permission denied)
[pid 1770] stat("/dev/input/event2", {st_mode=S_IFCHR|0640, st_rdev=makedev(13, 66), ...}) = 0
[pid 1770] openat(AT_FDCWD, "/dev/input/event2", O_RDONLY) = -1 EACCES (Permission denied)
[pid 1770] stat("/dev/input/event0", {st_mode=S_IFCHR|0640, st_rdev=makedev(13, 64), ...}) = 0
[pid 1770] openat(AT_FDCWD, "/dev/input/event0", O_RDONLY) = -1 EACCES (Permission denied)
[pid 1770] stat("/dev/input/event3", {st_mode=S_IFCHR|0640, st_rdev=makedev(13, 67), ...}) = 0
[pid 1770] openat(AT_FDCWD, "/dev/input/event3", O_RDONLY) = -1 EACCES (Permission denied)
[pid 1770] stat("/dev/input/event4", {st_mode=S_IFCHR|0640, st_rdev=makedev(13, 68), ...}) = 0
[pid 1770] openat(AT_FDCWD, "/dev/input/event4", O_RDONLY) = -1 EACCES (Permission denied)
[pid 1770] stat("/dev/input/event5", {st_mode=S_IFCHR|0640, st_rdev=makedev(13, 69), ...}) = 0
[pid 1770] openat(AT_FDCWD, "/dev/input/event5", O_RDONLY) = -1 EACCES (Permission denied)
[pid 1770] stat("/dev/input/event6", {st_mode=S_IFCHR|0640, st_rdev=makedev(13, 70), ...}) = 0
[pid 1770] openat(AT_FDCWD, "/dev/input/event6", O_RDONLY) = -1 EACCES (Permission denied)
[pid 1770] stat("/dev/input/event7", {st_mode=S_IFCHR|0640, st_rdev=makedev(13, 71), ...}) = 0
[pid 1770] openat(AT_FDCWD, "/dev/input/event7", O_RDONLY) = -1 EACCES (Permission denied)
[pid 1770] stat("/dev/input/event11", {st_mode=S_IFCHR|0640, st_rdev=makedev(13, 75), ...}) = 0
[pid 1770] openat(AT_FDCWD, "/dev/input/event11", O_RDONLY) = -1 EACCES (Permission denied)
[pid 1770] stat("/dev/input/event10", {st_mode=S_IFCHR|0640, st_rdev=makedev(13, 74), ...}) = 0
[pid 1770] openat(AT_FDCWD, "/dev/input/event10", O_RDONLY) = -1 EACCES (Permission denied)
[pid 1770] stat("/dev/input/event9", {st_mode=S_IFCHR|0640, st_rdev=makedev(13, 73), ...}) = 0
[pid 1770] openat(AT_FDCWD, "/dev/input/event9", O_RDONLY) = -1 EACCES (Permission denied)
[pid 1770] stat("/dev/input/event14", {st_mode=S_IFCHR|0640, st_rdev=makedev(13, 78), ...}) = 0
[pid 1770] openat(AT_FDCWD, "/dev/input/event14", O_RDONLY) = -1 EACCES (Permission denied)
[pid 1770] stat("/dev/input/event8", {st_mode=S_IFCHR|0640, st_rdev=makedev(13, 72), ...}) = 0
[pid 1770] openat(AT_FDCWD, "/dev/input/event8", O_RDONLY) = -1 EACCES (Permission denied)
[pid 1770] stat("/dev/input/event12", {st_mode=S_IFCHR|0640, st_rdev=makedev(13, 76), ...}) = 0
[pid 1770] openat(AT_FDCWD, "/dev/input/event12", O_RDONLY) = -1 EACCES (Permission denied)
[pid 1770] stat("/dev/input/event13", {st_mode=S_IFCHR|0640, st_rdev=makedev(13, 77), ...}) = 0
[pid 1770] openat(AT_FDCWD, "/dev/input/event13", O_RDONLY) = -1 EACCES (Permission denied)
[pid 1770] stat("/dev/input/event15", {st_mode=S_IFCHR|0640, st_rdev=makedev(13, 79), ...}) = 0
[pid 1770] openat(AT_FDCWD, "/dev/input/event15", O_RDONLY) = -1 EACCES (Permission denied)
[pid 1770] stat("/dev/input/event16", {st_mode=S_IFCHR|0640, st_rdev=makedev(13, 80), ...}) = 0
[pid 1770] openat(AT_FDCWD, "/dev/input/event16", O_RDONLY) = -1 EACCES (Permission denied)
So it seems that the game needs permission to access more than just /dev/input/js0 inside of /dev/input/ for the gamepad to work.
The solution turned out to be simple, just running these commands (after plugging in the gamepad, before launching the game):
$ sudo chown -R root:staff /dev/input
$ sudo chmod -R 777 /dev/input
After that, the gamepad works without needing to use sudo when launching the game.
patrikg, thank you for leading me to the solution. And many thanks to you, Rich, as always, for your natural intelligence, time, and goodwill :)
Thread may be marked as Solved! ;D
-
Funny thing I was writing this, you was faster and posted your solution:
Strace to the resq.That app has solved lots of my problems.
Do you see
(Permission denied)
Maybe you need to change the rights to that directory.
$ grep /dev/input no_sudo.txt
[pid 1770] inotify_add_watch(8, "/dev/input", IN_ATTRIB|IN_MOVED_FROM|IN_MOVED_TO|IN_CREATE|IN_DELETE) = 1
[pid 1770] stat("/dev/input", {st_mode=S_IFDIR|0775, st_size=540, ...}) = 0
[pid 1770] openat(AT_FDCWD, "/dev/input", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 9
[pid 1770] stat("/dev/input/event1", {st_mode=S_IFCHR|0640, st_rdev=makedev(13, 65), ...}) = 0
[pid 1770] openat(AT_FDCWD, "/dev/input/event1", O_RDONLY) = -1 EACCES (Permission denied)
[pid 1770] stat("/dev/input/event2", {st_mode=S_IFCHR|0640, st_rdev=makedev(13, 66), ...}) = 0
[pid 1770] openat(AT_FDCWD, "/dev/input/event2", O_RDONLY) = -1 EACCES (Permission denied)
[pid 1770] stat("/dev/input/event0", {st_mode=S_IFCHR|0640, st_rdev=makedev(13, 64), ...}) = 0$ grep /dev/input sudo.txt
[pid 2058] inotify_add_watch(8, "/dev/input", IN_ATTRIB|IN_MOVED_FROM|IN_MOVED_TO|IN_CREATE|IN_DELETE) = 1
[pid 2058] stat("/dev/input", {st_mode=S_IFDIR|0775, st_size=540, ...}) = 0
[pid 2058] openat(AT_FDCWD, "/dev/input", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 9
[pid 2058] stat("/dev/input/event1", {st_mode=S_IFCHR|0640, st_rdev=makedev(13, 65), ...}) = 0
[pid 2058] openat(AT_FDCWD, "/dev/input/event1", O_RDONLY) = 10
[pid 2058] stat("/dev/input/event2", {st_mode=S_IFCHR|0640, st_rdev=makedev(13, 66), ...}) = 0
[pid 2058] openat(AT_FDCWD, "/dev/input/event2", O_RDONLY) = 10
[pid 2058] stat("/dev/input/event0", {st_mode=S_IFCHR|0640, st_rdev=makedev(13, 64), ...}) = 0
[pid 2058] openat(AT_FDCWD, "/dev/input/event0", O_RDONLY) = 10
[pid 2058] stat("/dev/input/event3", {st_mode=S_IFCHR|0640, st_rdev=makedev(13, 67), ...}) = 0
-
Turns out these more limited permissions are enough:
$ sudo chown root:staff /dev/input/*
$ sudo chmod 660 /dev/input/*
Juanito, devices in /dev/input/ are created with root:root ownership and 640 permissions:
$ ls -l /dev/input
total 0
drwxr-xr-x 2 root root 160 Dec 30 15:32 by-path/
crw-r----- 1 root root 13, 64 Dec 30 15:32 event0
crw-r----- 1 root root 13, 65 Dec 30 15:32 event1
crw-r----- 1 root root 13, 74 Dec 30 15:32 event10
crw-r----- 1 root root 13, 75 Dec 30 15:32 event11
crw-r----- 1 root root 13, 76 Dec 30 15:32 event12
crw-r----- 1 root root 13, 77 Dec 30 15:32 event13
crw-r----- 1 root root 13, 78 Dec 30 15:32 event14
...
I'd like to suggest that we change this to root:staff ownership and 660 permissions, please (I tried root:staff and 640 but that's not enough for gamepad to work--it needs to be root:staff and 660).
This change would have saved me a lot of time and pain, and is sure to help users in the future.
I think it's just a matter of changing this part of /etc/udev/rules.d/50-udev-default.rules from this:
# input
SUBSYSTEM=="input", ENV{ID_INPUT}=="", IMPORT{builtin}="input_id"
KERNEL=="mouse*|mice|event*", MODE="0640"
KERNEL=="ts[0-9]*|uinput", MODE="0644", GROUP="staff"
KERNEL=="js[0-9]*", MODE="0644"
to this
# input
SUBSYSTEM=="input", ENV{ID_INPUT}=="", IMPORT{builtin}="input_id"
KERNEL=="mouse*|mice|event*", MODE="0660", GROUP="staff"
KERNEL=="ts[0-9]*|uinput", MODE="0660", GROUP="staff"
KERNEL=="js[0-9]*", MODE="0660", GROUP="staff"
EDIT: I see that /etc/udev/rules.d/50-udev-default.rules is part of the base system. I'll put in a pull request on Github.
-
Hi GNUser
... Thread may be marked as Solved! ;D
Done. :)
-
Although GNUser has already confirmed his original post is now solved. At least one of my games now detects and uses gamepad in root mode. Thanks for solving it.
OFFTOPIC
abe mentions the wrong K version. Correct K version is loaded but no settings for gamepad seen.
neverputt has no gamepad settings.
neverball....gamepad in mode either xinput or Dinput digital...gamepad can navigate to settings but game borks if I attempt to play in root mode
unsubmitted game I built to run a free doom wad...in root mode controller is working. Now all I need to do is get timidity or some soundfont friendly TCE to play the sound wads. I should have that licked by the time 17x is ready
thanks for reading