Skip to content

Instantly share code, notes, and snippets.

@gpchelkin
gpchelkin / bluez_lag_off.sh
Last active February 16, 2024 22:54
PulseAudio: switch Bluez card A2DP Audio Profile off and on and set it as default sink to disable lags.
#!/bin/bash
# Tested on Linux Mint 18.3 / Ubuntu 16.04 with PulseAudio 8.0.
# No need for superuser.
# You can map it to keyboard shortcut and press when bluetooth audio starts lagging.
# Reference:
# https://askubuntu.com/a/171165/373130
# https://askubuntu.com/a/72076/373130
BLUEZCARD=`pactl list cards short | grep bluez | awk '{print $1}'`