Skip to content

add basic airpods max 2 support (linux only)#519

Open
sachin3796 wants to merge 5 commits intokavishdevar:mainfrom
sachin3796:feature/airpods-max-2-support
Open

add basic airpods max 2 support (linux only)#519
sachin3796 wants to merge 5 commits intokavishdevar:mainfrom
sachin3796:feature/airpods-max-2-support

Conversation

@sachin3796
Copy link
Copy Markdown

Airpods Max 2 support

@sachin3796
Copy link
Copy Markdown
Author

Great project by the way!

Tested the basic application.

Screenshot of Airpods Max 2 in use:

image

Log from command line tool (censored MAC addresses and the Cloud Keys):

sach@arch-desktop ~/D/P/l/l/build (feature/airpods-max-2-support)> ./librepods
qt.bluetooth.bluez: Missing CAP_NET_ADMIN permission. Cannot determine whether a found address is of random or public type.
librepods:  Initializing LibrePods
librepods:  PulseAudio controller initialized
librepods:  Set ear detection behavior to:  MediaController::PauseWhenBothRemoved
librepods:  Connecting to device:  "Sach’s AirPods Max"
librepods:  AirPodsTrayApp initialized
librepods:  Noise control mode is already set to:  2
qt.qpa.services: Failed to register with host portal QDBusError("org.freedesktop.portal.Error.Failed", "Could not register app ID: App info not found for 'me.kavishdevar.librepods'")
librepods:  Connected to device, sending initial packets
qrc:/linux/PodColumn.qml:24:5: QML QQuickImage: Cannot open: qrc:/icons/assets/max_case.png
librepods:  Parsed AirPods metadata:
librepods:  Device Name:  "Sach’s AirPods Max"
librepods:  Model Number:  "A3454"
librepods:  Manufacturer:  "Apple Inc."
librepods:  Device output name set to:  "bluez_card.XX_XX_XX_XX_XX_XX"
librepods:  Noise control mode is already set to:  1
librepods:  Noise control mode received:  AirpodsTrayApp::Enums::NoiseControlMode::NoiseCancellation
librepods:  Conversational awareness state received:  false
librepods:  One Bud ANC mode received:  false
librepods:  Noise control mode received:  AirpodsTrayApp::Enums::NoiseControlMode::NoiseCancellation
librepods:  Primary Pod: Battery::Component::Headset
librepods:  Battery status:  "Headset: 31%"
librepods:  At least one AirPod is in ear
librepods:  Selected best available A2DP profile:  "a2dp-sink-sbc_xq"
librepods:  Activating A2DP profile for AirPods:  "a2dp-sink-sbc_xq"
librepods:  A2DP profile activated successfully
librepods:  Received Magic Cloud Keys:
librepods:  MagicAccIRK:  "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
librepods:  MagicAccEncKey:  "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
librepods:  Device output name set to:  "bluez_card.XX_XX_XX_XX_XX_XX"
librepods:  Selected best available A2DP profile:  "a2dp-sink-sbc_xq"
librepods:  Activating A2DP profile for AirPods:  "a2dp-sink-sbc_xq"
librepods:  A2DP profile activated successfully
librepods:  A2DP profile activation attempted for newly connected device
librepods:  Setting noise control mode to:  AirpodsTrayApp::Enums::NoiseControlMode::Transparency
librepods:  Noise control mode received:  AirpodsTrayApp::Enums::NoiseControlMode::Transparency
librepods:  Setting noise control mode to:  AirpodsTrayApp::Enums::NoiseControlMode::Adaptive
librepods:  Noise control mode received:  AirpodsTrayApp::Enums::NoiseControlMode::Adaptive
librepods:  Setting noise control mode to:  AirpodsTrayApp::Enums::NoiseControlMode::NoiseCancellation
librepods:  Noise control mode received:  AirpodsTrayApp::Enums::NoiseControlMode::NoiseCancellation
librepods:  Setting noise control mode to:  AirpodsTrayApp::Enums::NoiseControlMode::Transparency
librepods:  Noise control mode received:  AirpodsTrayApp::Enums::NoiseControlMode::Transparency
librepods:  Setting noise control mode to:  AirpodsTrayApp::Enums::NoiseControlMode::NoiseCancellation
librepods:  Noise control mode received:  AirpodsTrayApp::Enums::NoiseControlMode::NoiseCancellation
librepods:  Setting noise control mode to:  AirpodsTrayApp::Enums::NoiseControlMode::Off
librepods:  Noise control mode received:  AirpodsTrayApp::Enums::NoiseControlMode::Off
librepods:  Setting noise control mode to:  AirpodsTrayApp::Enums::NoiseControlMode::NoiseCancellation
librepods:  Noise control mode received:  AirpodsTrayApp::Enums::NoiseControlMode::NoiseCancellation
librepods:  Setting noise control mode to:  AirpodsTrayApp::Enums::NoiseControlMode::Transparency
librepods:  Noise control mode received:  AirpodsTrayApp::Enums::NoiseControlMode::Transparency
librepods:  Setting noise control mode to:  AirpodsTrayApp::Enums::NoiseControlMode::Adaptive
librepods:  Noise control mode received:  AirpodsTrayApp::Enums::NoiseControlMode::Adaptive
librepods:  Setting noise control mode to:  AirpodsTrayApp::Enums::NoiseControlMode::Transparency
librepods:  Noise control mode received:  AirpodsTrayApp::Enums::NoiseControlMode::Transparency
librepods:  Setting noise control mode to:  AirpodsTrayApp::Enums::NoiseControlMode::NoiseCancellation
librepods:  Noise control mode received:  AirpodsTrayApp::Enums::NoiseControlMode::NoiseCancellation
librepods:  Setting noise control mode to:  AirpodsTrayApp::Enums::NoiseControlMode::Off
librepods:  Noise control mode received:  AirpodsTrayApp::Enums::NoiseControlMode::Off

Can confirm that the modes are operating as expected.

I am not able to confirm the BLE modelId is correct at the moment, but I'm pretty sure I extracted it correctly by forcing the headphones in to BLE mode via bluetoothctl and dumping the bluetooth header with btmon.

@sachin3796
Copy link
Copy Markdown
Author

have now confirmed that the BLE modelId is now correct, and have updated the documentation with the correct value (0x2D20)

@sachin3796 sachin3796 changed the title add basic airpods max 2 support add basic airpods max 2 support (linux only) Apr 11, 2026
@sachin3796
Copy link
Copy Markdown
Author

As a note to add, I've had issues with the default selected codec "SBC-XQ" - if this codec is used, audio from the computer only comes out of the left speaker channel. This is likely a hardware limitation.

I've worked around this by adding the following to my wireplumber configuration:

$ cat .config/wireplumber/wireplumber.conf.d/12-disable-sbc-xq-profile.conf
monitor.bluez.properties = {
    bluez5.enable-sbc-xq = false
}

Both the bluetooth default SBC codec and AAC work correctly.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant