Tutorial [GUIDE] Using an UNWIRED PlayStation 4 controller in Linux (Fedora32)

bbqtool

Well-Known Member
OP
Member
Joined
Aug 21, 2018
Messages
155
Trophies
0
Age
37
XP
796
Country
Australia
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.
 
Last edited by bbqtool,

bbqtool

Well-Known Member
OP
Member
Joined
Aug 21, 2018
Messages
155
Trophies
0
Age
37
XP
796
Country
Australia
Will this work on 7215b? I have never seen bluetooth work at all on mine. I can't even use BT dongles.

It should, but I don't know for sure. I only have a 7102B which is hackable. It would be great if you could test it.

Which distro are you running? If you're not using Fedora 32, try that. These instructions are for Fedora 32.
What device are you using to test Bluetooth? If you're using a controller, then no the controller won't connect and the process in the OP should fix that, but test to see if it is receiving at all. Try this with any other Bluetooth device:

bluetoothctl
bluetoothctl show
default-agent
power on
scan on


then set your device to seek. If it returns with something like [CHG] Controller 5C:FB:7C:A4:13:C6 Discovering: yes (with a different address and device name of course) then the Bluetooth drivers are recognising your device, it just doesn't want to connect. That means this process should definitely work.

If you still get no success, try this in terminal:

systemctl start bluetooth
systemctl enable bluetooth


Then try the above test.

This will enable bluetooth for this one boot. If it then enables Bluetooth, then follow the above procedure.

I suspect that most people are using their controllers to test Bluetooth and when it doesn't connect, assume it doesn't work at all.

Try this out and let me know the outcome. Happy to help however I can.
 
Last edited by bbqtool,

bbqtool

Well-Known Member
OP
Member
Joined
Aug 21, 2018
Messages
155
Trophies
0
Age
37
XP
796
Country
Australia
Happy to help however I can. Truthfully, when it came to getting wireless bluetooth PS4 controllers working in Fedora 32, I was experimenting a lot and it just worked and these were the steps I took in the order of when I worked out what seemed to get me closer to my goal. I'm starting to think this was a bit of a fluke on my part, considering how variable things are with PS4 models and what may not work for some people. Plus I'm still very new to Linux too. Modded_Warfare cited this thread in one of his tutorials and said he couldn't get it to work either (and he knows a lot more than I do) so I can't promise it will work but let's see.
 
  • Like
Reactions: Brayangasques

Brayangasques

Member
Newcomer
Joined
Feb 12, 2022
Messages
8
Trophies
0
Age
22
Location
751 villa portofino
XP
23
Country
United States
Have you tried manual re-trusting and re-pairing?
So I try but when I tray pair with the name controller did not go only device wireless controller but when it connects the controller light only stay white I try do the codes you told first comment but nothing
 

Attachments

  • 5B1BBF7F-A2EF-4AB7-BAD6-00997FADD696.jpeg
    5B1BBF7F-A2EF-4AB7-BAD6-00997FADD696.jpeg
    1.6 MB · Views: 42
  • 66565A2B-B92E-4ED1-96A7-C832A17BB7C9.jpeg
    66565A2B-B92E-4ED1-96A7-C832A17BB7C9.jpeg
    1.5 MB · Views: 43

bbqtool

Well-Known Member
OP
Member
Joined
Aug 21, 2018
Messages
155
Trophies
0
Age
37
XP
796
Country
Australia
Recognising the controller is good. Bluetooth working is good. Working in gentoo is good. I want to say it's likely an issue with the controller driver in Fedora if that is the case so you could try installing another bluetooth gamepad driver. DS4DRV is what you want: https://github.com/chrippa/ds4drv
 

singho1122

Member
Newcomer
Joined
Jul 3, 2022
Messages
6
Trophies
0
Age
38
Location
HONG KONG
XP
8
Country
Hong Kong
It should, but I don't know for sure. I only have a 7102B which is hackable. It would be great if you could test it.

Which distro are you running? If you're not using Fedora 32, try that. These instructions are for Fedora 32.
What device are you using to test Bluetooth? If you're using a controller, then no the controller won't connect and the process in the OP should fix that, but test to see if it is receiving at all. Try this with any other Bluetooth device:

bluetoothctl
bluetoothctl show
default-agent
power on
scan on


then set your device to seek. If it returns with something like [CHG] Controller 5C:FB:7C:A4:13:C6 Discovering: yes (with a different address and device name of course) then the Bluetooth drivers are recognising your device, it just doesn't want to connect. That means this process should definitely work.

If you still get no success, try this in terminal:

systemctl start bluetooth
systemctl enable bluetooth


Then try the above test.

This will enable bluetooth for this one boot. If it then enables Bluetooth, then follow the above procedure.

I suspect that most people are using their controllers to test Bluetooth and when it doesn't connect, assume it doesn't work at all.

Try this out and let me know the outcome. Happy to help however I can.
Hi Sir, I followed your step to connected my ps4 controllers, it show white light not blue light, either I used Retroarch and Dolphin, both can not detect these controllers, until I plugged in the USB cable, they became blue light, they works in usb cable only, please help and thanks!
 

bbqtool

Well-Known Member
OP
Member
Joined
Aug 21, 2018
Messages
155
Trophies
0
Age
37
XP
796
Country
Australia
Hi Sir, I followed your step to connected my ps4 controllers, it show white light not blue light, either I used Retroarch and Dolphin, both can not detect these controllers, until I plugged in the USB cable, they became blue light, they works in usb cable only, please help and thanks!
Try doing a full reset of the controller using the button on the back of the controller next to the top right screw. (Use a paperclip and hold for 20 seconds)

Install DS4DRV from here: https://github.com/chrippa/ds4drv

Then retrust and re-pair the controller in terminal.
 

singho1122

Member
Newcomer
Joined
Jul 3, 2022
Messages
6
Trophies
0
Age
38
Location
HONG KONG
XP
8
Country
Hong Kong
Try doing a full reset of the controller using the button on the back of the controller next to the top right screw. (Use a paperclip and hold for 20 seconds)


thanks for your reply!!

I still have questions:

1. reset the controller by paperclip, but what's the controller status first? do you mean when it paired by bluetooth with white light?

2. Fedora 32 can install DS4DRV by above gh link directly?

sorry for many questions.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
    Dark_Phoras @ Dark_Phoras: Close to fourteen years now