WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

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

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 817
Re: xbox controller not working on TCL16 x86_64
« Reply #75 on: December 30, 2025, 11:04:30 AM »
On what group will the udev rules add your device ?

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1778
Re: xbox controller not working on TCL16 x86_64
« Reply #76 on: December 30, 2025, 11:08:22 AM »
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

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 817
Re: xbox controller not working on TCL16 x86_64
« Reply #77 on: December 30, 2025, 11:16:05 AM »
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 :)

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 15405
Re: xbox controller not working on TCL16 x86_64
« Reply #78 on: December 30, 2025, 11:27:28 AM »
Wouldn’t it be better to change it to the staff group?

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1778
Re: xbox controller not working on TCL16 x86_64
« Reply #79 on: December 30, 2025, 11:31:31 AM »
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:
Code: [Select]
input:x:103:root,brunoand in /etc/udev/rules.d/50-udev-default.rules I changed this line:
Code: [Select]
KERNEL=="js[0-9]*",             MODE="0644"
to this:
Code: [Select]
KERNEL=="js[0-9]*",             MODE="0664",    GROUP="input"
Then I logged out, logged back in, plugged in the gamepad. Everything is as expected:
Code: [Select]
$ 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 :(
« Last Edit: December 30, 2025, 11:33:46 AM by GNUser »

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1778
Re: xbox controller not working on TCL16 x86_64
« Reply #80 on: December 30, 2025, 11:36:45 AM »
I'd like to investigate whether these errors in /var/log/messages have anything to do with the problem:
Code: [Select]
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 supported
Can 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.
« Last Edit: December 30, 2025, 11:40:10 AM by GNUser »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 15405
Re: xbox controller not working on TCL16 x86_64
« Reply #81 on: December 30, 2025, 11:56:45 AM »
EDIT: No luck with your idea, Juanito

..strange, see:
Code: [Select]
grep staff /etc/udev/rules.d/*

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1778
Re: xbox controller not working on TCL16 x86_64
« Reply #82 on: December 30, 2025, 12:05:59 PM »
Hi Juanito. I made the appropriate edit, going into etc/udev/rules.d/50-udev-default.rules and changing this line:
Code: [Select]
KERNEL=="js[0-9]*",             MODE="0644"
to this:
Code: [Select]
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.
« Last Edit: December 30, 2025, 12:08:36 PM by GNUser »

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1778
Re: xbox controller not working on TCL16 x86_64
« Reply #83 on: December 30, 2025, 01:55:20 PM »
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 :(
« Last Edit: December 30, 2025, 01:58:58 PM by GNUser »

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 817
Re: xbox controller not working on TCL16 x86_64
« Reply #84 on: December 30, 2025, 02:01:09 PM »
I think you can solved it with strace, but i think you need a lot of storage :)

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1778
Re: xbox controller not working on TCL16 x86_64
« Reply #85 on: December 30, 2025, 02:15:57 PM »
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.

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 817
Re: xbox controller not working on TCL16 x86_64
« Reply #86 on: December 30, 2025, 02:46:17 PM »
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.
Code: [Select]
strace -f

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1778
Re: xbox controller not working on TCL16 x86_64
« Reply #87 on: December 30, 2025, 02:54:41 PM »
So you need to strace with the follow options to also trace to child's.
Code: [Select]
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

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1778
Re: xbox controller not working on TCL16 x86_64
« Reply #88 on: December 30, 2025, 03:04:51 PM »
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:

Code: [Select]
[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):
Code: [Select]
$ 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


« Last Edit: December 30, 2025, 03:06:38 PM by GNUser »

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 817
Re: xbox controller not working on TCL16 x86_64
« Reply #89 on: December 30, 2025, 03:12:46 PM »
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.


Code: [Select]
$ 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
Code: [Select]
$ 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
« Last Edit: December 30, 2025, 03:15:05 PM by patrikg »