#1087761 bluez: Fails to connect to device: Permission denied

Package:
bluez
Source:
bluez
Description:
Bluetooth tools and daemons
Submitter:
Bastian Venthur
Date:
2024-11-22 18:06:03 UTC
Severity:
normal
#1087761#5
Date:
2024-11-18 11:29:13 UTC
From:
To:
Dear Maintainer,

Since the recent update, I cannot connect to my bluetooth headphones anymore.
Here's: the relevant part of journalctl:

$ sudo journalctl -f -u bluetooth
Nov 18 12:23:11 fiona bluetoothd[1073]: Endpoint registered: sender=:1.127 path=/MediaEndpoint/A2DPSource/faststream_duplex
Nov 18 12:23:11 fiona bluetoothd[1073]: Endpoint registered: sender=:1.127 path=/MediaEndpoint/A2DPSink/opus_05
Nov 18 12:23:11 fiona bluetoothd[1073]: Endpoint registered: sender=:1.127 path=/MediaEndpoint/A2DPSource/opus_05
Nov 18 12:23:11 fiona bluetoothd[1073]: Endpoint registered: sender=:1.127 path=/MediaEndpoint/A2DPSink/opus_05_duplex
Nov 18 12:23:11 fiona bluetoothd[1073]: Endpoint registered: sender=:1.127 path=/MediaEndpoint/A2DPSource/opus_05_duplex
Nov 18 12:23:34 fiona bluetoothd[1073]: src/profile.c:ext_connect() Hands-Free Voice gateway failed connect to 78:2B:64:A0:53:9D: Permission denied (13)
Nov 18 12:23:35 fiona bluetoothd[1073]: profiles/audio/avdtp.c:avdtp_connect_cb() connect to 78:2B:64:A0:53:9D: Too many levels of symbolic links (40)
Nov 18 12:23:38 fiona bluetoothd[1073]: profiles/audio/avdtp.c:avdtp_connect_cb() connect to 78:2B:64:A0:53:9D: Too many levels of symbolic links (40)
Nov 18 12:24:29 fiona bluetoothd[1073]: src/profile.c:ext_connect() Hands-Free Voice gateway failed connect to 78:2B:64:A0:53:9D: Connection refused (111)
Nov 18 12:24:29 fiona bluetoothd[1073]: profiles/audio/avdtp.c:avdtp_connect_cb() connect to 78:2B:64:A0:53:9D: Connection refused (111)
Nov 18 12:25:29 fiona bluetoothd[1073]: src/profile.c:ext_connect() Hands-Free Voice gateway failed connect to 78:2B:64:A0:53:9D: Permission denied (13)
Nov 18 12:25:30 fiona bluetoothd[1073]: profiles/audio/avdtp.c:avdtp_connect_cb() connect to 78:2B:64:A0:53:9D: Too many levels of symbolic links (40)
Nov 18 12:25:33 fiona bluetoothd[1073]: profiles/audio/avdtp.c:avdtp_connect_cb() connect to 78:2B:64:A0:53:9D: Too many levels of symbolic links (40)


The headphones in question (Bose QC) were working fine before the update.


Cheers,

Bastian

#1087761#10
Date:
2024-11-18 14:27:05 UTC
From:
To:
Dear Maintainer,

turns out that a workaround for this issue is to remove the device (i.e.
"forgetting" it in Gnome Bluetooth settings) and then re-pair it. I'm not sure
if this bug is related to the new version or just a coincidence.


Cheers,

Bastian

#1087761#15
Date:
2024-11-19 03:43:04 UTC
From:
To:
my bluetooth headset with bluez 5.77-1 and recent kernels:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1083183

and other users had the same issue:

https://unix.stackexchange.com/q/784717/74516

and the problem is fixed with bluez 5.79-1 (tested with the
6.11.9-amd64 kernel).

#1087761#20
Date:
2024-11-20 14:02:48 UTC
From:
To:
I am downgrading the severity of this issue since I cannot reproduce
this specific failure and the bug reporter was able to work around
this issue by using GNOME to forget the device and re-pair. (I don't
have Bose headphones but I do use other Bluetooth devices.)

I suspect that the bug reporter might not be able to reproduce
themselves if they reinstall the old bluez and upgrade again?

Occasionally, my Ubuntu system is unable to use Bluetooth devices.
Things work better after I either restart my computer or use the
"forget and re-pair" technique. This has been happening since well
before I installed bluez 5.79. I think Debian Testing users would be
better off with 5.79 than stuck on an older version.

Thank you,
Jeremy Bícha

#1087761#27
Date:
2024-11-22 15:10:45 UTC
From:
To:
I'm a Trixie user, with kernel 6.10.11(but it doesn't work also with
latest 6.11.7).
After bluez update 5.77-1 -> 5.79-1 I cannot send/receive file from my
phone.

Tried with two different adapters:
-----------------------------------------------------------------------------------------------------------------------------------------------
$ lsusb| grep Blue
Bus 001 Device 003: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth
Dongle (HCI mode)
Bus 001 Device 006: ID 8087:0029 Intel Corp. AX200 Bluetooth
-----------------------------------------------------------------------------------------------------------------------------------------------

Here some logs from btmgmt
-----------------------------------------------------------------------------------------------------------------------------------------------
# btmgmt
[mgmt]# info
[mgmt]# Index list with 2 items
[mgmt]# hci1:   Primary controller
[mgmt]#         addr DC:41:A9:AC:0B:B5 version 11 manufacturer 2 class
0x6c0104
[mgmt]#         supported settings: powered connectable fast-connectable
discoverable bondable link-security ssp br/edr le advertising
secure-conn debug-keys privacy configuration static-addr
phy-configuration wide-band-speech
[mgmt]#         current settings: powered bondable ssp br/edr le
secure-conn wide-band-speech
[mgmt]#         name ilprof5
[mgmt]#         short name
[mgmt]# hci0:   Primary controller
[mgmt]#         addr 00:18:5D:00:57:D4 version 3 manufacturer 10 class
0x6c0104
[mgmt]#         supported settings: powered connectable fast-connectable
discoverable bondable link-security br/edr debug-keys phy-configuration
[mgmt]#         current settings: powered bondable br/edr
[mgmt]#         name ilprof5 Old Adapter
[mgmt]#         short name
[mgmt]# hci1:   Configuration options
[mgmt]#         supported options: public-address
[mgmt]#         missing options:
[mgmt]# hci1 AC:1E:9E:4C:48:30 type BR/EDR connected eir_len 14
[mgmt]# hci1 AC:1E:9E:4C:48:30 auth failed with status 0x05
(Authentication Failed)
[mgmt]# hci1 AC:1E:9E:4C:48:30 type BR/EDR disconnected with reason 0
[mgmt]# hci0 AC:1E:9E:4C:48:30 type BR/EDR connected eir_len 14
[mgmt]# hci0 AC:1E:9E:4C:48:30 type BR/EDR disconnected with reason 2
[mgmt]# hci1 AC:1E:9E:4C:48:30 type BR/EDR connected eir_len 14
[mgmt]# hci1 AC:1E:9E:4C:48:30 auth failed with status 0x05
(Authentication Failed)
[mgmt]# hci1 AC:1E:9E:4C:48:30 type BR/EDR disconnected with reason 0
[mgmt]# hci0 AC:1E:9E:4C:48:30 type BR/EDR connected eir_len 14
[mgmt]# hci1 AC:1E:9E:4C:48:30 type BR/EDR connected eir_len 14
[mgmt]# hci1 AC:1E:9E:4C:48:30 auth failed with status 0x05
(Authentication Failed)
[mgmt]# hci1 AC:1E:9E:4C:48:30 type BR/EDR disconnected with reason 0
[mgmt]# hci1 AC:1E:9E:4C:48:30 type BR/EDR connected eir_len 14
[mgmt]# hci1 AC:1E:9E:4C:48:30 auth failed with status 0x05
(Authentication Failed)
[mgmt]# hci1 AC:1E:9E:4C:48:30 type BR/EDR disconnected with reason 0
[mgmt]# hci1 AC:41:6A:54:9B:53 type BR/EDR connected eir_len 14
[mgmt]# hci1 AC:41:6A:54:9B:53 type BR/EDR disconnected with reason 2
[mgmt]# hci0 04:21:44:43:5D:E2 type BR/EDR connect failed (status 0x04,
Connect Failed)
[mgmt]# hci0 new_settings: powered connectable bondable br/edr
[mgmt]# hci0 new_settings: powered connectable discoverable bondable br/edr
[mgmt]# hci0 new_settings: powered bondable br/edr
[mgmt]# hci0 AC:1E:9E:4C:48:30 type BR/EDR disconnected with reason 2
[mgmt]# hci1 new_settings: powered connectable bondable ssp br/edr le
secure-conn wide-band-speech
[mgmt]# hci1 new_settings: powered connectable discoverable bondable ssp
br/edr le secure-conn wide-band-speech
[mgmt]# hci1 AC:1E:9E:4C:48:30 type BR/EDR connected eir_len 19
[mgmt]# hci1 AC:1E:9E:4C:48:30 type BR/EDR disconnected with reason 3
-----------------------------------------------------------------------------------------------------------------------------------------------

and from btmon
-----------------------------------------------------------------------------------------------------------------------------------------------
bluetoothd[852]: @ MGMT Command: User Confirmation Negative Reply
(0x001d) plen 7 {0x0001} [hci1] 49.411593
         BR/EDR Address: AC:1E:9E:4C:48:30 (Xiaomi Communications Co Ltd)
< HCI Command: User Confirmation Request Neg Reply (0x01|0x002d) plen 6
#53 [hci1] 49.411679
         Address: AC:1E:9E:4C:48:30 (Xiaomi Communications Co Ltd)
 > HCI Event: Command Complete (0x0e) plen 10 #54 [hci1] 49.412266
       User Confirmation Request Neg Reply (0x01|0x002d) ncmd 1
         Status: Success (0x00)
         Address: AC:1E:9E:4C:48:30 (Xiaomi Communications Co Ltd)
@ MGMT Event: Command Complete (0x0001) plen 10 {0x0001} [hci1] 49.412342
       User Confirmation Negative Reply (0x001d) plen 7
         Status: Success (0x00)
         BR/EDR Address: AC:1E:9E:4C:48:30 (Xiaomi Communications Co Ltd)
 > HCI Event: Simple Pairing Complete (0x36) plen 7 #55 [hci1] 49.706283
         Status: Authentication Failure (0x05)
         Address: AC:1E:9E:4C:48:30 (Xiaomi Communications Co Ltd)
 > HCI Event: Auth Complete (0x06) plen 3 #56 [hci1] 49.707273
         Status: Authentication Failure (0x05)
         Handle: 256 Address: AC:1E:9E:4C:48:30 (Xiaomi Communications
Co Ltd)
@ MGMT Event: Authentication Failed (0x0011) plen 8 {0x0002} [hci1]
49.707335
         BR/EDR Address: AC:1E:9E:4C:48:30 (Xiaomi Communications Co Ltd)
         Status: Authentication Failed (0x05)
@ MGMT Event: Authentication Failed (0x0011) plen 8 {0x0001} [hci1]
49.707335
         BR/EDR Address: AC:1E:9E:4C:48:30 (Xiaomi Communications Co Ltd)
         Status: Authentication Failed (0x05)
 > HCI Event: Disconnect Complete (0x05) plen 4 #57 [hci1] 50.161274
         Status: Success (0x00)
         Handle: 256 Address: AC:1E:9E:4C:48:30 (Xiaomi Communications
Co Ltd)
         Reason: Authentication Failure (0x05)
@ MGMT Event: Device Disconnected (0x000c) plen 8 {0x0002} [hci1] 50.161313
         BR/EDR Address: AC:1E:9E:4C:48:30 (Xiaomi Communications Co Ltd)
         Reason: Unspecified (0x00)
@ MGMT Event: Device Disconnected (0x000c) plen 8 {0x0001} [hci1] 50.161313
         BR/EDR Address: AC:1E:9E:4C:48:30 (Xiaomi Communications Co Ltd)
         Reason: Unspecified (0x00)

bluetoothd[852]: @ MGMT Command: User Confirmation Negative Reply
(0x001d) plen 7 {0x0001} [hci1] 482.667318
         BR/EDR Address: AC:1E:9E:4C:48:30 (Xiaomi Communications Co Ltd)
< HCI Command: User Confirmation Request Neg Reply (0x01|0x002d) plen 6
#226 [hci1] 482.667351
         Address: AC:1E:9E:4C:48:30 (Xiaomi Communications Co Ltd)
 > HCI Event: Command Complete (0x0e) plen 10 #227 [hci1] 482.668014
       User Confirmation Request Neg Reply (0x01|0x002d) ncmd 1
         Status: Success (0x00)
         Address: AC:1E:9E:4C:48:30 (Xiaomi Communications Co Ltd)
@ MGMT Event: Command Complete (0x0001) plen 10 {0x0001} [hci1] 482.668045
       User Confirmation Negative Reply (0x001d) plen 7
         Status: Success (0x00)
         BR/EDR Address: AC:1E:9E:4C:48:30 (Xiaomi Communications Co Ltd)
 > HCI Event: Simple Pairing Complete (0x36) plen 7 #228 [hci1] 483.071001
         Status: Authentication Failure (0x05)
         Address: AC:1E:9E:4C:48:30 (Xiaomi Communications Co Ltd)
 > HCI Event: Auth Complete (0x06) plen 3 #229 [hci1] 483.071989
         Status: Authentication Failure (0x05)
         Handle: 256 Address: AC:1E:9E:4C:48:30 (Xiaomi Communications
Co Ltd)
@ MGMT Event: Authentication Failed (0x0011) plen 8 {0x0002} [hci1]
483.072052
         BR/EDR Address: AC:1E:9E:4C:48:30 (Xiaomi Communications Co Ltd)
         Status: Authentication Failed (0x05)
@ MGMT Event: Authentication Failed (0x0011) plen 8 {0x0001} [hci1]
483.072052
         BR/EDR Address: AC:1E:9E:4C:48:30 (Xiaomi Communications Co Ltd)
         Status: Authentication Failed (0x05)
 > HCI Event: Disconnect Complete (0x05) plen 4 #230 [hci1] 483.237972
         Status: Success (0x00)
         Handle: 256 Address: AC:1E:9E:4C:48:30 (Xiaomi Communications
Co Ltd)
         Reason: Authentication Failure (0x05)
@ MGMT Event: Device Disconnected (0x000c) plen 8 {0x0002} [hci1] 483.238030
         BR/EDR Address: AC:1E:9E:4C:48:30 (Xiaomi Communications Co Ltd)
         Reason: Unspecified (0x00)
@ MGMT Event: Device Disconnected (0x000c) plen 8 {0x0001} [hci1] 483.238030
         BR/EDR Address: AC:1E:9E:4C:48:30 (Xiaomi Communications Co Ltd)
         Reason: Unspecified (0x00)
-------------------------------------------------------------------------------------------------------------------------------------------- All is ok if I downgrade to bluez 5.77-1 with kernel 6.10.11, a litle bit more unstable with 6.11.7.
#1087761#32
Date:
2024-11-22 18:02:41 UTC
From:
To:
found this in journalctl related to my phones.

nov 22 17:40:36 ilprof5 kernel: Bluetooth: hci0: Invalid link address
type 1 for 74:38:22:57:d8:55
nov 22 17:40:36 ilprof5 kernel: Bluetooth: hci0: Invalid link address
type 1 for ac:1e:9e:4c:48:30