How to Stop Ubuntu from Automatically Connecting to Bluetooth Devices

The Audio Hijack

Ubuntu’s Bluetooth manager (BlueZ) is designed to make pairing seamless. If you have previously paired a set of Bluetooth headphones, a speaker, or a mouse, Ubuntu will aggressively try to reconnect to them the moment they become available. The problem arises if you share devices. For example, if you paired your phone to your Ubuntu PC once to transfer a file, and now every time you walk into the room, your phone’s audio automatically routes to the PC speakers. Or, you turn on a Bluetooth speaker intending to use it with your phone, but your Ubuntu machine sitting across the room instantly hijacks the connection.

Disabling Auto-Connect for Devices

To maintain manual control over your peripherals and stop Ubuntu from automatically connecting to specific Bluetooth devices, you must explicitly mark them as “untrusted” or configure the Bluetooth manager.

The most straightforward way to stop automatic reconnections without deleting the device entirely is via the terminal, using the bluetoothctl tool. Open your terminal by pressing Ctrl+Alt+T. Type bluetoothctl and press Enter to enter the management console. Type devices to see a list of paired hardware and their MAC addresses (e.g., 00:11:22:33:44:55). Find the device that keeps hijacking your connection. To stop it from automatically pairing, type untrust [MAC Address] (e.g., untrust 00:11:22:33:44:55) and hit Enter. The device remains paired, but Ubuntu will no longer automatically establish a connection when it detects it; you must manually click it in the Bluetooth menu to connect.

Get the best tech tips delivered straight to your inbox.

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