How to Use a PS3 Controller With Ubuntu

Updated July 20, 2017

The Sony PlayStation 3 (PS3) uses a USB interface for its controllers. This allows you to connect the controller to your computer without an adaptor. Ubuntu Linux can be used with the controller, but it will require a few additional drivers and some configuration. The PS3 controller uses an open USB device driver. A version of this driver is available on Ubuntu. In order to use the controller, either with games or as an input device, like a mouse, the controller must also be configured with the X11 graphical server.

Click the "Applications" menu, then click the "Accessories" folder and click the "Terminal" option.

Type the following command to install the necessary USB library:

sudo apt-get install libusb-dev libusb-0.1-4

Connect the PS3 controller, then download the "sixpair" driver to your downloads directory (See Resources).

Type the following command to switch to the download directory:

cd /home/user/downloads

Replace "user" with your user name.

Type the following command to compile sixpair:

gcc -o sixpair sixpair.c -lusb

This will compile the sixpair driver for your system.

Type the following command to run the sixpair set-up:

sudo ./sixpair

Disconnect the PS3 controller when the set-up program finishes.

Type the following command to download the utilities required for console integration:

apt-get source bluez-utils && sudo apt-get build-dep bluez-utils

Type the following command to restart the Bluetooth service:

sudo /etc/init.d/bluetooth stop && sudo /etc/init.d/bluetooth start

Type the following command to install the X11 utilities for the PS3:

sudo apt-get install xserver-xorg-input-joystick

The PS3 controller will now be recognised by both the kernel and X11 graphical system. It can be plugged in like any other input device and will control the mouse and work with games.

Cite this Article A tool to create a citation to reference this article Cite this Article

About the Author

Mark Pool has been a technical writer and translator specializing in information technology since 2001. After receiving a Bachelor of Arts in English from Columbia University, he went on to study the IT sector and receive technical certifications from Microsoft, Cisco and Red Hat.