Skip to content

[Linux] AirPods reconnect with no audio card when LibrePods' AACP link comes up first (A2DP never connected) #799

Description

@fuad-daoud

App version

Observed on v1.0.0-rc1 (Qt client, linux/); the same code path is present on linux/rust @ 672e65a (read, not run).

Variant

Rust rewrite (linux-rust branch)

Distro and version

Arch Linux (kernel 6.18 LTS) — PipeWire 1.6.9, WirePlumber 0.5.17, BlueZ 5.87

Desktop environment / compositor

swayfx 0.6 (Wayland)

Install method (only official sources)

Built from source (nix or otherwise)

AirPods model

AirPods Pro 3

What happened

After the AirPods come out of the case (or after LibrePods restarts), the device is Connected: yes in BlueZ but has no A2DP transport, so PipeWire never creates a bluez_card and there is no output device at all. LibrePods keeps logging No matching Bluetooth card found for MAC address.

The link is up but only for LibrePods' own AACP L2CAP channel: LibrePods sees the AirPods advertise and connects AACP before the AirPods run their own reconnect, and the AirPods then don't bring up A2DP/HFP on the existing link. Restarting LibrePods reproduces it every time here: closing its AACP socket drops A2DP, and the reconnect only restores AACP.

Evidence — no sepN/fdN under the device until A2DP is requested explicitly:

$ busctl tree org.bluez | grep -A3 dev_XX
  └─ /org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX          # nothing below: no A2DP
$ busctl call org.bluez /org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX org.bluez.Device1 \
    ConnectProfile s 0000110b-0000-1000-8000-00805f9b34fb
  ├─ .../sep2
  │ └─ .../sep2/fd0                                  # A2DP up, card appears

(bluetoothctl connect does not help in this state — it goes over LE and fails with le-connection-abort-by-local.)

I couldn't find any code on linux/rust that connects A2DP when the card is missing — activate_a2dp_profile only looks the card up and gives up — so I expect it has the same problem, but I've only tested the Qt client.

Suggested fix: when the AACP connection is up and no bluez card exists for the device, call org.bluez.Device1.ConnectProfile("0000110b-0000-1000-8000-00805f9b34fb") once per connection, then retry activation after a short delay. I've run exactly that on the Qt client: the card comes up within ~1 s on a2dp-sink, and WirePlumber then makes it the default sink.

Logs and stderr

Connecting to device: "…AirPods Pro"
Connected to device, sending initial packets
No matching Bluetooth card found for MAC address: "XX_XX_XX_XX_XX_XX"
Device output name set to: ""
At least one AirPod is in ear
Connected device MAC address or output name is empty, cannot activate A2DP profile

Additional context

Same symptom as #795, different cause: there the card exists but the lookup ran too early; here the card never exists because A2DP was never connected, so re-resolving the card name alone does not fix it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions