You are not logged in.

#1 2022-01-28 17:56:23

alba4k
Member
From: Switzerland
Registered: 2021-12-05
Posts: 83
Website

Bluetooth making me lose my mind

I've always had many issues with bluetooth on Linux, but it is getting so much worse lately.

Let me start with the fact that my headphones often had problems and sometimes did not connect, but usually worked pretty well.

2 days ago the bluetooth adapter started to not get recognized anymore and required me to reset the cmos, but after doing so I had bluetooth working one time, after which I got a long series of different random errors when trying to connect to my headphones (br-connection-canceled; br-connection-refused; br-profile-unknown; ..........) while they work fine with my phone.
Now, apparently, bluez refuses to work decently....

bluetoothctl power on; bluetoothctl connect XX:XX:XX:XX:XX:XX
Failed to set power on: org.bluez.Error.Busy
Attempting to connect to XX:XX:XX:XX:XX:XX
Failed to connect: org.bluez.Error.NotReady br-connection-adapter-not-powered

Would love to see those working decently...

systemctl status bluetooth
● bluetooth.service - Bluetooth service
     Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: disabled)
     Active: active (running) since Fri 2022-01-28 18:43:44 CET; 5min ago
       Docs: man:bluetoothd(8)
   Main PID: 377 (bluetoothd)
     Status: "Running"
      Tasks: 1 (limit: 28109)
     Memory: 2.9M
        CPU: 47ms
     CGroup: /system.slice/bluetooth.service
             └─377 /usr/lib/bluetooth/bluetoothd

gen 28 18:46:06 ProBook bluetoothd[377]: Endpoint registered: sender=:1.49 path=/MediaEndpoint/A2DPSink/sbc
gen 28 18:46:06 ProBook bluetoothd[377]: Endpoint registered: sender=:1.49 path=/MediaEndpoint/A2DPSource/sbc
gen 28 18:46:06 ProBook bluetoothd[377]: Endpoint registered: sender=:1.49 path=/MediaEndpoint/A2DPSink/sbc_xq
gen 28 18:46:06 ProBook bluetoothd[377]: Endpoint registered: sender=:1.49 path=/MediaEndpoint/A2DPSource/sbc_xq
gen 28 18:46:06 ProBook bluetoothd[377]: Endpoint registered: sender=:1.49 path=/MediaEndpoint/A2DPSource/aptx_ll_1
gen 28 18:46:06 ProBook bluetoothd[377]: Endpoint registered: sender=:1.49 path=/MediaEndpoint/A2DPSource/aptx_ll_0
gen 28 18:46:06 ProBook bluetoothd[377]: Endpoint registered: sender=:1.49 path=/MediaEndpoint/A2DPSource/aptx_ll_duplex_1
gen 28 18:46:06 ProBook bluetoothd[377]: Endpoint registered: sender=:1.49 path=/MediaEndpoint/A2DPSource/aptx_ll_duplex_0
gen 28 18:46:06 ProBook bluetoothd[377]: Endpoint registered: sender=:1.49 path=/MediaEndpoint/A2DPSource/faststream
gen 28 18:46:06 ProBook bluetoothd[377]: Endpoint registered: sender=:1.49 path=/MediaEndpoint/A2DPSource/faststream_duplex

system info:

  • Kernel: issues on multiple ones, for example 5.16.2; 5.15.17 lts

  • OS: Arch Linux

  • Laptop: HP ProBook 440 G6

  • Wireless Adapter: Realtek RTL8822BE 802.11a/b/g/n/ac WiFi adapter

As for the version of possibly related software

bluedevil 1:5.23.5-1
blueman 2.2.3-2
bluez 5.63-1
bluez-libs 5.63-1
bluez-qt 5.90.0-1
bluez-utils 5.63-1
pipewire 1:0.3.44-1
pipewire-jack 1:0.3.44-1
pipewire-media-session 1:0.4.1-1
pipewire-pulse 1:0.3.44-1

Would really appreciate any kind of help!
Thanks a lot in advance for any useful tips, and obviously do not mind asking for more info :)

Offline

#2 2022-01-29 05:49:30

jonno2002
Member
Registered: 2016-11-21
Posts: 784

Re: Bluetooth making me lose my mind

try running this script when bt doesnt work:

btrestart:

#!/bin/bash
bluetoothctl power off
sudo systemctl stop bluetooth
sudo rfkill block bluetooth
sudo rfkill unblock bluetooth
sudo systemctl start bluetooth
sleep 1
bluetoothctl power on
exit 0

Offline

#3 2022-02-18 16:44:14

kepi
Member
Registered: 2016-02-27
Posts: 2

Re: Bluetooth making me lose my mind

Can you run `journalctl -f -u bluetooth` in one terminal and `bluetoothctl connect XX:XX:XX:XX:XX:XX` in second one to doublecheck messages in log? Systemctl status tend to misslead sometime as real log messagess could be burried deeper, you can see that all messages in status are from same second and only last X is displayed.

Your problem may be different, but I just got same `org.bluez.Error.NotReady br-connection-adapter-not-powered`. There was following in logs:

❯ jc -f -u bluetooth.service
úno 18 17:20:32 kocour bluetoothd[40851]: Endpoint registered: sender=:1.27 path=/MediaEndpoint/A2DPSource/aptx_ll_1
úno 18 17:20:32 kocour bluetoothd[40851]: Endpoint registered: sender=:1.27 path=/MediaEndpoint/A2DPSource/aptx_ll_0
úno 18 17:20:32 kocour bluetoothd[40851]: Endpoint registered: sender=:1.27 path=/MediaEndpoint/A2DPSource/aptx_ll_duplex_1
úno 18 17:20:32 kocour bluetoothd[40851]: Endpoint registered: sender=:1.27 path=/MediaEndpoint/A2DPSource/aptx_ll_duplex_0
úno 18 17:20:32 kocour bluetoothd[40851]: Endpoint registered: sender=:1.27 path=/MediaEndpoint/A2DPSource/faststream
úno 18 17:20:32 kocour bluetoothd[40851]: Endpoint registered: sender=:1.27 path=/MediaEndpoint/A2DPSource/faststream_duplex
úno 18 17:20:37 kocour bluetoothd[40851]: src/profile.c:ext_connect() Hands-Free Voice gateway failed connect to 14:3F:A6:XX:XX:XX: Connection refused (111)
úno 18 17:20:57 kocour bluetoothd[40851]: src/profile.c:ext_connect() Hands-Free Voice gateway failed connect to 14:3F:A6:XX:XX:XX: Connection refused (111)
úno 18 17:20:57 kocour bluetoothd[40851]: profiles/audio/avdtp.c:avdtp_connect_cb() connect to 14:3F:A6:XX:XX:XX: Connection refused (111)
úno 18 17:21:00 kocour bluetoothd[40851]: profiles/audio/avdtp.c:avdtp_connect_cb() connect to 14:3F:A6:XX:XX:XX: Connection refused (111)

Connection refused seems clear enough, I had to repair and everything is working now. Not sure if it will be making troubles. I don't have really enjoyable experience, not sure if it is since I started hibernating pc or since dualbooting to windows and sharing bt key...

Last edited by kepi (2022-02-18 16:44:47)

Offline

Board footer

Powered by FluxBB