Tutorial
Updated
Using an UNWIRED PlayStation 4 controller in Linux (Fedora32)
Even though Bluetooth connections work in PS4 versions of Linux, the PlayStation 4 controller will not connect. I have seen several people say that a wired controller is needed to be used for PS4 Linux. This is not true for Fedora 32 and potentially other distros. As of now, I find Fedora 32 to be the best distro for PS4 Linux. Yes, Fedora and Manjaro both have issues with Bluetooth. I haven't tried Gentoo yet but it probably has the same problem. This guide is here to resolve that.
The PS4 controller is a great overall controller for gaming but also in the OS itself. The touchpad on the controller works just like the touchpad on a laptop in Linux where left click works when you press the bottom left corner and right click being the bottom right. This is really handy for using menus to open different software without having to grab your keyboard.
To note, I'm using a white PS4 Pro CUH-7102B with the original ITMania release of Fedora 32 on 6.72 firmware. The variety of PS4s and kernels available makes it hard to guarantee success. If it works it works, if it doesn't it doesn't. If you're testing, please post the the model number, OS version and firmware to help other users if you have success or not.
For this to work, you will need:
- A PlayStation 4 with Fedora 32 Linux installed.
- A keyboard
- A mouse
- A USB cable to connect your controller to the PS4.
- A seperate PlayStation 4 controller to the one you are using in Orbis. It should also work with PS3 controllers or any controller which connects via Bluetooth and you can also connect via USB.
- A USB hub for connecting multiple devices into slot 2.
Do this at your own risk. Updating the wrong files or errors in changing drivers in Linux can break your install. If you follow instructions correctly, this shouldn't be a problem but look into making backups whenever you mess with drivers if you aren't confident with reinstalling and configuring stuff the way you like it if something does go wrong. (See this thread: https://gbatemp.net/threads/guide-using-a-backup-restore-point-of-your-usb-linux-install.581673/)
1. Uninstall Bluez
in terminal:
sudo su
enter password
dnf remove bluez
2. Install Blueman
in terminal:
dnf install blueman
3. Reboot
4. Pair the controller
Click Menu (bottom left corner) > Preferences > Bluetooth Manager.
Set the controller to seek (hold the playstation button then press share)
Click Device > Trust
5. Make the file /etc/udev/rules.d/bluetooth.rules
in terminal:
sudo su
enter password
sudo nano /etc/udev/rules.d/bluetooth.rules
and add the following in the file:
#
# stops power saving on bluetooth
# install in /etc/udev/rules.d/
ACTION=="add", SUBSYSTEM=="hid", ATTR{power/control}="on"
6. Save and close the file
ctrl + o
press enter
ctrl + x
7. Check to see if Bluetooth is autoenabled
This should be there by default in Fedora 32. In Manjaro it isn't so just to be sure:
in terminal:
sudo nano /etc/bluetooth/main.conf
Scroll down and look for [Policy] and [General]. Somewhere underneath those, it should say:
[Policy]
AutoEnable=true
and
[General]
DiscoverableTimeout = 0
Discoverable=true
If you can't see those under them, add them. You might have lines which begin with a # in between them. Pretend they don't exist. They are notes in the code.
This allows for Linux to boot with Bluetooth enabled. If you use Manjaro, this is also really handy regardless if you are using Bluetooth for a controller or not. I personally use a Bluetooth keyboard.
Save and close the file if you added anything.
ctrl + o
press enter
ctrl + x
8. Reload the rules
in terminal:
udevadm control --reload-rules && udevadm trigger
or reboot the system if you have the patience.
9. Plug the controller into the second USB port and let it recognise it automatically
10. Click "always recognise" in Bluetooth Manager (top right corner)
11. Unplug the controller
You should now have access to the controller wirelessly in Linux.
This is how mine works:
edit:
Issues:
Before you make any changes, update your Linux install. ONLY do this in terminal and back up your install! I cannot stress this enough.
in terminal:
sudo dnf update -x kernel*,libdrm*,mesa*,xorg-x11-drv-a*
Testing takes time. Play around with these suggestions. It can work the way you want it to if you are patient.
Disable Auto-suspend
I have found that after a few hours of not using bluetooth (say you were watching youtube or a movie and not touch your bluetooth device) that there is an autosuspend function in Fedora 32. To avoid headaches, you'll need to fix the "Bluetooth turning off after a short amount of time" problem a lot of users experience. This is due to a power saving function native to Fedora 32. This has also caused problems in different installs, so if you have problems after you make this script, remove it.
in terminal:
sudo su
enter password
sudo nano /etc/rc.local
then add the following to the file:
cd `readlink -f /sys/class/bluetooth/hci0`
cd ../../../power/
echo on > level
then save the file and close it.
ctrl + o
press enter
ctrl + x
This script disables autosuspend for the bluetooth system. It's not entirely necessary but it can be annoying if you are using Linux for other things beyond gaming. I would highly recommend you make this script file as your step 12 and reboot right after that to complete the process.
Also, you want to disable the plugin that reenables this. Right click the bluetooth icon in the taskbar, go to plugins and uncheck "Killswitch" and "PowerManager."
Bluetooth should be completely permanent now.
Manual Re-pairing and Re-trusting
One issue I have come across is if the controller runs out of battery, you will need to re-pair and re-trust the controller. To avoid this, it's easiest to keep it charged. It is also possible for different models to have issues with WiFi and Bluetooth functionality in Linux. (I have only heard of this happening, it is not an issue for me) This may not work in Bluetooth Manager and you will most likely need to re-pair and re-trust it manually. To do that:
in terminal:
bluetoothctl
bluetoothctl show
default-agent
power on
scan on
Now set device to seek.
If it finds your controller, it will say something like this in terminal:
[CHG] Controller 5C:FB:7C:A4:13:C6 Discovering: yes
except 5C:FB:7C:A4:13:C6 will be different. Take note of this.
now to pair the controller. (replace "5C:FB:7C:A4:13:C6" with the address of your own device)
in terminal:
pair 5C:FB:7C:A4:13:C6
trust 5C:FB:7C:A4:13:C6
connect 5C:FB:7C:A4:13:C6
You can test your controller with the touchpad if you are using a PS4 controller.
Software
You must use the standard version of PPSSPP. The Qt version stutters like crazy with a bluetooth connected controller when wired works just fine.
Shout Outs
Shout out to ITmania (https://www.youtube.com/channel/UCkVRqtCIS3Xj-E1HY4j9_EA) for the distros and grabman (https://www.youtube.com/channel/UCzPmgEh1LSc80cRfNPL5GLg) for his videos relating to PS4 Linux.
The PS4 controller is a great overall controller for gaming but also in the OS itself. The touchpad on the controller works just like the touchpad on a laptop in Linux where left click works when you press the bottom left corner and right click being the bottom right. This is really handy for using menus to open different software without having to grab your keyboard.
To note, I'm using a white PS4 Pro CUH-7102B with the original ITMania release of Fedora 32 on 6.72 firmware. The variety of PS4s and kernels available makes it hard to guarantee success. If it works it works, if it doesn't it doesn't. If you're testing, please post the the model number, OS version and firmware to help other users if you have success or not.
For this to work, you will need:
- A PlayStation 4 with Fedora 32 Linux installed.
- A keyboard
- A mouse
- A USB cable to connect your controller to the PS4.
- A seperate PlayStation 4 controller to the one you are using in Orbis. It should also work with PS3 controllers or any controller which connects via Bluetooth and you can also connect via USB.
- A USB hub for connecting multiple devices into slot 2.
Do this at your own risk. Updating the wrong files or errors in changing drivers in Linux can break your install. If you follow instructions correctly, this shouldn't be a problem but look into making backups whenever you mess with drivers if you aren't confident with reinstalling and configuring stuff the way you like it if something does go wrong. (See this thread: https://gbatemp.net/threads/guide-using-a-backup-restore-point-of-your-usb-linux-install.581673/)
1. Uninstall Bluez
in terminal:
sudo su
enter password
dnf remove bluez
2. Install Blueman
in terminal:
dnf install blueman
3. Reboot
4. Pair the controller
Click Menu (bottom left corner) > Preferences > Bluetooth Manager.
Set the controller to seek (hold the playstation button then press share)
Click Device > Trust
5. Make the file /etc/udev/rules.d/bluetooth.rules
in terminal:
sudo su
enter password
sudo nano /etc/udev/rules.d/bluetooth.rules
and add the following in the file:
#
# stops power saving on bluetooth
# install in /etc/udev/rules.d/
ACTION=="add", SUBSYSTEM=="hid", ATTR{power/control}="on"
6. Save and close the file
ctrl + o
press enter
ctrl + x
7. Check to see if Bluetooth is autoenabled
This should be there by default in Fedora 32. In Manjaro it isn't so just to be sure:
in terminal:
sudo nano /etc/bluetooth/main.conf
Scroll down and look for [Policy] and [General]. Somewhere underneath those, it should say:
[Policy]
AutoEnable=true
and
[General]
DiscoverableTimeout = 0
Discoverable=true
If you can't see those under them, add them. You might have lines which begin with a # in between them. Pretend they don't exist. They are notes in the code.
This allows for Linux to boot with Bluetooth enabled. If you use Manjaro, this is also really handy regardless if you are using Bluetooth for a controller or not. I personally use a Bluetooth keyboard.
Save and close the file if you added anything.
ctrl + o
press enter
ctrl + x
8. Reload the rules
in terminal:
udevadm control --reload-rules && udevadm trigger
or reboot the system if you have the patience.
9. Plug the controller into the second USB port and let it recognise it automatically
10. Click "always recognise" in Bluetooth Manager (top right corner)
11. Unplug the controller
You should now have access to the controller wirelessly in Linux.
This is how mine works:
edit:
Issues:
Before you make any changes, update your Linux install. ONLY do this in terminal and back up your install! I cannot stress this enough.
in terminal:
sudo dnf update -x kernel*,libdrm*,mesa*,xorg-x11-drv-a*
Testing takes time. Play around with these suggestions. It can work the way you want it to if you are patient.
Disable Auto-suspend
I have found that after a few hours of not using bluetooth (say you were watching youtube or a movie and not touch your bluetooth device) that there is an autosuspend function in Fedora 32. To avoid headaches, you'll need to fix the "Bluetooth turning off after a short amount of time" problem a lot of users experience. This is due to a power saving function native to Fedora 32. This has also caused problems in different installs, so if you have problems after you make this script, remove it.
in terminal:
sudo su
enter password
sudo nano /etc/rc.local
then add the following to the file:
cd `readlink -f /sys/class/bluetooth/hci0`
cd ../../../power/
echo on > level
then save the file and close it.
ctrl + o
press enter
ctrl + x
This script disables autosuspend for the bluetooth system. It's not entirely necessary but it can be annoying if you are using Linux for other things beyond gaming. I would highly recommend you make this script file as your step 12 and reboot right after that to complete the process.
Also, you want to disable the plugin that reenables this. Right click the bluetooth icon in the taskbar, go to plugins and uncheck "Killswitch" and "PowerManager."
Bluetooth should be completely permanent now.
Manual Re-pairing and Re-trusting
One issue I have come across is if the controller runs out of battery, you will need to re-pair and re-trust the controller. To avoid this, it's easiest to keep it charged. It is also possible for different models to have issues with WiFi and Bluetooth functionality in Linux. (I have only heard of this happening, it is not an issue for me) This may not work in Bluetooth Manager and you will most likely need to re-pair and re-trust it manually. To do that:
in terminal:
bluetoothctl
bluetoothctl show
default-agent
power on
scan on
Now set device to seek.
If it finds your controller, it will say something like this in terminal:
[CHG] Controller 5C:FB:7C:A4:13:C6 Discovering: yes
except 5C:FB:7C:A4:13:C6 will be different. Take note of this.
now to pair the controller. (replace "5C:FB:7C:A4:13:C6" with the address of your own device)
in terminal:
pair 5C:FB:7C:A4:13:C6
trust 5C:FB:7C:A4:13:C6
connect 5C:FB:7C:A4:13:C6
You can test your controller with the touchpad if you are using a PS4 controller.
Software
You must use the standard version of PPSSPP. The Qt version stutters like crazy with a bluetooth connected controller when wired works just fine.
Shout Outs
Shout out to ITmania (https://www.youtube.com/channel/UCkVRqtCIS3Xj-E1HY4j9_EA) for the distros and grabman (https://www.youtube.com/channel/UCzPmgEh1LSc80cRfNPL5GLg) for his videos relating to PS4 Linux.
Last edited by bbqtool,