How to Stop Ubuntu from Automatically Reconnecting to Bluetooth Devices

The Persistent Connection

Ubuntu’s Bluetooth stack (usually managed by BlueZ) is designed for convenience. If you have previously paired a Bluetooth device—such as a wireless headset, a mouse, or a speaker—and that device comes within range and broadcasts its availability, Ubuntu will often automatically attempt to reconnect to it. This is usually helpful. However, if you share a Bluetooth speaker with roommates, or if your wireless headphones are connected to your phone but occasionally get hijacked by your Ubuntu laptop sitting in the other room, this aggressive automatic reconnection behavior is incredibly frustrating and disruptive.

Controlling the BlueZ Daemon

To maintain control over your audio routing and stop Ubuntu from automatically reconnecting to paired Bluetooth devices, you must modify the configuration file for the BlueZ daemon.

Open a terminal window (press Ctrl+Alt+T). You need to edit the main Bluetooth configuration file with root privileges. Type sudo nano /etc/bluetooth/main.conf and press Enter (provide your password when prompted). Use the arrow keys to scroll through the file until you find the [Policy] section. Look for a line that says AutoEnable=true. If you want to stop the Bluetooth adapter from turning on automatically at boot, change this to false. To stop the automatic reconnection to specific devices, look for a line (it might be commented out with a `#`) that says ReconnectAttempts=7 or similar. If you don’t see it, add the line ReconnectAttempts=0 under the [Policy] section. Press Ctrl+O then Enter to save, and Ctrl+X to exit nano. Finally, restart the Bluetooth service by typing sudo systemctl restart bluetooth. Your devices will remain paired, but Ubuntu will wait for you to manually initiate the connection.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.