Since the last officially supported version is "vivid"(Ubuntu 15.04) from QtSixA PPA and don't work for Ubuntu Xenial (16.04).
Ubuntu – How to connect Dualshock 3 controller (PS3 Sixaxis Gamepad) on Ubuntu 16.04
gamepadgamesps3
gamepadgamesps3
Since the last officially supported version is "vivid"(Ubuntu 15.04) from QtSixA PPA and don't work for Ubuntu Xenial (16.04).
Best Answer
On Ubuntu 16.04 - Xenial (maybe work on above)
Note: Don't work for PS3 Gasia / Shanwan game controllers (China/fake PS3 controllers) -- I tested only with a Shanwan controller!
Install from source
Since the last officially supported version is "vivid"(Ubuntu 15.04) from QtSixA PPA and don't work for Xenial (16.04). So we need compile from the only repo that works (and has updated) and allow to connect two controllers at the same time was the fork of RetroPie:
Configuring
1.) First make sure you have Bluetooth on your computer.
2.) Plug in the controller via USB first to do the initial pairing. Run the sixpair command:
Sample of output when successful pair:
XX:XX:XX:XX:XX:XX is the MAC of your Bluetooth device.
3.) Unplug the controller and run:
This starts the sixad daemon which waits for incoming PS3 controller connections. sixad will completely take over the Bluetooth adapter (exclusive control, so no other Bluetooth devices other than PS3 controllers will work after you start sixad).
4.) Press the ps3 button on your PS3 controller and wait for 2-3 seconds. You'll feel the controller vibrate when it successfully connects.
Sample of output when successful connected:
To turn off sixad and disable control: Just press CTRL+C
Test the functionality [Optional]
You can test the functionality of your controller through Jstest-gtk (install:
sudo apt-get install jstest-gtk
)Disable sixad service [Optional]
Warning: sixad will completely take over the Bluetooth adapter (exclusive control, so no other Bluetooth devices other than PS3 controllers will work after you start sixad).
References:
https://askubuntu.com/a/834907/139248
https://retropie.org.uk/forum/topic/2913/guide-use-qtsixa-on-ubuntu-16-04-and-derivatives