From 92f93cb0e547cfb1a3f0640d663f2fed8994ed9d Mon Sep 17 00:00:00 2001 From: Michael Placzek Date: Mon, 11 May 2026 03:21:16 -0500 Subject: [PATCH] Persist Bluetooth power state across reboots (#5683) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Persist Bluetooth power state across reboots BlueZ defaults to AutoEnable=true, which forces controllers on at boot regardless of the last user-set state. Setting AutoEnable=false makes bluetoothd respect the persisted Powered state, so toggling off in bluetui (or any DBus client) survives a reboot. Adds the change to the install path and a migration for existing setups. * Set reboot-required in Bluetooth persistence migration Per review feedback, the AutoEnable=false change only takes effect on bluetoothd startup. Without setting reboot-required, omarchy-update-restart won't prompt the user to reboot, so the fix would only kick in at their next organic reboot — by which time the bug may appear unfixed. Matches the convention in migrations/1776346552.sh and similar. * No need to ask for a reboot when this is available on the next one --------- Co-authored-by: David Heinemeier Hansson --- install/config/hardware/bluetooth.sh | 3 +++ migrations/1778291336.sh | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 migrations/1778291336.sh diff --git a/install/config/hardware/bluetooth.sh b/install/config/hardware/bluetooth.sh index d0c0389f..2187b1d7 100644 --- a/install/config/hardware/bluetooth.sh +++ b/install/config/hardware/bluetooth.sh @@ -1,5 +1,8 @@ # Turn on bluetooth by default chrootable_systemctl_enable bluetooth.service +# Persist last power state across reboots (default AutoEnable=true overrides it) +sudo sed -i 's/^#\?AutoEnable=.*/AutoEnable=false/' /etc/bluetooth/main.conf + mkdir -p ~/.config/wireplumber/wireplumber.conf.d/ cp "$OMARCHY_PATH/default/wireplumber/wireplumber.conf.d/bluetooth-a2dp-autoconnect.conf" ~/.config/wireplumber/wireplumber.conf.d/ diff --git a/migrations/1778291336.sh b/migrations/1778291336.sh new file mode 100644 index 00000000..7edb633c --- /dev/null +++ b/migrations/1778291336.sh @@ -0,0 +1,3 @@ +echo "Persist Bluetooth power state across reboots" + +sudo sed -i 's/^#\?AutoEnable=.*/AutoEnable=false/' /etc/bluetooth/main.conf