Skip to content

Instantly share code, notes, and snippets.

@ElijahLynn
Created June 15, 2026 03:34
Show Gist options
  • Select an option

  • Save ElijahLynn/aeb66f363d4b0045d8c92342b235a1ce to your computer and use it in GitHub Desktop.

Select an option

Save ElijahLynn/aeb66f363d4b0045d8c92342b235a1ce to your computer and use it in GitHub Desktop.
Fix Sony XM6 multi-point switching on Arch Linux (PipeWire)
#!/bin/bash
# Script to "kick" Sony XM6 headphones when multi-point switching gets stuck
CARD="bluez_card.80_99_E7_DE_5F_68"
echo "Attempting to reset Bluetooth audio for Eli Beats..."
# 1. Toggle profile to "off" and back to "a2dp-sink"
# This usually forces the transport to re-handshake without a full disconnect
echo "-> Resetting profile..."
pactl set-card-profile "$CARD" off
sleep 1
pactl set-card-profile "$CARD" a2dp-sink
# 2. Check if it worked
ACTIVE_PROFILE=$(pactl list cards | grep -A 20 "Eli Beats" | grep "Active Profile" | cut -d' ' -f3)
if [ "$ACTIVE_PROFILE" == "a2dp-sink" ]; then
echo "Successfully reset to A2DP (High Quality)."
else
echo "Warning: Profile is $ACTIVE_PROFILE. Trying a full reconnect..."
bluetoothctl disconnect 80:99:E7:DE:5F:68
sleep 2
bluetoothctl connect 80:99:E7:DE:5F:68
fi
echo "Done. Try playing audio now."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment