You are not logged in.

#1 2024-10-27 13:21:29

beast41514
Member
Registered: 2024-01-11
Posts: 42

[SOLVED] Bluetooth air buds not working

I did a fresh arch install, with qtile as WM. I am not using pulse-audio or pipe-wire, my sound system is working with ALSA only. I have this file setting my default card in home directory.

~/.asoundrc :

defaults.pcm.card 2
defaults.ctl.card 2

My air pods are connecting using bluetoothctl but the sound is coming through speakers not air pods.

output of systemctl status bluetooth  (before connecting to air pods):

● bluetooth.service - Bluetooth service
     Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; preset: disabled)
     Active: active (running) since Sun 2024-10-27 10:07:38 IST; 1h 27min ago
 Invocation: 42f07b206d504b83a0ce001346135b43
       Docs: man:bluetoothd(8)
   Main PID: 6371 (bluetoothd)
     Status: "Running"
      Tasks: 1 (limit: 18286)
     Memory: 1.2M (peak: 1.9M)
        CPU: 330ms
     CGroup: /system.slice/bluetooth.service
             └─6371 /usr/lib/bluetooth/bluetoothd

Oct 27 11:03:25 odd bluetoothd[6371]: Endpoint registered: sender=:1.110 path=/MediaEndpoint/A2DPSource/faststream
Oct 27 11:03:25 odd bluetoothd[6371]: Endpoint registered: sender=:1.110 path=/MediaEndpoint/A2DPSource/faststream_duplex
Oct 27 11:03:25 odd bluetoothd[6371]: Endpoint registered: sender=:1.110 path=/MediaEndpoint/A2DPSink/opus_05
Oct 27 11:03:25 odd bluetoothd[6371]: Endpoint registered: sender=:1.110 path=/MediaEndpoint/A2DPSource/opus_05
Oct 27 11:03:25 odd bluetoothd[6371]: Endpoint registered: sender=:1.110 path=/MediaEndpoint/A2DPSink/opus_05_duplex
Oct 27 11:03:25 odd bluetoothd[6371]: Endpoint registered: sender=:1.110 path=/MediaEndpoint/A2DPSource/opus_05_duplex
Oct 27 11:04:01 odd bluetoothd[6371]: profiles/audio/avdtp.c:try_send() send: Transport endpoint is not connected (107)
Oct 27 11:04:01 odd bluetoothd[6371]: src/service.c:btd_service_connect() a2dp-sink profile connect failed for B8:5D:0A:15:CB:FC: Input/output error
Oct 27 11:04:02 odd bluetoothd[6371]: GLib: Invalid file descriptor.
Oct 27 11:06:28 odd bluetoothd[6371]: No matching connection for device

output of systemctl status bluetooth (after connecting to air pods):

bluetooth.service - Bluetooth service
     Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; preset: disabled)
     Active: active (running) since Sun 2024-10-27 10:07:38 IST; 1h 32min ago
 Invocation: 42f07b206d504b83a0ce001346135b43
       Docs: man:bluetoothd(8)
   Main PID: 6371 (bluetoothd)
     Status: "Running"
      Tasks: 1 (limit: 18286)
     Memory: 1.2M (peak: 1.9M)
        CPU: 341ms
     CGroup: /system.slice/bluetooth.service
             └─6371 /usr/lib/bluetooth/bluetoothd

Oct 27 11:35:15 odd bluetoothd[6371]: src/profile.c:record_cb() Unable to get Hands-Free Voice gateway SDP record: Host is down
Oct 27 11:35:25 odd bluetoothd[6371]: src/profile.c:record_cb() Unable to get Hands-Free Voice gateway SDP record: Host is down
Oct 27 11:35:37 odd bluetoothd[6371]: src/profile.c:record_cb() Unable to get Hands-Free Voice gateway SDP record: Host is down
Oct 27 11:35:53 odd bluetoothd[6371]: src/profile.c:record_cb() Unable to get Hands-Free Voice gateway SDP record: Host is down
Oct 27 11:36:17 odd bluetoothd[6371]: src/profile.c:record_cb() Unable to get Hands-Free Voice gateway SDP record: Host is down
Oct 27 11:36:57 odd bluetoothd[6371]: src/profile.c:record_cb() Unable to get Hands-Free Voice gateway SDP record: Host is down
Oct 27 11:38:09 odd bluetoothd[6371]: src/profile.c:record_cb() Unable to get Hands-Free Voice gateway SDP record: Host is down
Oct 27 11:39:49 odd bluetoothd[6371]: profiles/audio/avdtp.c:try_send() send: Transport endpoint is not connected (107)
Oct 27 11:39:49 odd bluetoothd[6371]: src/service.c:btd_service_connect() a2dp-sink profile connect failed for B8:5D:0A:15:CB:FC: Input/output error
Oct 27 11:39:50 odd bluetoothd[6371]: GLib: Invalid file descriptor.

If you need anything else just let me know.

Last edited by beast41514 (2024-10-28 14:07:32)

Offline

#2 2024-10-27 20:58:55

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,300

Re: [SOLVED] Bluetooth air buds not working

And from where do you know that "card 2" is correct for BT? There's no support for bluetooth in plain ALSA.  There's an effort of binding the ALSA API over bluez but that comes with comparatively many drawbacks, like no automatic fallover to a local device should BT not be present and you will have to manually and actively and knowingly opt for BT per application start (there are very few that can do on the fly switching on plain ALSA) at the very minimum. There's a reason pipewire and pulseaudio exist and stuff like this is probably the biggest.

As such I strongly reccommend you opt for pipewire which will generally make this trivial. If you want to stay on plain ALSA for some reason and are dead set on doing that you need to setup the alsa-bluez tooling: https://wiki.archlinux.org/title/Bluetooth#ALSA

Last edited by V1del (2024-10-27 21:00:37)

Offline

#3 2024-10-28 14:06:19

beast41514
Member
Registered: 2024-01-11
Posts: 42

Re: [SOLVED] Bluetooth air buds not working

Sorry i am so stupid, over complicating things. I installed these packages: pipewire pipewire-alsa wireplumber bluez bluez-utils and edited ~/.asoundrc to route alsa audio through pipewire and it worked.

~/.asoundrc:

defaults.pcm.card 2
defaults.ctl.card 2

pcm.!default {
    type plug
    slave.pcm {
        type pipewire
    }
}
ctl.!default {
    type pipewire
}

Last edited by beast41514 (2024-10-28 14:07:02)

Offline

#4 2024-10-29 10:19:25

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,300

Re: [SOLVED] Bluetooth air buds not working

You're not stupid, while there are many ways to make plain ALSA work, as soon as it's about dynamically interacting whith potentially quickly disappearing devices it's simply quite unflexible.

FWIW you can remove that config, there's a default in the pipewire-alsa package which will do this logically correctly already.

Offline

Board footer

Powered by FluxBB