You are not logged in.

#1 2022-11-05 03:51:43

aflyingpumpkin
Member
Registered: 2021-02-12
Posts: 14

[SOLVED] Programs don't see gamepad Connected via BlueTooth

I've been trying to use my Xbox One S controller over bluetooth the past couple of days to play games to no avail. When I connect it, `/dev/input/js[0-9]` is created and when catting it everything seems fine as well as the fact that https://gamepad-tester.com/ works. Though when trying to test the controller with Wine, Steam, and every game I have tried. the controller does not work at all. There is no file under `/dev/input/by-id/` for the controller

When I connect the controller via microusb it does work, though the permissions are not set correctly and I need to manually chmod `/dev/input/js[0-9]` and `/dev/input/by-id/*-joystick` to make it work correctly.

I have tried installing xpadneo, and xboxdrv. xboxdrv did not appear to change anything and xpadneo just made the recognition problem persist even when plugging in via microusb.

How should I go about further troubleshooting, or potentially solving this issue?

Last edited by aflyingpumpkin (2022-11-14 03:35:25)

Offline

#2 2022-11-05 04:17:25

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,441
Website

Re: [SOLVED] Programs don't see gamepad Connected via BlueTooth

"Files" under /dev/input/by-id/ are just symlinks to /dev/input/event* nodes.  These links should be created by udev.  I'm not sure why it's failing when connecting over bluetooth (I have near zero experience w/ bluetooth devices in linux).  But you could create the symlink yourself, and if you can confirm this works, you could write a udev rule to automate the link creation whenever the device is connected (and removal upon disconnect).


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2022-11-05 16:39:48

aflyingpumpkin
Member
Registered: 2021-02-12
Posts: 14

Re: [SOLVED] Programs don't see gamepad Connected via BlueTooth

Creating a symlink manually worked, though for some reason the `/dev/input/event` was not automatically set to be readable by my user. Do you have any resources on how I can go about fixing the permissions and automating the creation of a symlink? I tried installing `game-devices-udev` as recommended by the wiki, though it has not done anything to fix this issue.

Offline

#4 2022-11-05 17:06:35

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,441
Website

Re: [SOLVED] Programs don't see gamepad Connected via BlueTooth


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2022-11-14 03:31:11

aflyingpumpkin
Member
Registered: 2021-02-12
Posts: 14

Re: [SOLVED] Programs don't see gamepad Connected via BlueTooth

Thanks for the link!
I was somehow able to hack together this udev rule to get it solved:

KERNEL=="js[0-9]", ENV{ID_BUS}=="bluetooth", SUBSYSTEM=="input", MODE="0664", TAG+="uaccess", SYMLINK+="input/by-id/$env{ID_BUS}-controller-%n-joystick"
KERNEL=="event[0-9]*", ENV{ID_BUS}=="bluetooth", SUBSYSTEM=="input", MODE="0664", TAG+="uaccess", SYMLINK+="input/by-id/$env{ID_BUS}-controller-%n-event-joystick"

Offline

Board footer

Powered by FluxBB