You can sign up to get a daily email of our articles, see the Mailing List page!

Recently I solved an issue for setting up my Wireless (via Bluetooth) controller on Steam for Linux (distr. Ubuntu 18.10), and decided to elaborate my experience a little better, and share my results and observations with you all.

In my previous article on the same topic, I dealt with the basic setup of the driver and the application for games which run natively on Linux. In the following sections I have considered instead the cases of games running with Wine or Proton (via Steam Play).

The relevant steps mentioned in the previous article are the ones that enabled us to launch the xboxdrv with the following command:

$ xboxdrv --evdev "/dev/input/event-asus-gamepad" --config xboxdrv.config 

And that consequently enabled us to launch the Steam environment with a similar script:

#!/bin/sh

if [ -h /dev/input/event-asus-gamepad ]
then
# remove any previous instance:
        killall -KILL xboxdrv

# start the new driver in userspace mode:
        xboxdrv --evdev "/dev/input/event-asus-gamepad" \
        --config xboxdrv.config &
fi

/usr/bin/steam %U

The configuration steps might vary according to the specific input API used in the game implementation.

 

Games running on Wine/Proton with DirectInput support

Most of the games issued until 2015 used to have support for the DirectInput API, which used to be the first Microsoft API (available in the DirectX library package) to process data from a joystick, or other game controller. Additional information on the API are available in the official Microsoft API documentation.

Few games such as Dark Souls (the original release and the Prepare to Die edition, but not the Remastered), Dark Souls II (both the original and Scholar of the First Sin releases), One Piece Pirate Warriors 3 and several else I tried are actually still using this API.

Before setting up the DirectInput controller configuration, make sure to turn the controller on and launch the xboxdriver as shown in the section above, with the following statement:

$ xboxdrv --evdev "/dev/input/event-asus-gamepad" --config xboxdrv.config

Then, in order to access to the driver setup, you have to run the following command:

$ WINEPREFIX={path to the Wine Prefix for the specific game} wine control

Please keep in mind that in case of use of Steam Play (Proton) the WINEPREFIX is usually the following:

$ export WINEPREFIX=~/.steam/steam/steamapps/compatdata/${GAME_ID}/pfx

and the wine executable to use is under the following path:

~/.steam/steam/steamapps/common/Proton\ ${VERSION}/dist/bin/

where:

  • ${GAME_ID} is the Unique App ID of the specific game in the Steam Store (i.e. 211420 for Dark Souls: Prepare to Die, 335300 for Dark Souls II: Scholar of the First Sin, etc.);
  • ${VERSION} is the version of Proton that Steam Play uses specifically for that game, available with the following statement:
$ cat .steam/steam/steamapps/compatdata/${GAME_ID}/version

I.e., for "Dark Souls II: Scholar of the First Sin", the wine control statement above would look like this:

$ WINEPREFIX=~/.steam/steam/steamapps/compatdata/335300/pfx/ ~/.steam/steam/steamapps/common/Proton\ 3.16/dist/bin/wine control

Once you launch the wine control statement, select the Game Controllers app from the newly opened window:

In the list, select the entry corresponding to the hardware controller (in my case "ASUS Gamepad") and press Disable, as show in the picture here below:

Press then OK and close the wine control application. This will make sure that DirectInput will get the Input just from the virtual controller defined via the xboxdrv driver.

Open them Steam and run the game to try the applied settings.

Alternatively to the guided procedure above, more skilled users might perform the same activity via the Registry Keys defined for that specific Wine Prefix. All the documentation is available at this link.
 

Games running on Wine/Proton with Xinput support

Most recent games (such as The Witcher 3: Wild Hunt, Dark Souls Remastered, Dark Souls 3 and generally all the games running just for the Windows 64bit architecture) use the Microsoft Xinput API. Additional information for this API are available in the official Microsoft documentation.

If the Xbox Controller Support has been correctly configured in Steam (as shown in the picture here below), there is nothing else you need to do. The in-game Xinput API will recognise the controller automatically as soon as you press any button or move any axis.

Conclusions

The observations I have collected in these two articles have just the purpose to share my favourite procedure and setup for using the same controller (and keeping the same configuration) in several cases.

I find this procedure particularly useful either if I am looking for a casual gaming day (where I swap between several games in my Steam library) or when I decide to focus for just one of them for the whole day.

The two main reasons I decided to migrate (100% successfully) to a Bluetooth controller are of course the following:

  • It's wireless
  • It's a standard

But of course feel free to add your own comments and observations about the topic. I'll be pretty glad to answer and discuss about the topic.

8 Likes, Who?
We do often include affiliate links to earn us some pennies. We are currently affiliated with GOG and Humble Store. See more information here.
13 comments
Page: 1/2»
  Go to:

afettouhi 27 January 2019 at 9:49 pm UTC
Thanks for the guide. A little partly of topic question. I am using my Steam controller mostly for playing games but when I use my controller with a game through proton or wine the screensaver kicks in every 15 minutes, because that is the interval I set it to. How do I get around that issue I am on Arch with KDE btw? I have no issues with native Linux games and the screensaver only wine/dxvk/proton games.
hardpenguin 28 January 2019 at 1:16 am UTC
This is some advanced stuff. For games that only support DirectInput I usually just use Steam Big Picture to map the keyboard buttons to the controller.
Feda 28 January 2019 at 11:55 am UTC
Steam Controller is total trash. I bought that thing a couple of years ago and it only worked for about a moth. Hasn't worked properly since. I tried it out yesterday, after not using it for at least a year, and it works inside steam but not in any games. I tried updating, reverting and recovering firmware and none of it worked. I tried pretty much everything that was suggested by Steam Forums (users only, no comments from Valve).

I hope nobody here gets encourages by this article to buy that piece of crap.
liamdawe 28 January 2019 at 12:17 pm UTC
FedaSteam Controller is total trash. I bought that thing a couple of years ago and it only worked for about a moth. Hasn't worked properly since. I tried it out yesterday, after not using it for at least a year, and it works inside steam but not in any games. I tried updating, reverting and recovering firmware and none of it worked. I tried pretty much everything that was suggested by Steam Forums (users only, no comments from Valve).

I hope nobody here gets encourages by this article to buy that piece of crap.
I have two Steam Controllers, used across two different computers and a laptop. Practically never have an issue with it.

If it's not detected in games, sounds like you don't have udev rules setup for it. You can setup that easily by installing steam-devices on Ubuntu, which seriously should be a dependency on the Steam install. I've bugged Canonical about it multiple times.

That, or you may now be experiencing an issue as a result of it now having a driver in the Linux Kernel (noted here).
drmoth 28 January 2019 at 12:25 pm UTC
FedaSteam Controller is total trash. I bought that thing a couple of years ago and it only worked for about a moth. Hasn't worked properly since. I tried it out yesterday, after not using it for at least a year, and it works inside steam but not in any games. I tried updating, reverting and recovering firmware and none of it worked. I tried pretty much everything that was suggested by Steam Forums (users only, no comments from Valve).

I hope nobody here gets encourages by this article to buy that piece of crap.

I haven't had any problems with it. It's actually really great as a companion to a regular controller, for those games that are keyboard only.
Feda 28 January 2019 at 12:26 pm UTC
I will try your solution as well, but the problem I'm having is widely reported on Windows too.
LordDaveTheKind 28 January 2019 at 12:50 pm UTC
afettouhiThanks for the guide. A little partly of topic question. I am using my Steam controller mostly for playing games but when I use my controller with a game through proton or wine the screensaver kicks in every 15 minutes, because that is the interval I set it to. How do I get around that issue I am on Arch with KDE btw? I have no issues with native Linux games and the screensaver only wine/dxvk/proton games.

It used to happen to me as well. Decided to disable the screensaver at the moment, but I'm looking for a workaround.
LordDaveTheKind 28 January 2019 at 12:54 pm UTC
hardpenguinThis is some advanced stuff. For games that only support DirectInput I usually just use Steam Big Picture to map the keyboard buttons to the controller.

yes unfortunately the most insidious issue for me was with the triggers and the axes: without any configuration, the RT was mapping the horizontal right axis (and then the camera controls). It was quite some fun to see the whole world spinning around when launching the game.
LordDaveTheKind 28 January 2019 at 1:04 pm UTC
FedaSteam Controller is total trash. I bought that thing a couple of years ago and it only worked for about a moth. Hasn't worked properly since. I tried it out yesterday, after not using it for at least a year, and it works inside steam but not in any games. I tried updating, reverting and recovering firmware and none of it worked. I tried pretty much everything that was suggested by Steam Forums (users only, no comments from Valve).

I hope nobody here gets encourages by this article to buy that piece of crap.

Hi Feda,
what happens if you try the evtest command? Do you get the expected keys in output for the pressed buttons in input?

$ evtest /dev/input/eventX


Last edited by LordDaveTheKind at 28 January 2019 at 1:05 pm UTC
hardpenguin 28 January 2019 at 1:05 pm UTC
LordDaveTheKindyes unfortunately the most insidious issue for me was with the triggers and the axes: without any configuration, the RT was mapping the horizontal right axis (and then the camera controls). It was quite some fun to see the whole world spinning around when launching the game.
I remember this issue when I tried to map keys for GTA: San Andreas. I finally discovered a solution although I forgot what was it. It is somewhere in my GTASA Big Picture controller settings
  Go to:
While you're here, please consider supporting GamingOnLinux on Patreon, Liberapay or Paypal. We have no adverts, no paywalls, no timed exclusive articles. Just good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!

Due to spam you need to Register and Login to comment.


Or login with...

Livestreams & Videos
Community Livestreams
  • Crawl About: „StarCrawlers“
  • Date:
See more!
Popular this week
View by Category
Contact
Latest Comments
Latest Forum Posts