WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [Solved] xbox controller not working on TCL16 x86_64  (Read 3935 times)

Offline aus9

  • Jr. Member
  • **
  • Posts: 85
Re: xbox controller not working on TCL16 x86_64
« Reply #45 on: December 29, 2025, 08:06:02 PM »
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
Quote
# 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?

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1781
Re: xbox controller not working on TCL16 x86_64
« Reply #46 on: December 29, 2025, 08:16:10 PM »
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.

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 12450
Re: xbox controller not working on TCL16 x86_64
« Reply #47 on: December 29, 2025, 08:27:13 PM »
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:
Code: [Select]
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):
Code: [Select]
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

Offline aus9

  • Jr. Member
  • **
  • Posts: 85
Re: xbox controller not working on TCL16 x86_64
« Reply #48 on: December 29, 2025, 08:54:22 PM »
and a correction to my musing
Quote
"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
Code: [Select]
find /lib/modules/ -name uaccess* # no hitsapps provides search uaccess.ko.gz no hits
but we do have that header
Code: [Select]
tc@box:~/1builds/KERNEL/linux-6.12.11$ find include/ -name uaccess.h
include/linux/uaccess.h
include/asm-generic/uaccess.h
« Last Edit: December 29, 2025, 08:57:34 PM by aus9 »

Offline aus9

  • Jr. Member
  • **
  • Posts: 85
Re: xbox controller not working on TCL16 x86_64
« Reply #49 on: December 29, 2025, 09:05:50 PM »
Quote
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

Offline aus9

  • Jr. Member
  • **
  • Posts: 85
Re: xbox controller not working on TCL16 x86_64
« Reply #50 on: December 30, 2025, 02:23:27 AM »
Hi
I know that devuan is not debian but have seen https://packages.debian.org/trixie/xboxdrv
Quote
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?
« Last Edit: December 30, 2025, 02:28:08 AM by aus9 »

Offline aus9

  • Jr. Member
  • **
  • Posts: 85
Re: xbox controller not working on TCL16 x86_64
« Reply #51 on: December 30, 2025, 06:31:10 AM »
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
Quote
<!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
Code: [Select]
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) ;)
« Last Edit: December 30, 2025, 06:33:06 AM by aus9 »

Offline aus9

  • Jr. Member
  • **
  • Posts: 85
Re: xbox controller not working on TCL16 x86_64
« Reply #52 on: December 30, 2025, 07:04:10 AM »
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

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1781
Re: xbox controller not working on TCL16 x86_64
« Reply #53 on: December 30, 2025, 08:34:37 AM »
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:
Code: [Select]
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):
Code: [Select]
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:
Code: [Select]
$ tce-load -wil libmtp
$ sudo udevadm control --reload
Then I tried the game again. Alas, the game still does not respond to any button presses :(

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 12450
Re: xbox controller not working on TCL16 x86_64
« Reply #54 on: December 30, 2025, 08:39:37 AM »
Hi GNUser
Did you run:
Code: [Select]
sudo udevadm test /sys/bus/usb/devices/3-2
Did it show mtp-probe being run:
Code: [Select]
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

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1781
Re: xbox controller not working on TCL16 x86_64
« Reply #55 on: December 30, 2025, 08:47:23 AM »
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:
Code: [Select]
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...
Code: [Select]
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.
« Last Edit: December 30, 2025, 09:00:10 AM by GNUser »

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 12450
Re: xbox controller not working on TCL16 x86_64
« Reply #56 on: December 30, 2025, 08:50:32 AM »
Hi aus9
yikes on reboot...I have no module=uinput.... ...
uinput.ko.gz is part of the base install.
You should find it under:
Code: [Select]
/lib/modules/6.12.11-tinycore64/kernel/drivers/input/misc/uinput.ko.gz
Quote
... somehow I failed to spot it not loading ...
Unless another loaded module depends on it, you need to load it yourself.

Offline aus9

  • Jr. Member
  • **
  • Posts: 85
Re: xbox controller not working on TCL16 x86_64
« Reply #57 on: December 30, 2025, 09:04:05 AM »
brain fade sorry
I must have loaded it the first time....and I think I mis-spelt the second time, time for bed

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 12450
Re: xbox controller not working on TCL16 x86_64
« Reply #58 on: December 30, 2025, 09:13:10 AM »
Hi GNUser
... Did it show mtp-probe being run:
Code: [Select]
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:
Code: [Select]
/lib/udev/mtp-probe
... I checked in Devuan and I am not part of an "input" group:
Code: [Select]
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.

Quote
... ...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?

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1781
Re: xbox controller not working on TCL16 x86_64
« Reply #59 on: December 30, 2025, 09:32:48 AM »
Hi Rich.

plugdev looks interesting.

I agree that I need to explore ownerships a bit more. I see this in Devuan:
Code: [Select]
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:
Code: [Select]
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.sh
If I run the game without sudo, no new lines (errors or otherwise) appear in /var/log/messages
« Last Edit: December 30, 2025, 09:38:36 AM by GNUser »