It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
Can anyone confirm functional gamepad support under Linux? It's tough to find details out there, but supposedly MonoGame-driven games such as this Transistor do not properly handle joystick/gamepad input. When starting the game there is output acknowleding my USB device under /dev/input/js0 but it is not operational within the game. I cannot even select the gamepad icon in the configuration menu in the game.

I will be using the qjoypad utility to map buttons to mouse/keyboard to bypass the dependency of the game properly supporting a gamepad natively, but nevertheless I'd like to know if my suspicion is correct or if the generic/default driver the game is using cannot handle the gamepad I was testing with. Ultimately, this thread would be documenting Linux Transisitor and gamepad support for other GOG shoppers to use as a reference.
No posts in this topic were marked as the solution yet. If you can help, add your reply
avatar
kitsunech: Can anyone confirm functional gamepad support under Linux? It's tough to find details out there, but supposedly MonoGame-driven games such as this Transistor do not properly handle joystick/gamepad input. When starting the game there is output acknowleding my USB device under /dev/input/js0 but it is not operational within the game. I cannot even select the gamepad icon in the configuration menu in the game.

I will be using the qjoypad utility to map buttons to mouse/keyboard to bypass the dependency of the game properly supporting a gamepad natively, but nevertheless I'd like to know if my suspicion is correct or if the generic/default driver the game is using cannot handle the gamepad I was testing with. Ultimately, this thread would be documenting Linux Transisitor and gamepad support for other GOG shoppers to use as a reference.
Hi kitsunech,

What gamepad are you using? We can confirm it supports Xbox360 gamepad.

The game uses SDL2 and if your gamepad is not supported you can try dropping a gamecontrollerdb.txt file in the game folder (next to game binaries) and adding its configuration to the file. You will find it here: https://github.com/gabomdq/SDL_GameControllerDB/

If that won't help, you can also contact the author of the Linux port of Transistor: http://flibitijibibo.com/
Post edited February 27, 2017 by linuxvangog
The controller is Gravis Gamepad Pro. I had tested it by mapping via qjoypad, which works fine, but due to how the game is played, this controller can't provide all the input control required; a gamepad with dual analog sticks is required for Transistor due to needing to be able to control both the movement of the protagonist, and to control direction/aim for executing techniques or attacks.

This device is on the list for SDL GameControllerDB but since I've already identified that I need a different gamepad to adequately play, I won't test this one. I'll be configuring the Wii U Pro Controller once I set up Bluetooth and then I'll revisit Transistor. I do see the Wii U Pro Controller on that list as well, though!
Thank you linuxvangog! Your advice led me to a solution which I shall explain here to aide others who may have the issue I have had figuring this out.

I have set up Bluetooth and resolved an issue where the Wii U Pro Controller is treated as a mouse device by X.org. A special rules conf file defines overrides to ensure the input from this device is not to be confused or interpreted as a mouse. That aside, Transisitor will start up and identify that such a device exists, but it will still resort to the generic mono joystick driver, which doesn't work. There's no response from the gamepad within the game.

The SDL config that linuxvangog provided is the solution. There's an entry there for Wii U Pro Controller for Linux, and for some reason the definition was incorrect with A and B buttons swapped, and X and Y buttons swapped. I corrected the definition yielding the following line:

050000007e0500003003000001000000,Nintendo Wii U Pro Controller,platform:Linux,a:b1,b:b0,x:b2,y:b3,back:b8,start:b9,guide:b10,leftshoulder:b4,rightshoulder:b5,left stick:b11,rightstick:b12,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,dpup:b13,dpleft: b15,dpdown:b14,dpright:b16,

Al the other buttons matched up just fine. Regarding the config screen within the game: you cannot select the gamepad icon with the mouse. Simply press a button on the gamepad. The game will respond to this input and switch itself over to gamepad config mode by itself. You will immediately notice the game also replaces all button icons with the buttons from a controller (looks like the Xbox 360 gamepad pattern actually, but that coincidentally aligns with a Wii U Pro Controller without confusion.)

The game's native gamepad support changes how input is handled and assigned, so this is definitely preferred over using a mouse/keyboard mapper to the gamepad. Using the SDL definition above, the game boots identifying the controller and use the special appropriate driver. The following line should resemble what is shown in output when starting the game:

Controller 0, Nintendo Wii U Pro Controller, will use SDL_GameController support.

Final note: the way the setting must be consumed from the gamecontrollerdb.txt file. It's an environment variable consumed by SDL in general. With the aforementioned file name, use the following in the shell:

$ export SDL_GAMECONTROLLERCONFIG=`cat ./gamecontrollerdb.txt`

Obviously for a persisting effect it may be desirable to put this export statement (and perhaps substitute out the inline cat call) into the shell profile file (e.g. ~/.bashrc for Bash shell).

I'm happy to have this one worked out, and the game's native gamepad support is definitely well defined. After a quick test, with the native support, it doesn't look like an analog stick controller is necessary, and I could probably use my Gravis Gamepad Pro if I wanted to. I couldn't tell that the right stick was needed and the d-pad works just as well as the left stick. Note that this does not apply if the input configuration is to map mouse/keyboard to a gamepad where it seems like dual sticks would be essential.