9

Trying to connect some wireless headphones to my laptop. They worked a couple days ago then stopped and I cant figure out why. Before that it would work for a few days then stop until I rebooted or just tried again after a few hours. Now it hasn't worked for almost 2 weeks.

$ neofetch 
OS: Arch Linux x86_64 
Host: 20BU000AUS ThinkPad T450 
Kernel: 5.17.7-zen1-2-zen 

# Installed 
bluez 5.64-2
bluez-firmware 1.2-9
bluez-hid2hci 5.64-2
bluez-libs 5.64-2
bluez-utils 5.64-2
hidapi 0.11.2-1
libldac 2.0.2.3-1
pulseaudio-bluetooth 15.0-4
sbc 1.5-2

$ bluetoothctl show
Powered: yes
Discoverable: no
Pairable: yes

$ bluetoothctl info 8D:40:4C:C6:73:A4 
Device 8D:40:4C:C6:73:A4 (public)
    Paired: yes
    Trusted: yes
    Blocked: no
    Connected: no
    LegacyPairing: no

$ bluetoothctl connect 8D:40:4C:C6:73:A4 
Attempting to connect to 8D:40:4C:C6:73:A4
Failed to connect: org.bluez.Error.Failed br-connection-profile-unavailable

$ journalctl -u bluetooth
bluetoothd[13782]: src/service.c:btd_service_connect() a2dp-sink profile connect failed for 8D:40:4C:C6:73:A4: Protocol not available

$ systemctl list-unit-files | grep blue
UNIT FILE                                  STATE           VENDOR PRESET
bluetooth-mesh.service                     enabled         disabled
bluetooth.service                          enabled         disabled
dbus-org.bluez.mesh.service                alias           -
dbus-org.bluez.service                     alias           -
bluetooth.target                           static          -

$ lsmod | grep bluetooth
bluetooth             925696  31 btrtl,btmtk,btintel,btbcm,bnep,btusb
crc16                  16384  1 bluetooth
rfkill                 36864  6 iwlmvm,bluetooth,thinkpad_acpi,cfg80211
ecdh_generic           16384  2 bluetooth
Dominic
  • 129
  • 1
  • 2
  • 4
  • 3
    Have you tried e.g. `rm -R /var/lib/bluetooth/8D:40:4C:C6:73:A4` (after stopping bluetooth.service) and start all over again? Also, is the `journalctl -u bluetooth` output you attached a *full* one? If so, how does `systemctl --user status pulseaudio` look by the time / after you attempt to `connect`? – Tom Yan May 19 '22 at 03:14
  • 3
    The BT stack in Linux **sucks**. Just saying. – Artem S. Tashkinov May 19 '22 at 12:08
  • @TomYan there was nothing in `/var/lib/bluetooth`. I ended up uninstalling everything bluetooth related except `bluez` and `bluez-utils`. Then I ran `sudo bluetoothctl` (its the first time I've ever tried sudo with `bluetoothctl` since it worked before without it). Now everything works fine. – Dominic May 20 '22 at 17:23
  • @ArtemS.Tashkinov I always hated bluetooth in general – Dominic May 20 '22 at 17:24
  • @TomYan Thanks! I've been searching for a solution for days and this did it. I have a bluetooth headset that connected the first time without issue, but then wouldn't reconnect. you're solution solved the problem, and I'm able to connect again. I'll still have to see if I'm able to reconnect later – Menachem May 25 '22 at 02:45
  • @Menachem IIRC none of the bluetooth steps will cause pulse to start, so if you use bluetooth audio, you might want to make sure (with `systemctl --user is-enabled`) that you have `pulseaudio.service` enabled (with `systemctl --user enable`, or as root, `systemctl --global enable`), instead of just having the socket unit enabled. – Tom Yan May 25 '22 at 06:22

4 Answers4

16

Looks like OP found a solution in the comments of the question, but for anyone else looking at this, for me it just took a systemctl --user enable pulseaudio and systemctl --user start pulseaudio to fix it.

Eric Pedley
  • 161
  • 1
  • 5
2

Many sources recommend setting ControllerMode = bredr and AutoEnable = true in /etc/bluetooth/main.conf, which has worked for me on previous installs.

In this case however, I had to comment out the line ControllerMode = bredr to solve the "br-connection-profile-unavailable" error.

(both of these were on Arch, not sure what made the difference)

Scriddie
  • 121
  • 3
0

I commented AutoEnable = true => #AutoEnable = true

  • Welcome to the site. Your post looks like it was intended as a comment to the [answer by Scriddie](https://unix.stackexchange.com/a/733802/377345). In that case, please don't post it as an answer in itself. Once you have gained enough reputation, you will be able to comment on other people's posts. – AdminBee Apr 20 '23 at 11:08
0

Try to use pipewire instead of pulseaudio:

sudo apt install pipewire pipewire-pulse pipewire-jack pipewire-alsa pipewire-audio