Tailsounet May 22, 2015 @ 5:00pm
[Tuto] [Linux] Connect a controller on steam
One can encounter a difficulty to connect its controller on linux. I created this tutorial to help others who might have met the same problems as me. These solutions are those that have worked for me.
(tested on a Debian Jessie 3.16.0-4-amd64)

English isn’t my mother tongue, so please excuse any mistakes.

Here it is my shell script to automatically connect my controller

#see : http://askubuntu.com/questions/608386/using-ipega-bluetooth-gamepad-with-steam-linux if [ $# -gt 0 ]; else echo "usage : $0 device_address" echo " to get device_address use hcitool" exit 1 fi if [ $(id -u) != 0 ]; then echo "You're not root" # elevate script privileges su -c "$0 $1" root fi device_address=$1 event=`cat /proc/bus/input/devices | grep $device_address -i -A 1` #connect the device if [ "$event" = "" ]; then echo "... connecting device"; hidd --connect $device_address event=`cat /proc/bus/input/devices | grep $device_address -i -A 1` fi echo "Device $device_adress connected" #get n_event of device n_event=`echo "${event:55:7}"` xboxdrv --evdev /dev/input/$n_event --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_Z=x2,ABS_RZ=y2,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y --axismap -Y1=Y1,-Y2=Y2 --evdev-keymap BTN_A=a,BTN_B=b,BTN_X=x,BTN_Y=y,BTN_TL=lb,BTN_TR=rb,BTN_TL2=lt,BTN_TR2=rt,BTN_THUMBL=tl,BTN_THUMBR=tr,BTN_SELECT=back,BTN_START=start --silent

Calibrate its controller

To calibrate my controllers on my debian, I used jstest-gtk

tails@Luffy:~$ apt-cache policy jstest-gtk jstest-gtk: Installed: 0.1.1~git20140501-1

It is a graphic tool very user-friendly

screenshot of jstest-gtk[pingus.seul.org]

Recognize the controller

cat /proc/bus/input/devices

Find the controller among the list, it looks like something like this

I: Bus=0000 Vendor=0000 Product=0000 Version=0000 N: Name="Xbox Gamepad (userspace driver)" P: Phys= S: Sysfs=/devices/virtual/input/input26 U: Uniq= H: Handlers=event17 js2 B: PROP=0 B: EV=b B: KEY=7cdb000000000000 0 0 0 0 B: ABS=3061b

Connect a wired controller

You simply have to plug in your controller on your computer. To be able to use your wired controller under your computer, you may need first to install some required packages :
  • jstest-gtk
  • joystick
  • xboxdrv

sudo apt-get install --install-recommends jstest* joystick xboxdrv

Connect a bluetooth controller

To connect your bluetooth controller, you may require the same packages as a wired controller. In addition to this packages, you have to get a package to manage bluetooth on your computer, something like blueman-applet

Then we have to run the following command to search the address of your device:
hcitool scan

Then we have to run the following command to connect your device on your computer (if your address is : A1:B2:C3:D4:E5:F6)

hidd --connect A1:B2:C3:D4:E5:F6


Make steam recognize the controller

http://askubuntu.com/questions/608386/using-ipega-bluetooth-gamepad-with-steam-linux

If your controller is not recognized by steam, you have to create virtual xbox compatible gamepad by using xboxdrv package


You simply have to use this following command as a root. eventXX have to be replaced by the number of event in the Handler line (see section : recognize the controller). With the example it is event17.

xboxdrv --evdev /dev/input/eventXX --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_Z=x2,ABS_RZ=y2,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y --axismap -Y1=Y1,-Y2=Y2 --evdev-keymap BTN_A=a,BTN_B=b,BTN_X=x,BTN_Y=y,BTN_TL=lb,BTN_TR=rb,BTN_TL2=lt,BTN_TR2=rt,BTN_THUMBL=tl,BTN_THUMBR=tr,BTN_SELECT=back,BTN_START=start --silent &


I hope this helps,
Last edited by Tailsounet; May 22, 2015 @ 5:06pm
< >
Showing 1-1 of 1 comments
Quarentenado Jan 7, 2017 @ 4:52am 
Hi, it's a lot of full work.

I do not like.


So, i will give my option

Open the terminal and type:


sudo gedit /etc/udev/rules.d/71-wiiremote.rules


This is my configuration:


KERNEL=="uinput", MODE="0666"
SUBSYSTEM=="input", ATTRS{name}=="PG-9028", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"


Save, it's works on Ubuntu 16.10


If you are using the steam beta client, desability the options of joystick configuration, i was unmarked all, and.. Reboot and be happy.


Ah, you can be more simple just create an UDEV RULE with this configuration for ALL ípega controllers

SUBSYSTEM=="input", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"

If you wanna be generic and have no time to lose, you can put this in terminal:

sudo sh -c 'echo SUBSYSTEM\=\=\"input\", MODE\=\"0666\", ENV{ID_INPUT_JOYSTICK}\=\"1\" > /etc/udev/rules.d/71-wiiremote.rules'


Type your password, press enter and reboot.

It's done
Last edited by eram; Jan 7, 2017 @ 5:40am
< >
Showing 1-1 of 1 comments
Per page: 1530 50

Date Posted: May 22, 2015 @ 5:00pm
Posts: 1