Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PS5 controller will no longer pair with bluetoothd #614

Closed
Absolutely-Free opened this issue Oct 1, 2023 · 39 comments
Closed

PS5 controller will no longer pair with bluetoothd #614

Absolutely-Free opened this issue Oct 1, 2023 · 39 comments

Comments

@Absolutely-Free
Copy link

I recently had some time to game but found that my PS5 controller will no longer pair with either of my computers that I game on.

I originally noticed this issue for the first time yesterday, and while troubleshooting I found issue #594 which seems to describe my issue perfectly. If I try to pair the controller from my previously working paired devices using KDE's GUI, I get error messages and the controller never connects to the computer. If I delete the device from the GUI and try to pair the devices for the first time again, the controller will show up when it's in pairing mode while going through the setup wizard but will fail to pair. If I check systemctl status bluetooth I see the same errors repeating every time I try to pair the devices (personal info modified):

Sep 30 20:54:43 HOSTNAME bluetoothd[885]: src/service.c:service_probe() input-hid profile probe failed for XX:XX:XX:XX:XX:XX
Sep 30 20:54:49 HOSTNAME bluetoothd[885]: profiles/input/server.c:connect_event_cb() Refusing input device connect: No such file or directory (2)
Sep 30 20:54:49 HOSTNAME bluetoothd[885]: profiles/input/server.c:confirm_event_cb() Refusing connection from XX:XX:XX:XX:XX:XX: unknown device

pacman -Qs bluez shows:

local/bluez 5.70-1
    Daemons for the bluetooth protocol stack
local/bluez-libs 5.70-1
    Deprecated libraries for the bluetooth protocol stack
local/bluez-qt5 5.110.0-1 (kf5)
    Qt wrapper for Bluez 5 DBus API
local/bluez-utils 5.70-1
    Development and debugging utilities for the bluetooth protocol stack

Issue #594 was closed with a comment implying that the issue was fixed in version 5.70, which was still in the Arch testing repos yesterday. Today the new version hit the official repos so I updated, rebooted, and tried again, but I am still getting the exact same errors.

I can reproduce this exact same issue on two different computers, both of which are up-to-date Arch Linux with KDE, both have different generations of intel wifi/bluetooth hardware, and both of which worked correctly with this controller when I last had time to game (~3 months ago). I also just updated the firmware for the controller using Sony's updater with a Windows computer, and the problem is still persisting. The controller works correctly over USB in Arch, and the bluetooth worked correctly with my Windows machine, so I believe the issue is definitely with either bluez or KDE's software that depends on it. Since issue #594 seems to describe my issue exactly, I am reporting the bug here first.

Not sure what other info may be relevant or useful, but I am happy to provide any other info requested.

@RealVishy
Copy link

RealVishy commented Oct 2, 2023

Hey, I've encountered the same issue with my PS5 Controller failing to pair with version 5.70 on Fedora 38 KDE Spin, both on my laptop and desktop.

It seems like this commit was intended to address the problem: here, but I'm still experiencing the same issue as I did with version 5.69. Blueman fails to pair the controller to my computers, and bluetoothctl also fails.

After some further testing, I'm able to replicate what this person commented here.

If I reboot my computer and turn on the controller, it is able to automatically pair and works as expected.

@thyTwilightGoth
Copy link

I'm am also still having this issue, and my logs look identical to the OP's posted logs, strangely this seem to only effect Dualsense controllers, because my 8bitdo Pro 2 controller works just fine.

@Vudentz
Copy link
Contributor

Vudentz commented Oct 3, 2023

Have you guys tried pairing with bluetoothctl? Do you guys can collect HCI traces with btmon.

@Vudentz
Copy link
Contributor

Vudentz commented Oct 3, 2023

@Absolutely-Free
Copy link
Author

Absolutely-Free commented Oct 4, 2023

Have you guys tried pairing with bluetoothctl?

I just tried running the pairing via bluetoothctl, see the relevant output below. I sanitized the logs following the pattern of "YY:YY:YY:YY:YY:YY" = the PC's bluetooth hardware controller, "XX:XX:XX:XX:XX:XX" = the Sony PS5 Dualsense Controller.

[bluetooth]# scan on
Discovery started
[CHG] Controller YY:YY:YY:YY:YY:YY Discovering: yes
[NEW] Device XX:XX:XX:XX:XX:XX DualSense Wireless Controller
[bluetooth]# connect XX:XX:XX:XX:XX:XX
Attempting to connect to XX:XX:XX:XX:XX:XX
[CHG] Device XX:XX:XX:XX:XX:XX Connected: yes
[CHG] Device XX:XX:XX:XX:XX:XX ServicesResolved: yes
Failed to connect: org.bluez.Error.NotAvailable br-connection-profile-unavailable
[CHG] Device XX:XX:XX:XX:XX:XX ServicesResolved: no
[CHG] Device XX:XX:XX:XX:XX:XX Connected: no
[bluetooth]# scan off
[CHG] Controller YY:YY:YY:YY:YY:YY Discovering: no
Discovery stopped

Do you guys can collect HCI traces with btmon.

I repeated the process above with btmon running as root. I apologize for the noise in these logs, I live in an apartment building so there are many devices nearby and I didn't want to accidentally delete important info. I sanitized them following the same pattern I listed above. I attached them to this comment.

absolutelyFreeBtmonLogs.log

@abnotus
Copy link

abnotus commented Oct 4, 2023

Having the same issue as well, can also confirm that I have no issue after downgrading back to 5.68

@nfp0
Copy link

nfp0 commented Oct 7, 2023

I am also having the same issue with 2 DualShock 4 controllers tested on 2 different Arch computers on bluez 5.70
Output is the same as other users posted above.
Downgrading to 5.68 fixes the issue.

@ghost
Copy link

ghost commented Oct 9, 2023

I am also having this issue, checked bluetoothctl and it is the same output.
The controller pairs successfully but does just disconnects. I try to reconnect it and the same happens.
I have not tried downgrading yet.

@Vudentz
Copy link
Contributor

Vudentz commented Oct 9, 2023

Any chance for one of you guys having this problem to bisect the patch which introduces it?

@solisinvictum
Copy link

I have the same Problem. Version 5.70 and 5.69 dont work.

Only Version 5.68 works fine.

Here are maaaaaaaany logs. Automatic with Kde. Over Terminal with bluetoothctl. Journal etc. Arch Linux.

message4.txt
message3.txt
message1.txt
message.txt

@Vudentz
Copy link
Contributor

Vudentz commented Oct 9, 2023

Looks like it failing because it cannot find any SDP record, now it really beats me why that wouldn't be the case for 5.68 but perhaps something has changed in the package in the meantime? Perhaps the cache location is wrong or something, what distro are you guys using and what is the content of bluetooth.service?

@Vudentz
Copy link
Contributor

Vudentz commented Oct 9, 2023

I think I know what is going on, it is probably due to the following change 67a26ab, input-hid plugin probably requires input-hid to be resolved to be probed contrary to only when it is connected/connecting, so it fails to probe, I will try to come up with a fix for it in the upcoming days.

@solisinvictum
Copy link

solisinvictum commented Oct 9, 2023 via email

github-actions bot pushed a commit to tedd-an/bluez-upstream-test that referenced this issue Oct 10, 2023
Due to changes introduced by 67a26ab
("profile: Add probe_on_discover flag") profiles may get probed when
their profile UUID are discovered, rather than resolved, which means
the SDP record may not be available.

Fixes: bluez/bluez#614
github-actions bot pushed a commit to BluezTestBot/bluez that referenced this issue Oct 10, 2023
Due to changes introduced by 67a26ab
("profile: Add probe_on_discover flag") profiles may get probed when
their profile UUID are discovered, rather than resolved, which means
the SDP record may not be available.

Fixes: bluez#614
@Vudentz
Copy link
Contributor

Vudentz commented Oct 10, 2023

Could one if you guys please try with the above patch?

@solisinvictum
Copy link

If you tell me how, i would try it!

@nfp0
Copy link

nfp0 commented Oct 11, 2023

I'm gonna give it a try in a bit.
@solisinvictum I'm gonna use the bluez-git AUR package and replace the source.

@nfp0
Copy link

nfp0 commented Oct 11, 2023

Could one if you guys please try with the above patch?

@Vudentz I can confirm that fixes it! 🙂

@nfp0
Copy link

nfp0 commented Oct 11, 2023

Forgot to mention, this is on a PS4 controller. Don't have a PS5 controller to test.

@Vudentz
Copy link
Contributor

Vudentz commented Oct 11, 2023

@Absolutely-Free can you please check as well? @nfp0 perhaps you can add the package you have created so others people running the same distro can test with their peripherals.

@nfp0
Copy link

nfp0 commented Oct 11, 2023

Sure!
All I did was grab this from the AUR:
https://aur.archlinux.org/packages/bluez-git
and replace the source on the PKGBUILD file (line 34) with:
"$pkgname::git+https://github.com/BluezTestBot/bluez.git#branch=791911"

@solisinvictum
Copy link

Thanks.

I can confirm that this fix it for dualsense (ps5) too.

@Absolutely-Free
Copy link
Author

Sure! All I did was grab this from the AUR: https://aur.archlinux.org/packages/bluez-git and replace the source on the PKGBUILD file (line 34) with: "$pkgname::git+https://github.com/BluezTestBot/bluez.git#branch=791911"

Thanks for this @nfp0 !

@Absolutely-Free can you please check as well? @nfp0 perhaps you can add the package you have created so others people running the same distro can test with their peripherals.

I can also confirm that this fix works! Thank you for your work on this @Vudentz , we all appreciate it!

@NuVanDibe
Copy link

Not sure why this is closed. It was never fixed.

@RealVishy
Copy link

Not sure why this is closed. It was never fixed.

It was fixed in a recent patch but there hasn't been a new release, wait for a new release or downgrade to 5.68

@nfp0
Copy link

nfp0 commented Oct 25, 2023

Since this was a regression, isn't a bugfix release planned for soon?

@borancar
Copy link

borancar commented Dec 26, 2023

Still seems to be an issue on 5.71 and PS4 controller.

@DrKlipper
Copy link

Is there any fix in the 5.72 now? Or does this pairing problem still exist?

@gabriele2000
Copy link

Is there any fix in the 5.72 now? Or does this pairing problem still exist?

it has been fixed a week later or something like that.

@DrKlipper
Copy link

Does not work for me ...

[bluetooth]# [NEW] Device 17:05:16:03:35:E1 MOCUTE-032S_A03-35E1
[bluetooth]# hci0 type 7 discovering off
pair 17:05:16:03:35:E1
Attempting to pair with 17:05:16:03:35:E1
[bluetooth]# hci0 device_flags_changed: 17:05:16:03:35:E1 (BR/EDR)
[bluetooth]#      supp: 0x00000000  curr: 0x00000000
[bluetooth]# hci0 17:05:16:03:35:E1 type BR/EDR connected eir_len 27
[CHG] Device 17:05:16:03:35:E1 Connected: yes
[MOCUTE-032S_A03-35E1]# hci0 new_link_key 17:05:16:03:35:E1 type 0x04 pin_len 0 store_hint 1
[MOCUTE-032S_A03-35E1]# [CHG] Device 17:05:16:03:35:E1 Bonded: yes
[MOCUTE-032S_A03-35E1]# [CHG] Device 17:05:16:03:35:E1 UUIDs: 00000000-deca-fade-deca-deafdecacaff
[MOCUTE-032S_A03-35E1]# [CHG] Device 17:05:16:03:35:E1 UUIDs: 00001101-0000-1000-8000-00805f9b34fb
[MOCUTE-032S_A03-35E1]# [CHG] Device 17:05:16:03:35:E1 UUIDs: 00001124-0000-1000-8000-00805f9b34fb
[MOCUTE-032S_A03-35E1]# [CHG] Device 17:05:16:03:35:E1 ServicesResolved: yes
[MOCUTE-032S_A03-35E1]# [CHG] Device 17:05:16:03:35:E1 Paired: yes
[MOCUTE-032S_A03-35E1]# Pairing successful
[MOCUTE-032S_A03-35E1]# hci0 17:05:16:03:35:E1 type BR/EDR disconnected with reason 2
[MOCUTE-032S_A03-35E1]# [CHG] Device 17:05:16:03:35:E1 ServicesResolved: no
[CHG] Device 17:05:16:03:35:E1 Connected: no
[bluetooth]# hci0 type 7 discovering on
[DEL] Device 50:EA:4A:4F:99:66 50-EA-4A-4F-99-66
hci0 type 7 discovering off
connect 17:05:16:03:35:E1 :16:03:35:E1
Attempting to connect to 17:05:16:03:35:E1
[bluetooth]# hci0 17:05:16:03:35:E1 type BR/EDR connected eir_len 27
[CHG] Device 17:05:16:03:35:E1 Connected: yes
[MOCUTE-032S_A03-35E1]# hci0 17:05:16:03:35:E1 auth failed with status 0x05 (Authentication Failed)
[MOCUTE-032S_A03-35E1]# Failed to connect: org.bluez.Error.Failed br-connection-create-socket
[MOCUTE-032S_A03-35E1]# hci0 17:05:16:03:35:E1 type BR/EDR disconnected with reason 2
[CHG] Device 17:05:16:03:35:E1 Connected: no

This is a compiled 5.72 on a Raspberry Pi 3.
The controller gets paired, connected and immediately disconnected.

@gabriele2000
Copy link

gabriele2000 commented Jan 28, 2024

This is a compiled 5.72 on a Raspberry Pi 3. The controller gets paired, connected and immediately disconnected.

Can you try to compile this?
It's an "almost master" commit, it's of 3 days ago (because master is broken for me right now, so I deem this commit safer).

Hint: to synchronize git to that commit, do a git reset --hard d994c9d45dad68bc060add77642fdc37834cd7c1

@DrKlipper
Copy link

Doesn´t look well ...

pi@Pi3Test:~ $ sudo bluetoothctl
[sudo] password for pi:
Waiting to connect to bluetoothd...[bluetooth]# hci0 new_settings: powered bondable ssp br/edr le secure-conn
[bluetooth]# Agent registered
[bluetooth]# [CHG] Controller B8:27:EB:4E:F7:C9 Pairable: yes
[bluetooth]# list
Controller B8:27:EB:4E:F7:C9 Pi3Test [default]
[bluetoo17:05:16:03:35:E15:16:03:35:E1
Attempting to connect to 17:05:16:03:35:E1
[bluetooth]# hci0 17:05:16:03:35:E1 type BR/EDR connected eir_len 22
[CHG] Device 17:05:16:03:35:E1 Connected: yes
[MOCUTE-032S_A03-35E1]# hci0 17:05:16:03:35:E1 auth failed with status 0x05 (Authentication Failed)
[MOCUTE-032S_A03-35E1]# Failed to connect: org.bluez.Error.Failed br-connection-create-socket
[MOCUTE-032S_A03-35E1]# hci0 17:05:16:03:35:E1 type BR/EDR disconnected with reason 2
[CHG] Device 17:05:16:03:35:E1 Connected: no
[bluetooth]#

But I will do another test this evening. Will start from a clean installation to avoid any conflicts with some precompiled stuff.

But anyway ... The first try was not successful - even after a reboot.

BTW: Can I check if I actually run this specified version I compiled?
btmon -v just reports 5.72

@gabriele2000
Copy link

BTW: Can I check if I actually run this specified version I compiled? btmon -v just reports 5.72

I don' think so.
I just remembered: did you try unpairing and pairing the controller again?
For pairing, remember that you have to hold the playstation logo and the "share" button (as I call it: the Select button)

@DrKlipper
Copy link

Is this mentioned fix for PS controller only?
I tried a small BT game controller - not a PS one.
And to answer your question ... Yes a removed the device in bluetoothctl and die a new pair.

@gabriele2000
Copy link

Is this mentioned fix for PS controller only? I tried a small BT game controller - not a PS one. And to answer your question ... Yes a removed the device in bluetoothctl and die a new pair.

I honestly have no clue, I think it cover more than PS5 controllers, but I don't know about generic controllers.

@DrKlipper
Copy link

Ok I can confirm that this compiled commit "d994c9d45dad68bc060add77642fdc37834cd7c1" works with

I will track that in my initial post #605

@The0neFreeMan
Copy link

Still not working for me in version 5.73. Currently downgrading all the way back to 5.68. I'm on Arch btw. I see earlier in the thread that it was supposedly fixed, but I've never had it work again with any version upgrade since it broke in 5.69.

@lucasmb
Copy link

lucasmb commented Apr 19, 2024

I confirm that it's working with bluez 5.75-1 with UserspaceHID=true input.conf on arch btw @The0neFreeMan. Paired the ds5 using KDE bluetooth settings, it threw an error modal but still connected.

@The0neFreeMan
Copy link

Thanks @lucasmb . I was able to duplicate your connecting with an error message. However, it doesn't show up in Steam so still essentially broken for me--worked perfectly fine with no error messages and showed up in steam before the break in 5.69. I'll just continue with my current method of using a usb-c cable which just works and try again in the future.

@TableCoffee
Copy link

bluez 5.75-1 on arch/kde and still the same here as well. Trying to connect a Dualsense via KDE bluetooth applet results in an error, turning on the controller again it appears to connect, and shows connected in KDE panel but no game sees that it's connected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment