When Bluetooth on Linux fails, this command can come to the rescue. Here’s how to set it up

Kelly Cheng Travel Photography/Getty Images

I recently received a pair of speakers to review that promised to be quite good (they are impressive and the review is coming soon). However, fairly soon into the setup, the headphones posed a problem.

Before I continue, let me first explain that I have a complex setup. Being an audiophile, I listen to a lot of vinyl. I also listen to a good amount of music via streaming services. Mostly, I use Spotify to find new artists, and I will then purchase vinyl albums of the music. Also, given how much time I spend in my office and at my desk, the system I use to listen to music isn’t 100% audiophile-grade. That issue is partly due to the makeup of my office and also the presence of cats, who would happily murder floor-standing speakers.

Also: How to vastly improve sound on Linux with EasyEffects

My old speakers had both AUX and line-in inputs, which allowed me to plug my turntable into AUX and my PC into line-in. Those two inputs served me well. However, the new speakers had an RCA line-in and a 3.5mm line-in. Obviously, I couldn’t use both inputs and expect the system to work. Out of curiosity, I tried — and the RCA input was always hijacked by the 3.5mm input, so that was a no-go.

Fortunately, the new speakers included Bluetooth support. It’s, therefore, a good thing my System76 Thelio desktop computer included Bluetooth, which meant everything should have been a simple matter of connecting the speakers via Bluetooth and using that connection as a means to listen to digital audio from the computer.

READ MORE  “It would create an even bigger story” – Chatri Sityodtong says a Takeru victory over Superlek would set stage for epic Rodtang showdown

Also: How to improve the quality of Spotify streaming audio

However, I immediately ran into a problem. When I opened Bluetooth Settings and switched the speakers on, Ubuntu Budgie couldn’t find any devices to connect with. Bluetooth was seemingly broken.

The good news is I’m using Linux — and there’s always a fix at the ready. This time around, the fix came by way of the bluetoothctl command. I’m going to show you how this tool works.

How to install bluez

What you’ll need: To make this feature work, you’ll need a machine that includes a Bluetooth option and a user with sudo privileges (for the installation of bluez, which provides the bluetoothctl command).

The first thing to do is open a terminal window, so you can install Bluez. You should find the terminal window app in your desktop menu.

How you install Bluez will depend on the distribution you use. Here’s a quick list of the commands for various distributions:

Debian/Ubuntu – sudo apt-get install bluez -y
Feodra – sudo dnf install bluez -y
Arch Linux – sudo pacman -S bluez-utils

Using bluetoothctl

Before you can use the bluetoothctl command, you must start and enable it with:

sudo systemctl enable –now bluetoothctl

Next, we’re going to use the bluetoothctl command to scan for nearby devices. That command is:

At this point, you should be able to go back to your distribution’s Bluetooth GUI tool and see that it’s finally discovered all available devices. You can then select the device you want to connect to via the GUI — and everything should just work.

READ MORE  Analogue is shipping its TurboGrafx console and restocking Pockets

Also: Love listening to records? This simple, sound-enhancing gadget is a must-have

This workaround isn’t the ideal solution, but when you find Bluetooth is being a bit problematic, it’s one way I’ve found that rarely fails me.

Leave a Comment