How to Stop Ubuntu from Automatically Connecting to Bluetooth Devices

The Bluetooth Hijack

Ubuntu Linux generally handles Bluetooth peripherals efficiently. However, the default behavior of the Bluetooth daemon (`bluetoothd`) is to aggressively attempt to reconnect to any known, paired device as soon as it detects it in range. This is incredibly frustrating if you share a Bluetooth speaker with roommates or use a Bluetooth headset with both your Ubuntu laptop and your smartphone. If you turn on your headset to answer a phone call, your Ubuntu laptop sitting in the corner might instantly intercept the connection, routing the phone call audio into the void of your closed laptop and leaving you scrambling in silence.

Disabling Aggressive Autoconnect

To retain manual control over your peripherals and stop Ubuntu from automatically connecting to your paired Bluetooth devices the moment they turn on, you must edit the core Bluetooth configuration file.

Open a terminal (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). Use the arrow keys to scroll down through the file. You are looking for a section titled [Policy]. Underneath this heading, look for a line that begins with AutoEnable. By default, this is likely set to `true`. Change the line so it reads exactly: AutoEnable=false. Save the file by pressing Ctrl+O, Enter, and then Ctrl+X to exit the nano editor. Finally, to apply the new policy without rebooting your computer, restart the Bluetooth service by typing sudo systemctl restart bluetooth in the terminal. Your devices will remain paired, but you must now explicitly click on them in the Bluetooth menu to establish a connection.

Get the best tech tips delivered straight to your inbox.

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