From c4c9056180478873c38f5e7c9b6834ae6dd581e1 Mon Sep 17 00:00:00 2001 From: Tegar Manis Date: Thu, 15 Oct 2026 15:42:14 +0700 Subject: [PATCH] fix(bluetooth): more stable bluetooth audio on tg5040 --- skeleton/SYSTEM/tg5040/etc/bluetooth/bt_init.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) mode change 100755 => 100644 skeleton/SYSTEM/tg5040/etc/bluetooth/bt_init.sh diff --git a/skeleton/SYSTEM/tg5040/etc/bluetooth/bt_init.sh b/skeleton/SYSTEM/tg5040/etc/bluetooth/bt_init.sh old mode 100755 new mode 100644 index 3b3bda444..ae68239f2 --- a/skeleton/SYSTEM/tg5040/etc/bluetooth/bt_init.sh +++ b/skeleton/SYSTEM/tg5040/etc/bluetooth/bt_init.sh @@ -38,6 +38,10 @@ start_hci_attach() { start_bt() { rfkill.elf unblock bluetooth + # Fix for bluetooth stuttering by disabling wifi power management + ip link set wlan0 up 2>/dev/null + iw dev wlan0 set power_save off 2>/dev/null + if [ -d "/sys/class/bluetooth/hci0" ];then echo "Bluetooth init has been completed!!" else @@ -54,7 +58,7 @@ start_bt() { a=`ps | grep bluealsa | grep -v grep` [ -z "$a" ] && { # bluealsa -p a2dp-source --keep-alive=-1 & - bluealsa -p a2dp-source & + bluealsa -p a2dp-source --a2dp-volume & sleep 1 # Power on adapter bluetoothctl power on 2>/dev/null @@ -76,6 +80,10 @@ start_bt() { ble_start() { rfkill.elf unblock bluetooth + # Fix for bluetooth stuttering by disabling wifi power management + ip link set wlan0 up 2>/dev/null + iw dev wlan0 set power_save off 2>/dev/null + if [ -d "/sys/class/bluetooth/hci0" ];then echo "Bluetooth init has been completed!!" else @@ -149,4 +157,4 @@ case "$1" in echo "Usage: $0 {start|stop|restart}" exit 1 ;; -esac \ No newline at end of file +esac