A couple of days ago, I was enquiring with a certain WINE developer the state of controller support in WINE. I was surprised they were actually working on a native solution, yet not shocked to hear that for now, a tool like x360ce.exe was probably one’s best bet. The thing is, there is a lack of a good tutorial out there on how to make things work from A to Z – sure, you can find piece-by-piece info across several sources, but I thought it may be useful to have the whole process detailed for everyone who’s interested to do that. I have replicated with success the same process three times on different machines, all running Ubuntu derivatives (Mint 17.3 and Mint 18) so it should probably work on any Ubuntu-based distro. So here we go.
Part A: Making this %!”# x360ce work in the first place
First, open a terminal and run the following commands to get the latest version of wine-staging. This may not be 100% required, but in my experience older versions of WINE like 1.6 cannot run x360ce properly (crash at startup, even with the required .NET libraries).
sudo add-apt-repository ppa:wine/wine-builds && sudo apt update
sudo apt install wine-staging winehq-staging
We also want to make sure we have a recent version of xboxdrv instead of using the generic xpad driver:
sudo apt-add-repository -y ppa:rael-gc/ubuntu-xboxdrv
sudo apt update
sudo apt install ubuntu-xboxdrv
At this stage xboxdrv should be up and running (automatically). Now plug your Xbox360 dongle in a USB port, and power up your Xbox360 pad. It should be recognized and assigned the first player’s pad.
Now on to the real stuff. The next step is about getting a 32 bits prefix where we will run x360ce.exe in the end.
WINEPREFIX="$HOME/prefix32bits/" WINEARCH=win32 wine wineboot
export WINEPREFIX="$HOME/prefix32bits/"
We are going to install .NET 45 in that particular prefix. This is required as x360ce needs this framework to create its windows and menus. Note that the last command below starting with the “bash” statement takes a long time (probably a good 10 mins) but it has the advantage to be fully automated and does not require any user input (you obviously need to be connected to the Internet). Easy. Just go grab a coffee.
cd $HOME/prefix32bits/
wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
bash winetricks -q dotnet45 corefonts
Now on to getting x360ce and unzipping it:
wget http://www.x360ce.com/Files/x360ce.zip && unzip x360ce.zip
We are almost done!
You just need to run x360ce next:
wine x360ce.exe
If everything went as expected the window should now appear and let you edit the pad settings. It will first ask you for xinput1_3.dll, and kindly create it for you since you don’t have it. Awesome!

Next you may get some internet-based updates, accept them.

Now on to the pad controls: just go ahead and edit each button and axis using the “record” dialog proposed on each menu item – that way you can just click on the button to have it mapped correctly.

Once you think your mapping is correct, just try moving your analog pads in all directions and clicking the buttons – they should be highlighted on screen when you do so, to confirm everything is working as expected.
Once you are satisfied, hit the “save” button at the bottom. This will create a x360ce.ini file in the very same folder.
If you need to change the configuration again (any fix required for the mappings, for example…) note that in my case having the previous x360ce.ini file in the folder makes it impossible to edit the settings anew:

if this happens to you too, just rename the existing x360ce.ini file to something else or erase it altogether, and this will show the mapping editor again. No Big Deal.
Part B: Using it with WINE-based games
Go back to your prefix32bits folder, and now you just need to copy:
- xbox360ce.exe
- xbox360ce.ini
- xinput1_3.dll
…into any WINE game folder where the game binaries are (the ones triggering the launch of the game). Make sure such games are on a 32 bits WINE prefix though, if not things will crash.
So let me give you an example with the GOG, Windows version of Enter the Gungeon here. Yes I know we have a Linux version of this game, but this is not the point – this is just a proof of concept. You can use for example PlayOnLinux to install this version, and click on “Configure” – and then click on the “Miscellaneous” tab:

As you can see you can directly open the program’s directory there, and this is where you will put the 3 files I mentioned above. Yup, just dump there in that folder.
Now you close that configuration window, launch the game, and lo and behold, the controller is recognized. This is me below playing the Windows client with the controller using x360ce. The framerate is shit because I run the game on my laptop and I recorded the video with OBS on top, so this looks much smoother in reality.
You can see the game recognizes the controller as the control hints use the xinput buttons instead of keyboard shortcuts. And yeah, obviously, there’s no point using this solution for EtG as there is already a perfectly working Linux client, but I wanted a game that my laptop can run correctly for such a demo.
Part C: Profit !? I mean… Enjoy!
Just repeat only the step B for any other game. Even if they are not installed under PlayonLinux. Keep the original prefix only for the times where you’d like to change the settings again. Otherwise you don’t have to worry about it, just copy the three files mentioned every time and you are good to go.
Let me know if this worked just fine for you, especially if you tried on non-Ubuntu-based distros (in that case you can’t use the ppa I refered to, but you may compile such libraries from source or find relevant packages for your distro).
At BoilingSteam, we strongly dislike ads and that is why you won't find any during your visit. If you like what we do, please consider supporting us on Patreon. You can also sign up to our newsletter (No Spam!), or our RSS feed or even Twitter.
Leave a Reply
58 Comments on "A Step-by-Step Guide to Make Controllers Work in WINE"
What about steam controller? Did you own one to test?
Yup, it works as well as long as you specify that your Steam Controller should act like a Xbox360 gamepad.
https://github.com/kozec/dumbxinputemu
You can also use dumbxinputemu, where you just paste a DLL into the game folder and you can use sc-controller to emulate xbox 360 controller, and everything should work.
https://github.com/kozec/sc-controller
There was one vital fact missing from these instructions: xinput1_3 needs to be set as “native” in winecfg (I set “xinput8” to native too but I’m not sure if that was necessary).
Strange, it was not needed on my side – what WINE version did you use ?
I get this behaviour with 2.0rc2 and rc3. I guess the behaviour must have changed? Though it was the first suggesting from people on IRC once I described my issue fully.
Thanks so much for the confirmation! I will need to update the article then 🙂
I keep getting this error when using terminal:
-bash: wine: command not found
(I am also on MacOS)
Do you have WINE installed?
Yes, and wineskin
Please help if you can :/
Maybe the trick doesn’t work with all games… I just tried on my macOS wineskin’s wrapper of “Ori And The blind forrest” and gamepad doesn’t run with wine 2.0 (also if I set xinput1_3 as native through winecfg) while it works with previous wine engines and the same game…
I don’t know if depend that Ori is an Unity game…
new update:
the trick work again also with “Ori and the blind forrest” with wine 2.1 for developers… So it’s possible my previous faillure was determinated by wine-staging 2.0. I used to test xinput1_3 as native for Windows..
I’ve also have some issues based on whether or not I use xboxdrv, or the steamos-modified builds of xpad (for Arch users available in the AUR). Specifically, x360ce’s config tool happily detects a wireless 360 controller in all cases, but the resulting DLL/INI only actually worked when using xboxdrv (which makes no sense to me, as for other applications, using steamos-xpad looks exactly the same as with xboxdrv –mimic-xpad). Maybe I’ll investigate it later.
Any progress since your comment?
Not yet, I’m afraid. I’ve been, and am going to be, busy for a few weeks with studies and work, so I’ll probably not be following up anything bug-fix-y or troubleshoot-y unless it pertains to productivity. I’ll come back as and when I do have the chance, though!
Did you ever find a way to solve your issue?
Using Wine Staging 2.1 and I’ve tried this guide and the games don’t see to see the xinput1_3.dll file. Nothing I configure in x360ce is showing up in games. I can configure it just fine but the games see what Wine sees. T
Did you try following the advice of other commenters at the end of the article ? They apparently recommend to set xinput 1.3 as native into WINE settings for it to work in newer versions.
I did that. I needed to cause if I didn’t the x360ce program wouldn’t see the controllers. Instead of the green boxes I saw grey. Then I would place the files in the directory of the game and run the game. But as far as I can tell, the game sees what Wine sees. Like something with a js at the end.
Ok I’ve tried and tried to get this to work on Mint 18.1, and I finally got it to work, but for only 1 game and that’s DuckTales Remastered. I’m also using Wine Staging 2.2.
This doesn’t work on Rayman Legends or Origins. Doesn’t work on Sonic Generations, and doesn’t work for ICEY. I’ve tried copying and renaming the xinput1_3.dll to xinput1_1.dll, xinput1_2.dll, and xinput9_1_0.dll. I don’t get why I’ve only gotten one game to work?
The first two things I’d ask would be
* Are you sure that these games support xinput?
* Did you make sure that you set the appropriate DLL override rules in winecfg (check all the other comments)?
Did a little testing and I think some games are just going straight to the system32 folder for xinput1_3.dll, or whatever xinput version they use. BTW anyone tested Rayman Legends & Origins to see if their xinput 1_3.dll works?
Are you absolutely sure that you’re putting the xinput DLL into the same folder as the game executable? It’ll only work then.
I asked the same question at Phoronix and people are saying this is a known issue since 1.9.24.
https://www.phoronix.com/forums/forum/software/linux-gaming/937351-wine-staging-2-3-still-tuning-direct3d-csmt
Rayman Origins does not work for me either but I did not try with more recent versions of WINE.
“This is why I hate Linux:
“sudo: add-apt-repository: command not found”
Help?
On what distro are you?
I have encountered an error with the command bash winetricks -q dotnet45 corefonts.
I get the error that “Downloading https://web.archive.org/web/https://download.microsoft.com/download/3/F/0/3F0A922C-F239-4B9B-9CB0-DF53621C57D9/dotnetfx3.exe failed”
It seems like the requested page no longer exists in the web archive. What should I do about this?
I have a bizarre issue were the windows HID controller keeps remapping dragons dogma xbox buttons back to the 1-16 button icons.. So very weird, its like their fighting each other. No idea howto remove the driver in windows because there is no device manager.
Figured it out, was matter of overwriting gamepad1 and now its the only 1 that shows. There are options in x360ce for it you just need to experiment.
I still get the can’t write to the x360ce.ini file error each time I start the program, not sure what thats about.
Didn’t work:
wine x360ce.exe
fixme:winediag:start_process Wine Staging 2.4 is a testing version containing experimental patches.
fixme:winediag:start_process Please mention your exact version when filing bug reports on winehq.org.
err:module:load_mscoree Failed to load mscoree.dll
err:module:attach_process_dlls “x360ce.exe” failed to initialize, aborting
err:module:LdrInitializeThunk Main exe initialization for L”Z:\\home\\shane\\prefix32bits\\x360ce.exe” failed, status c0000142
EDIT: by MODE I meant MOD from Nexus, and with dinput_8.dll I meant I renamed the dinput8.dll from the cev21 zip directory. I also use input9_1_0.dll from cev21, not sure if its needed, don’t forget to set Wine to Native, Builtin for dinput8 and input9_1_0…
I’m sorry but I didn’t understand a single bit of what you typed.
Well then I’m sorry to say but perhaps wine isn’t for you 🙂
Or maybe you didn’t explain things very well.
People like you are why I rarely ask for help online.
Guys, please keep things civil down here. No personal attacks please.
I understand you don’t want to give a full length explanation, but no need to discourage a potential user either.
Worth noting: you can use WINEDEBUG=loaddll to check which DLL needs overriding, whether the override is working.
Testing with XInputTest:
https://community.pcgamingwiki.com/files/file/588-directinputxinput-games-test-tools/
env WINEDEBUG=”loaddll” wine XInputTest.exe
(I’m using FISH, hence the “env”
I see:
trace:loaddll:load_builtin_dll Loaded L”C:\\windows\\system32\\xinput1_3.dll” at 0x7d8b0000: builtin
At that point, my gamepad is not working for that app.
If I override xinput1_3 to “native,builtin” and then try again, I see:
trace:loaddll:load_native_dll Loaded L”C:\\x360ce vibmod 3.1.4.1\\xinput1_3.dll” at 0x2cd0000: native
And then my gamepad starts working for that app.
Very nice advice, thanks for sharing!
Do you have to do this for every game you try out?
Do you happen to know if this is required for Rayman: Origins as well? It seems like Xinput is not recognized at all in this game no matter what one does.
I assume everyone knew I meant the DIRECTInput Blocker and not the XInput Blocker?
Anyway, I just tried these exact steps with Rayman Origins (Steam). They did not get XInput working with it.
Everything has worked up until recording the controller input in x360ce. I am using an Xbox One controller, and have confirmed that I have input through jstest-gtk.
Help?
Hi guys,
I found this to be useful when Left (LT) and Right (RT) triggers don’t show up on x360ce :
Run in terminal before launching x360ce.exe:
xboxdrv –detach-kernel-driver –mimic-xpad
On which distro did you do this and get good results?
I’d also like to know which game controller winedloverloader found that to be needed for.
Heads up, by the way, that I’ve written a guide of my own. It’s here.
https://www.linuxquestions.org/questions/linux-games-33/howto-getting-steam-wine-game-controllers-working-together-4175618012/
An Xbox360 controller is the one in question, works well with Steam on its own but LT and RT didn’t show up on x360ce without the “–mimic-xpad” switch.
Thanks Dugan for the heads up, looking forward to checking out your guide.
Thanks to Ekianjo for the current guide. Saved me from mounting frustration to be sure.
If it’s an Xbox 360 controller, then use dumbxinputemu instead of x360ce. It (dumbxinputemu) works the same as x360ce, except that instead of needing configuration, it has hardcoded settings that are correct for Xbox 360 controllers.
https://github.com/kozec/dumbxinputemu
I did this on Calculate Linux 17.6, adding the “–mimic-xpad” switch got LT and RT to show up.
I just tested WINE 3.3’s new SDL2 support, and it looks like none of this is really needed now.
I set my SDL_GAMECONTROLLERCONFIG string for my DualShock 4.
When I ran XInputTest in WINE, it detected my DualShock 4 as XInput, with the controls mapped correctly.
When I fired up Ducktales: Remastered, it also detected my DualShock 4 as XInput, with the controls mapped correctly.
In neither case was any further configuration needed. I did not need to swap out DLLs or even to disable a device (js or event) in “wine control”. It just worked.