Troubleshooting nont working gamepads

Questions about Wine on Linux
Locked
sup
Level 1
Level 1
Posts: 6
Joined: Tue Aug 12, 2014 7:00 am

Troubleshooting nont working gamepads

Post by sup »

I have two gamepads, an IPEGA one and the new Xbox Series X|S. I can make both of them work in Linux (using bluetooth and USB) but I don't know how to make them work with Wine at all. It used to work with an older Xbox controller about two years ago. The game in question is Worms WMD, but I think it affects all Wine (are there any freely downloadable games or apps I could use to test it?). I am confused about the current status of gamepad support. If I understand it correctly, it should just work but it does not. When I run "wine control", the controllers show up. But I think that utility uses the older Directinput drivers and my game, being from 2016, is probably using XInput drivers. When I tried to run https://garythegoof.github.io/X-Input-Test/, it does not see the gamepad at all. I am not sure at all how to troubleshoot it. I read that one can use "WINEDEBUG=+plugplay" but I am not sur at all how to troubleshoot that. I am on Kubuntu 21.10, I tried Wine 5, 6 from the repositories and 7 from WineHQ.

I tried playing with xboxdrv and x360ce but I think they should not be needed at all by now, especially with an Xbox controller. As I said, two years ago with the same WINEPREFIX, it just worked with an older controller, so I am even more puzzled by that. I would appreciate any advice I can get abou this.
sup
Level 1
Level 1
Posts: 6
Joined: Tue Aug 12, 2014 7:00 am

Re: Troubleshooting nont working gamepads

Post by sup »

I installed SDL2 Gamepad Tool from https://generalarcade.com/gamepadtool/ and it does not see the gamepad at all. So this is not game-specific.
sup
Level 1
Level 1
Posts: 6
Joined: Tue Aug 12, 2014 7:00 am

Re: Troubleshooting nont working gamepads

Post by sup »

So, oddly enough, the culprit was kbct. It is a tool that maps keyboard and enables low level key remapping.

I use it to remap four devices (laptop keyboard, external keyboard, special buttons on laptop keyboard and a mouse). That led to Wine seeing these four controlers and not seeing the fifth actual controller, as can be seen here:
web_Screenshot_20220115_165706.png
When I removed two of the mapped devices, Wine would start seing the controller (number 030000005e040000e002000003097801 in addition to two virtual devices created by kbct listed as 03000000000000000000000000007801), but mapping of the keys was wrong in-game (it would register only left axis on the gamepad when) even if Gamepad Tool listed the buttons correctly (the corresponding buttons in-app would turn green when pressed on the gamepad).
Screenshot_20220115_165832.png
Disabling kbct completely makes the Xbox controller just work in-game (I have not tried the IPEGA yet).

I am not sure if this is a feature or a bug and if the bug is in kbct or in Wine. Is there a limitation to Wine (or windows?) that only four gamepads can be attached at any one time? Why is Wine thinking these virtual devices are gamepads?
sup
Level 1
Level 1
Posts: 6
Joined: Tue Aug 12, 2014 7:00 am

Re: Troubleshooting nont working gamepads

Post by sup »

So in the end I think there is a problem with Wine.

1) As opposed to Linux, there is a limit to the number of controllers it can suppor - Gamepad Tool lists four (the fake ones), but AntiMicroX on Linux lists all five (the fake ones plus the real one):
Screenshot_20220116_154327.png
2) Multiple controllers should not confuse it (as described above).

3) Also, without remapping my controler either using SDL_GAMECONTROLLERCONFIG variable or xboxdrv, my game just does not see the right axis (the game allows custom remapping but when I try to assign the right axis, it just does not register).

Unless somebody tells me there are features I would fill a bug shortly.
sup
Level 1
Level 1
Posts: 6
Joined: Tue Aug 12, 2014 7:00 am

Re: Troubleshooting nont working gamepads

Post by sup »

Locked