How do I use a PlayStation 3 Sixaxis controller with Ubuntu to control games

110,078

Solution 1

You should use sixad/QtSixA http://qtsixa.sourceforge.net/ . Just install from the repo and pair with sixpair while the sixaxis is connected with usb, and then connect with Bluetooth by pressing the PS button.

sudo add-apt-repository ppa:falk-t-j/qtsixa
sudo apt-get update
sudo apt-get install qtsixa

Connect with USB

sixpair

Disconnect sixaxis from USB

sixad -s

press PS button to connect over bluetooth

Solution 2

You are able to connect the controller to the pc via usb cable. This is supplied with a PS3 device (it is the primary way to charge the controller). I don't know how to connect the controller via bluetooth to your computer (if you even have a bluetooth receiver), so this answer focusses on usb connection. It might be that the controller already works if you do this (You can test this with jstest-gtk as listed below). I use another similar PnP controller, and it works without difficulty.

if it does not work automatically, this link might answer your question. In summary:

  • install xboxdrv from the Ubuntu Software Center or with sudo apt-get install xboxdrv
  • start xboxdrv with sudo xboxdrv --detach-kernel-driver
  • If you press the Playstation button, the computer will receive its input and simulate it as an Xbox 360 controller, which should work the same as the playstation controller.

You can test the functionality of your controller through Jstest-gtk (install: sudo apt-get install jstest-gtk)

Good luck, let me know if it works.

Solution 3

Sorry to be that guy but compiling from source worked for me and the PPA has been pretty quiet for a while now (not weird at all considering the GitHub hasn't been updated in 4 years and the "final" version was released around the same time), so don't hold your breath for a xenial package.

The excellent guide I linked gives you a few commands to download all prereqs and compile but I will summarize here:

sudo apt-get update &&
  sudo apt-get install git dialog build-essential pyqt4-dev-tools libusb-dev libjack-dev libbluetooth-dev python-dbus checkinstall -y &&
  git clone https://github.com/falkTX/qtsixa.git && 
  cd qtsixa &&
  make &&
  sudo checkinstall

Solution 4

There is nothing to install anymore on recent versions of Ubuntu, as Dualshock 3 (and 4 I believe) is natively supported by the Kernel, in both USB and Bluetooth.

USB Usage

If you want to use it also via Bluetooth, prefer to make the Bluetooth setup first.

Connecting the controller via USB just works™ out of the box. The main drawback is that the controller remains paired with your PlayStation, so when you disconnect the controller, it turns on the PlayStation. Remember to turn it off.

To avoid this, you need to pair the controller via Bluetooth.

Bluetooth usage

First connection

  1. If you controller is connected over USB, disconnect it first.
  2. Open Bluetooth settings in the Gnome Control Center
  3. Ensure Bluetooth is enabled, and keep that window open
  4. Connect the controller via USB
  5. Accept the confirmation dialog that opens: enter image description here
  6. Disconnect the USB cable

From now on, you just have to press the PlayStation button to connect it via Bluetooth to your PC.

Note that this will dissociate the controller from your PlayStation (otherwise it would still turn it on when you press the PlayStation button). If you want to re-associate it, you will need to connect it via cable first, like you did with your PC.

Turning off the controller

There are 2 options to turn off the controller:

  1. Maintain L2, R2 and the PlayStation button pressed for 10 seconds; or
  2. Go to the Bluetooth settings, select your device, and disconnect it with the toggle.
Share:
110,078

Related videos on Youtube

nerd7473
Author by

nerd7473

nerd/geek

Updated on September 18, 2022

Comments

  • nerd7473
    nerd7473 3 months

    How do I use a PlayStation 3 controller with Ubuntu?

    • Maxwel Leite
      Maxwel Leite over 5 years
      Answer for Ubuntu 16.04 which really works!
  • nerd7473
    nerd7473 almost 9 years
    I will try and let you know
  • Exile
    Exile almost 8 years
    Seems to work for me!
  • Exile
    Exile almost 8 years
    I Could not get this working on linux mint 17
  • Exile
    Exile almost 8 years
    Never mind I have just got this working!
  • Exile
    Exile almost 8 years
    Sorry for yet another comment but this is amazing with MAME!
  • migueleon
    migueleon almost 8 years
    Doesn't work anymore with ubuntu 14.10. I tested it with the 14.04 debs.
  • Yokai
    Yokai about 6 years
    This should be the accepted answer.
  • Maxwel Leite
    Maxwel Leite over 5 years
    Not work for me on 16.04
  • Maxwel Leite
    Maxwel Leite over 5 years
    Pair is sucessful but don't connect to controller.
  • Maxwel Leite
    Maxwel Leite over 5 years
    This not recommended... this cold break your system
  • Luisg123v
    Luisg123v over 5 years
    @Maxwel Leite are you able to start sixad successfully? Did you take into account what I explained about preventing sixad from starting at the boot?
  • Maxwel Leite
    Maxwel Leite over 5 years
    yes sixad starts and wait for press PS button - does work and yes, I disable sixad from start on boot .Thank you for try to help me but I solve the problem for my own.
  • dotz
    dotz almost 5 years
    Answer downvoted. Changing the description of your release is NOT the way you do things on Ubuntu or Debian.
  • Void
    Void about 3 years
    I get [email protected]:~/projects/sixad-master$ sudo sixpair USB_REQ_GET_CONFIGURATION: Broken pipe Current Bluetooth master: Unable to retrieve local bd_addr from hcitool dev. Please enable Bluetooth or specify an address manually.
  • Hybris95
    Hybris95 about 2 years
    Works on Pop_Os like a charm
  • Batcastle
    Batcastle over 1 year
    Changing lsb-release files is a very bad idea and can lead to extreme breakage. While this may get the PS3 controller working, the draw backs of this approach outweigh any benefits.