Bluetooth di Arch Linux (Pairing TWS)
Panduan setup Bluetooth stack di Arch Linux dari nol sampai TWS (True Wireless Stereo earbuds) tersambung sebagai audio output. Arch tidak menyertakan Bluetooth stack secara default (filosofi minimalis), jadi semua komponen harus di-install manual.
Arsitektur
+-------------------+
| Aplikasi (audio) |
+---------+---------+
|
+---------v---------+ +------------------+
| PipeWire / Pulse |<--->| bluetoothd |
| (audio server + | | (daemon BlueZ) |
| modul BT/libspa) | +--------+---------+
+-------------------+ |
+--------v---------+
| Kernel (btusb, |
| HCI, rfkill) |
+--------+---------+
|
+--------v---------+
| Adapter BT (HW) |
+------------------+
- BlueZ = Bluetooth stack resmi Linux (daemon
bluetoothd+ library). - Audio server (PipeWire/PulseAudio) yang mengekspos TWS sebagai sink. Pairing sukses tapi tidak ada suara = biasanya masalah di layer ini, bukan di BlueZ.
Instalasi
sudo pacman -S bluez bluez-utils
bluez— daemon dan stack utama.bluez-utils— tool CLI, terutamabluetoothctl.
Modul audio:
- PipeWire (modern, default): sudah termasuk via
libspa. Pastikanpipewire-pulseter-install dan jalan sebagai user service. - PulseAudio klasik: install
pulseaudio-bluetooth.
Cek:
pacman -Q pipewire-pulse systemctl --user status pipewire pipewire-pulse wireplumber
Aktivasi Service
sudo systemctl enable --now bluetooth.service
enable --now = auto-start saat boot + langsung aktif sekarang.
Verifikasi adapter terdeteksi:
bluetoothctl list
Kalau kosong:
rfkill list # cek soft/hard block rfkill unblock bluetooth # buka soft block
Hard block = switch fisik/BIOS, tidak bisa di-unblock via software.
Pairing TWS
Masuk shell interaktif:
bluetoothctl
Di dalam bluetoothctl:
power on agent on default-agent scan on
Masukkan TWS ke pairing mode (biasanya tahan tombol di case sampai LED berkedip). Tunggu device muncul:
[NEW] Device 12:34:56:78:9A:BC Soundcore R50i
Lalu (MAC bisa tab-completion):
pair 12:34:56:78:9A:BC trust 12:34:56:78:9A:BC connect 12:34:56:78:9A:BC scan off exit
Kenapa trust? Tanpa trust, daemon menolak koneksi ulang yang diinisiasi device — TWS tidak akan auto-reconnect saat case dibuka.
Verifikasi Audio
pactl list sinks short
Harus muncul sink baru, contoh: bluez_output.12_34_56_78_9A_BC.1.
Set default:
pactl set-default-sink bluez_output.12_34_56_78_9A_BC.1
Auto-Reconnect Setelah Boot
Edit /etc/bluetooth/main.conf:
[Policy] AutoEnable=true
Ini membuat controller otomatis power on saat boot. Kombinasi AutoEnable + trust = buka case TWS langsung nyambung.
Troubleshooting
| Gejala | Penyebab | Solusi |
|---|---|---|
br-connection-profile-unavailable saat connect |
Modul audio tidak tersedia (audio server belum jalan / modul BT belum ter-install) | Cek systemctl --user status pipewire pipewire-pulse wireplumber; install pulseaudio-bluetooth kalau pakai PulseAudio
|
Adapter tidak muncul di bluetoothctl list |
Soft block rfkill, atau driver/firmware belum load | grep -i bluetooth untuk firmware yang hilang (linux-firmware)
|
| Suara jelek / robotik / mono | Profil ke-switch ke HSP/HFP (mode headset dengan mic, kualitas rendah) | pactl set-card-profile bluez_card.XX_XX_... a2dp-sink
|
| Pairing sukses tapi tidak ada sink audio | Layer audio server bermasalah, bukan BlueZ | Restart user service: systemctl --user restart pipewire pipewire-pulse
|
| Tidak auto-reconnect setelah reboot | Belum trust, atau controller mati saat boot |
trust MAC + AutoEnable=true di main.conf
|
| Device tidak muncul saat scan | TWS tidak dalam pairing mode, atau sudah paired ke device lain | Reset pairing mode TWS; kalau perlu remove MAC dulu lalu pair ulang
|
Catatan
- Profil A2DP = stereo kualitas tinggi (playback only). Profil HSP/HFP = mono + mic. Audio server otomatis switch ke HSP/HFP saat aplikasi memakai mic — ini normal, bukan bug.
- Codec (SBC, AAC, aptX, LDAC) dinegosiasikan otomatis oleh PipeWire; dukungan codec premium tergantung TWS dan versi PipeWire.