The most recent versions of RetroPie include the packages needed for setting up a PS3 controller. Connecting over USB is Plug-and-Play–literally just plug your controller into the Pi while EmulationStation is running and it should detect a gamepad to configure. Connecting a PS3 controller via Bluetooth requires installation of a special PS3 driver located in RetroPie setup.
Before booting the Raspberry Pi, make sure that a supported Bluetooth adapter is connected (for the Pi 3, onboard Bluetooth works perfectly as of RetroPie 4.0+). If you have a Playstation 3 console near by, make sure it is totally powered off–either unplugged or switched off in the back–because the PS3 controller may try to automatically pair with the console otherwise. While a separate powered USB hub is not required to set up a controller, be mindful of your overall power draw when attaching peripherals. If you are overclocking, for example, it will be much safer to use a powered USB hub than drawing current from the Pi itself.
After your Pi boots up, you need to enter RetroPie setup. You can do this one of two ways:
- Setting up your keyboard or PS3 controller as a USB gamepad in EmulationStation (you must configure a gamepad before you can use EmulationStation), navigating to the “RetroPie” icon in the Home Screen, and selecting it using whatever key you mapped “A” to on your gamepad.
- Pressing F4 to quit EmulationStation and running the Retropie script from the terminal. Once you’re in the terminal, follow these instructions to run the
- Navigate to the “RetroPie” icon in the Home Screen and select it using whatever key you mapped “A” to on your gamepad, and go to RetroPie Setup
- Once in the RetroPie GUI, choose [Manage packages] > [driver].
- Select PS3 Controller Driver (“ps3controller”), and then select [Install from source].
- If you have a Tpfoon PS3 Controller you need to go to
[Configuration / Options]>
[Install/Pair PS3 Controller (Clone support Shanwan)]
- If you have a Tpfoon PS3 Controller you need to go to
- Once installation completes, exit RetroPie setup and return to the EmulationStation Home Screen.
- Press “Start” to enter the EmulationStation Menu, and select Configure Input.
- Disconnect your PS3 controller from USB. Now hold the PS button on the controller down until you see the lights on it flash sequentially. The controller should now be connected via Bluetooth.
- Emulation Station should now detect another gamepad connected. Hold any button down on the controller to begin configuring it.
And you now have a functional PS3 controller over Bluetooth.
Some PS3 Controller clones (such as the Shanwan PS3 Controllers) will not connect over bluetooth until they are physically connected and removed from a normal USB connection. If you are having issues pairing a controller, try connecting it via USB for several seconds, disconnecting it, and then pairing it over Bluetooth.
Note: Do not enable other bluetooth options as these will conflict with the PS3 specific bluetooth setup (sixad)
At the EmulationStation Home Screen, press F4 to quit EmulationStation and run the Retropie script from the terminal. Once you’re in the terminal, follow these instructions to run the
Although it is not required, it is always a good idea to update the setup script by selecting
Sudo Update RetroPie-Setup Script
After updating, run the
retropie_setup.sh script again.
Manage packages >
Manage driver packages >
After it finishes compiling, the GUI prompt will ask you to make sure that your Bluetooth dongle is connected. Press enter and connect your PS3 controller.
Once this is done, you can disconnect the controller USB cable, and press the Playstation button to pair it via Bluetooth.
After installation of PS3 controller driver bluetooth connection of new controllers will be configured automatically if you connect them over usb.
For bluetooth pairing to persist between reboots you need to make sure sixad is executed during startup. Exit EmulationStation and and edit
sudo nano /etc/rc.local
sixad --start & before the line
exit 0 and save (ctrl-x then y)
If the keys stop working in-game after switching to bluetooth or you want to configure inputs manually you can do this the recommended way using the RetroArch configuration UI (under
input) or by creating a input map manually:
touch PLAYSTATION\(R\)3\ Controller.cfg
nano PLAYSTATION\(R\)3\ Controller.cfg
input_driver = "udev"
input_device = "PLAYSTATION(R)3 Controller"
input_b_btn = "13"
input_y_btn = "15"
input_select_btn = "0"
input_start_btn = "3"
input_up_btn = "4"
input_down_btn = "6"
input_left_btn = "7"
input_right_btn = "5"
input_a_btn = "14"
input_x_btn = "12"
input_l_btn = "10"
input_r_btn = "11"
input_l2_btn = "8"
input_r2_btn = "9"
input_l3_btn = "1"
input_r3_btn = "2"
input_l_x_plus_axis = "-0"
input_l_x_minus_axis = "+0"
input_l_y_plus_axis = "+1"
input_l_y_minus_axis = "-1"
input_r_x_plus_axis = "-2"
input_r_x_minus_axis = "+2"
input_r_y_plus_axis = "+3"
input_r_y_minus_axis = "-3"
input_enable_hotkey_btn = "0"
input_exit_emulator_btn = "3"
To disconnect the controller, hold down the ps3 button for 10 seconds.
That’s a problem with the controller itself rather than RetroPie. The controller sends very short key presses (usually d-pad directions) that are commonly ignored by games, but might be noticed outside them. Even genuine brand-new controllers may or may not suffer this issue. The same problem has been observed on other brands like Buffalo and Wii. If analog input isn’t strictly necessary to you, you can try to map one of the sticks as a d-pad and adjust its dead zone if you still have phantom menu navigation.