FS#62776 - [linux]DualShock 4 and other devices not connecting with bluetooth since 5.1.
Attached to Project:
Arch Linux
Opened by Marc Geerlings (markus-66) - Wednesday, 29 May 2019, 09:18 GMT
Last edited by Andreas Radke (AndyRTR) - Tuesday, 02 March 2021, 06:33 GMT
Opened by Marc Geerlings (markus-66) - Wednesday, 29 May 2019, 09:18 GMT
Last edited by Andreas Radke (AndyRTR) - Tuesday, 02 March 2021, 06:33 GMT
|
Details
Description: DualShock 4 not connecting with bluetooth since
5.1.
Problem is not only related to the Dualshock 4, on forums there is more talk about bluetooth devices unable to connect. Fedora already applied an patch in the kernel 5.1.4 release (see link below) https://bugzilla.kernel.org/show_bug.cgi?id=203643 Additional info: * package version(s) linux 5.1 to 5.1.5, not tried but on forums the latest LTS version has the same issue. * config and/or log files etc. > HCI Event: Link Key Request (0x17) plen 6 bdaddr 5C:C6:E9:11:B1:20 < HCI Command: Link Key Request Reply (0x01|0x000b) plen 22 bdaddr 5C:C6:E9:11:B1:20 key 9290EB1424E3A352C43F17C8499A3670 > HCI Event: Command Complete (0x0e) plen 10 Link Key Request Reply (0x01|0x000b) ncmd 1 status 0x00 bdaddr 5C:C6:E9:11:B1:20 > HCI Event: Encrypt Change (0x08) plen 4 status 0x00 handle 256 encrypt 0x01 < HCI Command: Read Encryption Key Size (0x05|0x0008) plen 2 > ACL data: handle 256 flags 0x02 dlen 12 L2CAP(s): Connect req: psm 25 scid 0x0580 < ACL data: handle 256 flags 0x00 dlen 16 L2CAP(s): Connect rsp: dcid 0x0000 scid 0x0580 result 3 status 0 Connection refused - security block > HCI Event: Command Complete (0x0e) plen 7 Read Encryption Key Size (0x05|0x0008) ncmd 1 > HCI Event: Number of Completed Packets (0x13) plen 5 handle 256 packets 1 > HCI Event: Disconn Complete (0x05) plen 4 status 0x00 handle 256 reason 0x13 Reason: Remote User Terminated Connection * link to upstream bug report, if any Steps to reproduce: Pair DS4 with bluez. DS4 connects. Switch off DS4. Turn on DS4, DS4 connects and immediatly turns off. Repeat with same result... |
This task depends upon
For reference to others Fedora pulled in an RFC patch to the Fedora 5.1.4 build and the bug seemed to be fixed...
„https://lore.kernel.org/linux-bluetooth/20190522070540.48895-1-marcel@holtmann.org/“
Fixes: d5bb334a8e17 ("Bluetooth: Align minimum encryption key size for LE and BR/EDR connections")
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: stable@vger.kernel.org
---
net/bluetooth/hci_conn.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 3cf0764d5793..7516cdde3373 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -1272,8 +1272,13 @@ int hci_conn_check_link_mode(struct hci_conn *conn)
return 0;
}
- if (hci_conn_ssp_enabled(conn) &&
- !test_bit(HCI_CONN_ENCRYPT, &conn->flags))
+ /* If Secure Simple Pairing is not enabled, then legacy connection
+ * setup is used and no encryption or key sizes can be enforced.
+ */
+ if (!hci_conn_ssp_enabled(conn))
+ return 1;
+
+ if (!test_bit(HCI_CONN_ENCRYPT, &conn->flags))
return 0;
/* The minimum encryption key size needs to be enforced by the
--
2.20.1
https://bbs.archlinux.org/viewtopic.php?id=246479
https://bugs.archlinux.org/task/63198
Please attach the dmesg from boot with and without the issue. What device are you producing the issue with?
What is the output from hcidump with and without the issue?
I guess is a different issue behaving similar. I've seen reports about broken devices with last bluez release that can be fixed using bluez-git from AUR.
If so it's a bug and should be reported upstream to get it fixed for the future.
I'm eager to share any required logs but would need someone to tell me what is needed.
First thing I noticed that is different in journalctl before and after the issue occurred is new logs, for example:
1) Nov 22 10:00:39 PC kernel: Bluetooth: hci0: ACL packet for unknown connection handle 12
and
2) Nov 22 11:54:53 PC kernel: Bluetooth: hci0: ACL packet for unknown connection handle 2050
I also can't connect any other bluetooth device. (although bluetoothctl says controllers are connected for few seconds the corresponding /dev/input/* devices are not appearing)
The controller still work when plugged by cable.
Linux PC 5.9.9-arch1-1 #1 SMP PREEMPT Wed, 18 Nov 2020 19:52:04 +0000 x86_64 GNU/Linux
blueman 2.1.3-1
bluez 5.55-1
bluez-libs 5.55-1
bluez-plugins 5.55-1
bluez-utils 5.55-1
pulseaudio-bluetooth 13.99.3+4+gd83ad6990-1
FS#68479