atar-axis / xpadneo

Advanced Linux Driver for Xbox One Wireless Controller (shipped with Xbox One S)
https://atar-axis.github.io/xpadneo/
GNU General Public License v3.0
1.88k stars 110 forks source link

Xbox One S controller not sending Share Button inputs into games. #367

Open Skullfurious opened 2 years ago

Skullfurious commented 2 years ago

Version of xpadneo

hid-xpadneo-v0.9-96-g4fd620c

Controller Model

Xbox One S Model 1708

Connection mode

Installed Software

Protocol Information

Please help us identify at which layer the problem can be found if you want to report mapping errors or if the controller fails to be detected:

Please describe how it is failing below in the next sections.

Severity / Impact

I would say the impact can be severe based on the game. For Hades for instance it's not a huge deal to not be able to see the boons screen but in Path of Exile which recently added controller support I cannot access my inventory.

Describe the Bug

Okay, so the bug has evolved a bit and there is some good news. I have gotten it to work by restarting the controller's connection.

Occasionally when connecting to the system via bluetooth the Share button will not behave as expected and will not fire events in games until you manually disconnect and reconnect the controller.

I originally tested with Path of Exile (Proton), Chippy (Native), and Hades (Proton) none of them worked with the select button but when disconnecting and reconnecting (following the steps for getting the logs in the issue submission) it appeared to become resolved.

Steps to Reproduce

Unsure how to reproduce. Sorry.

Expected Behavior

The button fires the event in game.

System Information

# uname -a
# xxd -c20 -g1 /sys/module/hid_xpadneo/drivers/hid:xpadneo/0005:045E:*/report_descriptor | tee >(cksum)
Linux skull-pop 5.17.5-76051705-generic #202204271406~1653440576~22.04~6277a18 SMP PREEMPT Wed May 25 01 x86_64 x86_64 x86_64 GNU/Linux

Controller and Bluetooth Information

xpadneo-btmon.txt xpadneo-dmesg.txt xpadneo-lsusb.txt

Skullfurious commented 2 years ago

Basically it wasn't working and following the issues to get log files appears to have fixed it.

That being said I have had the share button not work on several occasions over the past week I just wasn't able to figure out if it was something to do with Steam or if it was something to do with my new dongle I purchased.

If there's anything I can do the next time it happens please let me know.

kakra commented 2 years ago
[260036.183314] loaded hid-xpadneo v0.9-96-g4fd620c

Please retry with the latest version.

Skullfurious commented 2 years ago

Sure thing, will report if it happens again.

kakra commented 2 years ago

Alternatively, try the stable branch (see releases, not using master) which had some fixes around the button mappings.

kakra commented 2 years ago

I didn't realize PoE supports controllers now. I'll test that.

The dongle will have no impact on the functionality of buttons it self, it only affects if the controller connects reliably. For Steam, you might want to disable Steam Input for the controller (if you see mapping problems) but some games require at least the Steam Overlay enabled for controllers to work at all.

Nemirtingas commented 1 year ago

Hi,

I have a problem too with the share button. It is not sent on the same input device as the gamepad. For example: I use evtest on /dev/input/event20: I have all the keys/abs/ff working, but no share button. I use evtest on /dev/input/event21: I have only the share button working but it doesn't detect the button release. I have both EV_KEY/KEY_RECORD/value 0 and EV_KEY/KEY_RECORD/value 1 on press where I expected EV_KEY/KEY_RECORD/value 1 on press EV_KEY/KEY_RECORD/value 0 on release

With xpad, I don't have the share button when wired connected, but I do have it on the same event device and key press/release works as expected when connected in bluetooth but lacking rumble support :).

I'm using xpadneo on Ubuntu 20: hid-xpadneo, v0.9-121-g727a84f, 5.4.0-120-generic, x86_64

kakra commented 1 year ago

I have both EV_KEY/KEY_RECORD/value 0 and EV_KEY/KEY_RECORD/value 1 on press where I expected

I'm not yet sure why that happens. Could you try the v0.9 stable branch instead? It should map the Share button to F12 (for now, can be configured later). You download the stable snapshots from the releases page.

You're on v0.9-121 which probably is the devel branch towards v0.10 and includes some unstable features. v0.10 will probably move towards F12 mapping, too, unless I redo the HID patcher routines, then we might get a better behavior before v0.11.

Nemirtingas commented 1 year ago

Ok, what about the 2 event devices for the same hardware device ? Is it by design or is it some bug ? When I plug my XBox One controller via Bluetooth, it creates 2 event files. One for the gamepad (event20), and one for the share key(event21).

kakra commented 1 year ago

It's by design, we cannot mix keyboard and gaming input in the same device. And actually, there's no official gamepad event for the Share button in the Linux kernel.

Nemirtingas commented 1 year ago

Ok, cause the xpad driver has gamepad and keyboard in the same device.

kakra commented 1 year ago

That may be a bug or using some special mode with overflowing event ids which evtest may not properly show... as far as my research went, you are not allowed to mix keyboard and gaming input in one device, and you may overflow some device category event ids but not all (that's actually discouraged as it makes it difficult for user-space to properly identify device classes).

In this case, it may actually be a bug because the share mapping id overflows into the next event category.

kakra commented 1 year ago

But it looks like such a mapping patch has been accepted into the kernel: https://lore.kernel.org/all/20210414021201.2462114-1-lzye@google.com/

So I may consider it post-v0.9...