The Problem
I installed Elite: Dangerous via Steam on my Arch Linux system. Since the game isn’t natively available for Linux, Steam delivers the Windows version and runs it using its compatibility layer, Proton. This works surprisingly well for many games, including Elite: Dangerous. However, it involves translating system calls from Linux to the corresponding Windows calls, and that doesn’t always go perfectly.
So, I connected my two Winwingsim URSA MINOR sticks to my PC via USB and checked their functionality with the small program jstest. Apart from some strange mapping, the joysticks worked flawlessly. All axes, sliders, and buttons were recognized. So, nothing should stand in the way of some spaceship fun, right?
Unfortunately, that wasn’t the case. When I went into the Elite: Dangerous settings to map the controls, I was immediately shown strange icons. Why is the Z-axis in Elite: Dangerous supposedly the left trigger? Why is the primary fire button A? The game seems to think I have two Xbox controllers connected, not two joysticks.
The Cause
The cause is likely a combination of Valve’s Proton and Elite: Dangerous. The joysticks are registered in the layer, but in a way that makes them look like controllers to the space simulation. That’s why the game switches to controller mode.
In a bit more detail, the joysticks are created as xinput devices in the registry. Xinput is a Microsoft API specifically for gaming controllers and is, among other things, the reason why controllers either use DirectInput or are limited to a maximum of ten recognized buttons. My joysticks, however, each have over 30 buttons, which makes not only the axis mapping but especially the use of the buttons problematic.
I did some research and was eventually pointed to a page with the solution by Beko Pharm from the Stellanebula Project.
The Solution
The solution is actually quite simple. You go into the registry and change the type from xinput to winehid. How exactly does that work?
- Open a terminal.
export WINEPREFIX=/PATH/TO/STEAM/steamapps/compatdata/359320/pfx
The path to Steam depends on your system. For me, it was/home/kernic/.steam/steam/steamapps/compatdata/359320/pfxwine regedit- A new window will open, the Registry Editor. Navigate to
HKEY_LOCAL_MACHINE/System/CurrentControlSet/Enum - There are two relevant subfolders,
winebusandwinexinput. Start with the first one; you should find an entry for each joystick with its ID.- If you don’t know the ID of your joysticks, open a new terminal and type XXX.
- Open the first joystick; a subfolder will become visible. Go into it.
- Change the following fields:
Servicefromxinputtowinehid.CompatibleIDstoWINEBUS\WINE_COMP_HID.ClasstoHIDClass.
- Repeat this for the second joystick, if you have one.
- Afterwards, go into the
winexinputfolder and check the same fields there. For me, they were adjusted automatically. If that’s not the case, adjust them. - Close the Registry Editor, start Elite: Dangerous, and check in the settings if everything is correct.
That’s it. You can find more tips at the link above. However, for me, they caused more problems than they solved.