You are not logged in.

#1 2023-12-27 18:13:39

zw963
Member
Registered: 2018-06-18
Posts: 201

[Solved] Connect to paired bluetooth earphone failed

Hi, i install a new arch linux from a scratch recent days.

I use GNOME 4.5 + Wayland, i don't want install too many not necessary package, so,
i just install GNOME desktop with necessary package, and enable bluetooth service.

pacman -S gnome pulseaudio-bluetooth && systemctl enable gdm bluetooth

When i first done install, i can connect my same bluetooth earphone successful.

But, it not connect failed when i try again, it was paired, but when i try to enable connection, it failed.

Following is error message of dmesg:

Bluetooth: hci0: Opcode 0x0401 failed: -16

Following is error message of  `sudo journal -u bluetooth`.


Dec 28 01:53:59 mingfan systemd[1]: Starting Bluetooth service...
Dec 28 01:53:59 mingfan bluetoothd[764]: Bluetooth daemon 5.71
Dec 28 01:53:59 mingfan systemd[1]: Started Bluetooth service.
Dec 28 01:53:59 mingfan bluetoothd[764]: Starting SDP server
Dec 28 01:53:59 mingfan bluetoothd[764]: src/plugin.c:plugin_init() System does not support csip plugin
Dec 28 01:53:59 mingfan bluetoothd[764]: profiles/audio/micp.c:micp_init() D-Bus experimental not enabled
Dec 28 01:53:59 mingfan bluetoothd[764]: src/plugin.c:plugin_init() System does not support micp plugin
Dec 28 01:53:59 mingfan bluetoothd[764]: src/plugin.c:plugin_init() System does not support vcp plugin
Dec 28 01:53:59 mingfan bluetoothd[764]: src/plugin.c:plugin_init() System does not support mcp plugin
Dec 28 01:53:59 mingfan bluetoothd[764]: src/plugin.c:plugin_init() System does not support bass plugin
Dec 28 01:53:59 mingfan bluetoothd[764]: src/plugin.c:plugin_init() System does not support bap plugin
Dec 28 01:53:59 mingfan bluetoothd[764]: Bluetooth management interface 1.22 initialized
Dec 28 01:53:59 mingfan bluetoothd[764]: Battery Provider Manager created
Dec 28 01:54:07 mingfan bluetoothd[764]: Endpoint registered: sender=:1.87 path=/MediaEndpoint/A2DPSource/ldac_hq
Dec 28 01:54:07 mingfan bluetoothd[764]: Endpoint registered: sender=:1.87 path=/MediaEndpoint/A2DPSource/ldac_sq
Dec 28 01:54:07 mingfan bluetoothd[764]: Endpoint registered: sender=:1.87 path=/MediaEndpoint/A2DPSource/ldac_mq
Dec 28 01:54:07 mingfan bluetoothd[764]: Endpoint registered: sender=:1.87 path=/MediaEndpoint/A2DPSink/aptx_hd
Dec 28 01:54:07 mingfan bluetoothd[764]: Endpoint registered: sender=:1.87 path=/MediaEndpoint/A2DPSource/aptx_hd
Dec 28 01:54:07 mingfan bluetoothd[764]: Endpoint registered: sender=:1.87 path=/MediaEndpoint/A2DPSink/aptx
Dec 28 01:54:07 mingfan bluetoothd[764]: Endpoint registered: sender=:1.87 path=/MediaEndpoint/A2DPSource/aptx
Dec 28 01:54:07 mingfan bluetoothd[764]: Endpoint registered: sender=:1.87 path=/MediaEndpoint/A2DPSink/sbc
Dec 28 01:54:07 mingfan bluetoothd[764]: Endpoint registered: sender=:1.87 path=/MediaEndpoint/A2DPSource/sbc
Dec 28 01:54:07 mingfan bluetoothd[764]: Endpoint registered: sender=:1.87 path=/MediaEndpoint/A2DPSink/sbc_xq_453
Dec 28 01:54:07 mingfan bluetoothd[764]: Endpoint registered: sender=:1.87 path=/MediaEndpoint/A2DPSource/sbc_xq_453
Dec 28 01:54:07 mingfan bluetoothd[764]: Endpoint registered: sender=:1.87 path=/MediaEndpoint/A2DPSink/sbc_xq_512
Dec 28 01:54:07 mingfan bluetoothd[764]: Endpoint registered: sender=:1.87 path=/MediaEndpoint/A2DPSource/sbc_xq_512
Dec 28 01:54:07 mingfan bluetoothd[764]: Endpoint registered: sender=:1.87 path=/MediaEndpoint/A2DPSink/sbc_xq_552
Dec 28 01:54:07 mingfan bluetoothd[764]: Endpoint registered: sender=:1.87 path=/MediaEndpoint/A2DPSource/sbc_xq_552
Dec 28 01:55:30 mingfan bluetoothd[764]: src/profile.c:ext_connect() Hands-Free Voice gateway failed connect to 4C:72:74:D3:1A:AB: Permission denied (13)
Dec 28 01:55:32 mingfan bluetoothd[764]: profiles/audio/avdtp.c:avdtp_connect_cb() connect to 4C:72:74:D3:1A:AB: Host is down (112)

I guess i maybe missing some package not install?

following is some list.


 ╰─ $ 1  pacman -Q |grep  alsa
alsa-lib 1.2.10-2
alsa-plugins 1:1.2.7.1-2
alsa-topology-conf 1.2.5.1-3
alsa-ucm-conf 1.2.10-2
lib32-alsa-lib 1.2.10-2
lib32-alsa-plugins 1.2.7.1-2

 ╰─ $ pacman -Q |grep pipewire
gst-plugin-pipewire 1:1.0.0-2
libpipewire 1:1.0.0-2
pipewire 1:1.0.0-2
pipewire-media-session 1:0.4.2-2

 ╰─ $ pacman -Q |grep pulseaudio
pulseaudio 16.1-7
pulseaudio-bluetooth 16.1-7

If need more info, please let me know, thanks.



-------------------

[EDITED]

 ╰─ $ pacman -Q |grep blue
bluez 5.71-3
bluez-libs 5.71-3
gnome-bluetooth-3.0 42.7-2
pulseaudio-bluetooth 16.1-7

 ╰─ $ id
uid=1000(zw963) gid=1000(zw963) groups=1000(zw963),108(vboxusers),281(docker),991(lp),996(audio)

Last edited by zw963 (2024-01-13 16:00:11)

Offline

#2 2023-12-27 18:48:10

zw963
Member
Registered: 2018-06-18
Posts: 201

Re: [Solved] Connect to paired bluetooth earphone failed

Hi, i solve this issue, i guess this issue caused by following reason.

When i first connect my blue device, i am not add myself into `lp` group, although, i added then, but, those device still exists some issue.

After i remove this device, and try paired again (sure, i am in lp group now), it works, and auto connected when system start.

Thank very much!

Offline

#3 2024-01-08 03:55:09

zw963
Member
Registered: 2018-06-18
Posts: 201

Re: [Solved] Connect to paired bluetooth earphone failed

Hi, sorry for confusing, i still meet this exactly same issue after try connect my paired earphone again today.

Logs from sudo journalctl -u bluetooth -f


Jan 08 00:43:33 mingfan bluetoothd[804]: src/profile.c:ext_connect() Hands-Free Voice gateway failed connect to 4C:72:74:D3:1A:AB: Permission denied (13)
Jan 08 00:43:35 mingfan bluetoothd[804]: profiles/audio/avdtp.c:avdtp_connect_cb() connect to 4C:72:74:D3:1A:AB: Host is down (112)

profiles/audio/avdtp.c:avdtp_connect_cb() connect to 4C:72:74:D3:1A:AB: Connection refused (111)


Logs from dmsg:


[  114.444387] Bluetooth: hci0: Opcode 0x0401 failed: -16


I  try my best to try fix this, switch kernel, reboot, install/remove packages, and finally,

i try full switch my packages to pipewire with this: (will install/remove some packages)

$: pacman -S wireplumber pipewire-audio pipewire-alsa pipewire-jack lib32-pipewire

And install bluez related packages

$ pacman -S bluez bluez-libs bluez-utils

Then, reboot system, and remove  device use gnome bluetooth and pair again,  It's seem like reconnect start working for now.

anyway, if issue happen again, i will report here, thank!

Last edited by zw963 (2024-01-08 03:55:28)

Offline

#4 2024-01-13 15:59:48

zw963
Member
Registered: 2018-06-18
Posts: 201

Re: [Solved] Connect to paired bluetooth earphone failed

Hi, after test several times, i thought this issue solved by previous solution.

$: pacman -S wireplumber pipewire-audio pipewire-alsa pipewire-jack lib32-pipewire pipewire-pulse
$ pacman -S bluez bluez-libs bluez-utils

Thank you.

Last edited by zw963 (2024-01-16 14:03:21)

Offline

#5 2024-03-09 05:05:48

zw963
Member
Registered: 2018-06-18
Posts: 201

Re: [Solved] Connect to paired bluetooth earphone failed

This issue happen again.

Mar 09 13:01:03 mingfan bluetoothd[756]: profiles/audio/avdtp.c:avdtp_connect_cb() connect to 4C:72:74:D3:1A:AB: Host is down (112)
Mar 09 13:01:09 mingfan bluetoothd[756]: src/profile.c:ext_connect() Hands-Free Voice gateway failed connect to 4C:72:74:D3:1A:AB: Connection refused (111)
[13655.482274] Bluetooth: hci0: Opcode 0x0401 failed: -16
[13892.760603] Bluetooth: hci0: Opcode 0x0401 failed: -16
[13972.197936] Bluetooth: hci0: Bad flag given (0x1) vs supported (0x0)

It still work when remove paired device, and then reconnect it, any idea?

--------

EDIT:

after reboot, it can reconnect automatically. (as if it work), but this situation happen several times, that is, it will not work someday in the future.

Last edited by zw963 (2024-03-09 05:24:09)

Offline

#6 2024-03-19 20:33:22

kode54
Member
Registered: 2013-10-21
Posts: 20

Re: [Solved] Connect to paired bluetooth earphone failed

I'm having the same problem with Bluetooth audio and game controllers randomly disconnecting. Realtek RTL8852CE with its 8852C Bluetooth USB adapter. An issue on the Bluez tracker suggests it can be mitigated by disabling User mode HID support, yet the Arch wiki suggests turning that on for DualSense controllers, and possibly also DualShock 4 like mine.

This issue only started happening with recent versions of bluez, too, and the UHID feature didn't need to be turned off for the older versions.

EDIT: Explanation here so you don't have to go link or wiki chasing:

`/etc/bluetooth/input.conf`, add `UserspaceHID=false` below the commented out `=true` which is the default.

Last edited by kode54 (2024-03-19 20:55:50)

Offline

#7 2024-04-06 17:10:40

zw963
Member
Registered: 2018-06-18
Posts: 201

Re: [Solved] Connect to paired bluetooth earphone failed

kode54 wrote:

`/etc/bluetooth/input.conf`, add `UserspaceHID=false` below the commented out `=true` which is the default.

Thanks, will try it next time this issue happen.

Offline

Board footer

Powered by FluxBB