From c605be0c6029331ac040bc6ccc058f76886788b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oscar=20S=C3=B6derlund?= Date: Tue, 27 Oct 2026 13:44:05 +0100 Subject: [PATCH] feat(pipewire): pin aptX HD, disable BT autoswitch WirePlumber's autoswitch moves a Bluetooth card to HSP/HFP (mono, narrowband) whenever an app opens the headset microphone, and does not reliably switch back, so the Px8 had to be moved back to aptX HD by hand after every call. - Disable bluetooth.autoswitch-to-headset-profile, which also stops publishing a headset microphone node. - Restrict A2DP to aptx_hd so nothing negotiates down to AAC or plain aptX; SBC stays as the mandatory fallback. - Keep msbc in the codec list so the headset profile stays usable when selected by hand. --- mise/conf.d/pipewire.toml | 1 + wireplumber/51-bluez-aptx-hd.conf | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 wireplumber/51-bluez-aptx-hd.conf diff --git a/mise/conf.d/pipewire.toml b/mise/conf.d/pipewire.toml index 732044c5..6e44f6a7 100644 --- a/mise/conf.d/pipewire.toml +++ b/mise/conf.d/pipewire.toml @@ -1,5 +1,6 @@ [dotfiles] "~/.config/pipewire/pipewire.conf.d/50-no-raop.conf" = "../../pipewire/50-no-raop.conf" +"~/.config/wireplumber/wireplumber.conf.d/51-bluez-aptx-hd.conf" = "../../wireplumber/51-bluez-aptx-hd.conf" [bootstrap.packages] "dnf:pipewire-codec-aptx" = "latest" diff --git a/wireplumber/51-bluez-aptx-hd.conf b/wireplumber/51-bluez-aptx-hd.conf new file mode 100644 index 00000000..dad369d2 --- /dev/null +++ b/wireplumber/51-bluez-aptx-hd.conf @@ -0,0 +1,18 @@ +# Keep Bluetooth audio on aptX HD and never fall back to the mono headset profile. +# +# WirePlumber's "autoswitch to headset profile" moves a Bluetooth card to +# HSP/HFP (mono, narrowband) as soon as an application opens the headset +# microphone, and it does not reliably switch back afterwards. Turning it off +# also stops the headset microphone from being published, so a connected +# headset only ever offers its stereo sink. +wireplumber.settings = { + bluetooth.autoswitch-to-headset-profile = false +} + +monitor.bluez.properties = { + # A2DP: aptX HD only, so nothing negotiates down to AAC or plain aptX. + # SBC stays available as the mandatory fallback codec. + # HFP: keep mSBC for the headset profile, in case it is ever selected by hand. + # Applies to every audio device on hci0. + bluez5.codecs = [ aptx_hd msbc ] +}