1
  1. First of all, I installed wine following the steps from this website without installing about winehq because of this, and also installing more typing these commands:

$ sudo apt-get install wine32

$ sudo apt-get install winetricks

$ winetricks dotnet45

$ export WINEPREFIX="$HOME/.wine"

$ wineboot

  1. I typed the command wine64 uninstaller to add packages:
  1. I followed the steps of the xboxdrv's installation from this website to work with my xbox 360 joystick.

  2. I installed open-joystick-display-2.8.0-x64-linux.deb to check the input of my xbox360 joystick:

Gamepad_Ubuntu

  1. I installed open-joystick-display-2.8.0-x64-windows.exe by wine to check the input of my xbox360 joystick:

Gamepad_wine

  1. I typed the commands to check the difference between controllers of Ubuntu (left side) and wine (right side):

$ jstest.gtk

$ wine control joy.cpl

  • I checked that the controller of Ubuntu is working fine, and the controller of wine has a mistake, for example as the above picture that instead of four axes, it's four buttons and besides, the Rz axe is not working at all.

Gampepad_Ubuntu-wine

Could anyone tell me how to fix?

1 Answers1

0
  • I figured out that the problem is in wine's Registry Editor and it doesn't need any driver to be installed, so I removed DirectInput Force Feedback Driver for XInput - Masahiko Morii that belongs to xi.win7.x86.en.msi and xi.win7.x64.en.msi (that I've installed before) just typing in Terminal: wine64 uninstaller

I solved the problem following the steps from this website; First of all, go to wine's Registry Editor just typing in terminal:

$ wine regedit

And then, go to the key path HKEY_CURRENT_USER -> Software -> Wine -> DirectInput and right-click in the right window and select New -> String Value, set the SAME name of the joystick controller in wine as shown the above picture, in my case it's Xbox Gamepad (userspace driver) (event) and set the same value of all sticks as shown the same picture in the string:

  • First stick: X,Y
  • Second stick: Rx,Ry
  • Third stick: Z,Rz
  • Fourth stick: POV

So the value without any blank space to set in the string is: X,Y,Rx,Ry,Z,Rz,POV1 (I added the number 1 next to POV to work the controller)

enter image description here

Finally, following the steps from this website; In the Registry Editor, go to the key path HKEY_CURRENT_MACHINE -> System -> CurrentControlSet -> Services -> winebus, right-click in the right window and select New -> Key and set the name Map, click the Map key in the left window, and then right-click in the right window and select New -> String Value, set the SAME name of joystick controller in wine and set the value of Mapping String (Here is an explanation at the bottom how to get) and close the Registry Editor, that's all. To test the joystick controller in wine, type in Terminal:

$ wine control joy.cpl

enter image description here

I installed the app called SDL2 Gamepad Tool that I downloaded for Linux from this website; Open the app and click [Create A New Mapping] with the same name of joystick controller in wine, not Ubuntu (I put the different name as xbox360 by mistake, but it was not problem) and then click [Copy Mapping String], this is the value that I got:

  • 0000000058626f782047616d65706100,xbox360,a:b0,b:b1,x:b2,y:b3,back:b6,guide:b8,start:b7,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a5,righttrigger:a4,platform:Linux,

I changed the name xbox360 in this value into Xbox Gamepad (userspace driver) (event) to fix my mistake.

The alternative to SDL2 Gamepad Tool is AntiMicroX, it also generates the value of Mapping String but a little difference of the Gamepad GUID value only two digits at the end:

  • 0000000058626f782047616d65706100 from SDL2 Gamepad Tool

  • 0000000058626f782047616d6570610000 from AntiMicroX

enter image description here

Installing AntiMicroX is to type in Terminal:

$ sudo add-apt-repository ppa:ryochan7/antimicro

$ sudo apt-get update

$ sudo apt-get install antimicro

More info about how to use AntiMicroX, in this website.

enter image description here