Problems with bluetooth connections on Ubuntu Linux? Try these fixes to resolve the problem.

Although Ubuntu Linux is a stable and robust operating system, sometimes Bluetooth connections with external devices do not work properly.

If you've used bluetooth devices on your computer, you may have noticed that you need to reconnect your bluetooth devices every time the computer wakes up from hibernation or hibernation. And that's just a problem.

This guide will teach you how to troubleshoot common Bluetooth connection problems on Ubuntu Linux so that you don't have to reconnect Bluetooth devices when you want to work on your PC.

Activate the bluetooth service

On Ubuntu Linux, there is a bluetooth service that runs in the background to make sure your bluetooth system is working properly. This is how you can check if the bluetooth service is running.

sudo systemctl status bluetooth.service

The above output shows that the bluetooth service is active. However, if for any reason the bluetooth status is inactive, you need to enable it so that it starts automatically at system startup. You can do the same thing with the following command.

sudo systemctl activate bluetooth.service

After activating the Bluetooth service, start the service again with systemctl.

sudo systemctl start bluetooth.service

Configure Bluetooth on Ubuntu

On Ubuntu Linux, the /etc/bluetooth/main.conf File saves most Bluetooth configurations. Some parameters have to be configured in the file. You can open the configuration file with your favorite text editor. In this guide we will use vim.

sudo vim /etc/bluetooth/main.conf

Activate Bluetooth automatically

Make sure the AutoEnable The configuration at the bottom of the configuration file is set to true and not commented out. All lines that begin with lb Character (#) Are comments. To comment a line, you have to delete it # from the beginning.

The AutoEnable configuration ensures that the Bluetooth module is activated every time your device is restarted. In addition, your Bluetooth adapter can recognize newly connected Bluetooth devices in your area.

Enable the connection attempt

You can configure the Bluetooth stack to attempt to reconnect if a Bluetooth device and your computer lose connection. Simply comment out the line ReconnectAttempts = 7 in the configuration file.

Instead of trying to reconnect devices manually, your Bluetooth service will now attempt to reconnect any Bluetooth devices that have lost their connection.

Activate the quick connection

Another configuration that you should enable is FastConnectable. By setting this value to true They ensure that Bluetooth devices can connect to your PC much faster in the event of a restart or hibernation.

The FastConnectable function only works if you have Kernel 4.1 or newer. The main disadvantage of the quick connect feature is that your PC uses more power.

If you are using vim, press the button Esc Key after making all changes. Then save the changes and exit the file by typing : wq.

Reinstall the bluetooth stack

As a last resort, you can reinstall Bluez, the official and standard Bluetooth software protocol on Ubuntu Linux and most Linux distributions. This guide is used SUITABLE to install the software.

sudo apt install bluez

After reinstalling the bluetooth stack, make sure to enable and start the bluetooth service using the commands below.

sudo systemctl activate bluetooth.service
sudo systemctl start bluetooth.service

Related: How to Use APT and Say Goodbye to APT-GET in Ubuntu

Adding bluetooth to your Linux PC

If your Linux computer is having connectivity issues, you may need to make some changes to the bluetooth service. More and more people are using Bluetooth devices such as keyboards, mice and headphones on their PC.

If you have a computer that doesn't have bluetooth built in, there are a few workarounds you can implement to connect bluetooth devices to your system.

How to add bluetooth to any computer

Bluetooth not working or using older hardware? How to add bluetooth to any computer and connect any compatible device.

Continue reading

About the author

Mwiza Kumwenda
(15 articles published)

Mwiza is a professional developer of software and writes extensively on Linux and front-end programming. Some of his interests include history, economics, politics, and enterprise architecture.

More
By Mwiza Kumwenda

Subscribe to our newsletter

Sign up for our newsletter to receive tech tips, reviews, free e-books, and exclusive offers!

One more step …!

Please confirm your email address in the email we just sent you.