Arch Linux

How to Configure Bluetooth in Arch Linux

Bluetooth is an extensively-used protocol for wireless audio connection with servers. You can find nearly every single person using Bluetooth on their mobile devices and systems. Using a Bluetooth device in a Linux distribution can be a bit complex for the first time. If you are an Arch Linux user, then you may become confused when configuring Bluetooth on your server.
The Arch Linux Bluetooth setup is tricky, compared to other Linux distributions. That is why beginner programmers face issues with Bluetooth configuration. Everyone is inclined towards using headphones and Bluetooth these days, so it is important to know the configuration process, even if you are a beginner on Arch Linux.
The steps in this guide can assist you in successfully setting up Bluetooth on your Arch Linux system. Once you have followed all the directions provided in this guide, you can enjoy all the benefits of Bluetooth on your Arch Linux desktop.

Connecting Process

You can develop a connection between your Bluetooth device and your server with just a few steps. To connect Bluetooth devices to your Arch Linux system, you must perform the following three processes:

  • Step 1: Install utilities
  • Step 2: Enable Bluetooth service
  • Step 3: Pair with Arch Linux

You can further proceed with configuring the settings of your Bluetooth device on your system if there is not any pop-up error due to the compatibility of your server protocol.

Prerequisites

The only requirement for configuring Bluetooth on your system is the availability of a sudo user to log in as a root user. You will have to make sure that there is availability of a Bluetooth adapter on your system. The affirmation of the Pacman package will ease the installation of utilities.

Install Utilities

First, you will need to install the utilities for your Bluetooth device. Programmers usually opt for blueman, bluez, and bluez utils. Input the following commands to get these utilities on your Arch Linux system:

$ sudo pacman -S bluez

$ sudo pacman -S bluez-utils

$ sudo pacman -S blueman


Now, to establish the loading of the btusb module, issue the following command in your terminal:

$ lsmod | grep btusb


The last step of this process is to find the adaptor. Input the following command to find an adapter in your system:

$ sudo nano /etc/bluetooth/main.conf


The following command will tell you if the adapter is connected or is blocked.

$ sudo rfkill list


In the case that your adapter is blocking the connectivity, input the following command to unblock the connection.

$ sudo rfkill unblock bluetooth

Enable Bluetooth

Enabling the Bluetooth service only requires two commands. One command will enable Bluetooth, and the other will provide an auto enabling system on your Arch Linux system. Input the following commands to enable Bluetooth connectivity on your system.

$ sudo systemctl start bluetooth.service
$ sudo systemctl enable bluetooth.service


After running these commands, your Bluetooth system will start in Arch Linux. These commands access both the startup and enabling functions.

Pair Bluetooth Device

In this last step, you will pair the Bluetooth device and connect to the audio. Pairing does not require you to enter any complex commands. But, you will be required to input certain commands into the terminal system of Arch Linux for audio connection and error confrontation.
For pairing, go to the device in the window that is currently open after the enabling function. Select your device and press Enter. You will see the pairing screen; pair the device, and click next. The congratulation screen will inform you about the successful pairing of your device with the server.
It is now time to connect the audio of your server with the paired device. Connecting the audio allows your device to establish a connection with all the audio features on your Arch Linux server. You can listen to music, audio, video, and other items with sound. Input the following commands to connect the audio of your server with the paired device:

$ sudo pacman -S pulseaudio

$ sudo pacman -S pulseaudio-bluetooth


The above commands will install the PulseAudio extension for your Bluetooth. To start the function, run the following command.

$ sudo systemctl start pulseaudio


Run the second command to autostart the function of PulseAudio.
To obtain the utility for ease of access to the back-and-forth function, input the following command. This will help you to move songs or music and control the volume without using any keys. This utility is an excellent feature and will come in handy when using the Bluetooth feature.

$ sudo pacman -S pavucontrol

$ pavucontrol


If your system adapts the advanced audio distribution profile, then you may confront some connection errors due to protocol. If you are a GDM user, then run the following commands:

$ cd ~/src
$ git clone https://aur.archlinux.org/pulseaudio-bluetooth-a2dp-gdm-fix.git
$ makepkg -i


That is all! You can now use your Bluetooth device remotely connected with your Arch Linux server.

Conclusion

No doubt, setting up the Bluetooth device on your Arch Linux system encompasses coding, unlike other servers. But, it is still accessible to compare this to the configuration of other applications on Linux. Those using Arch Linux as their main operating server will find it convenient to configure Bluetooth in Arch Linux. Just follow the three main steps listed in this article, and you can enjoy Bluetooth devices with your Linux Desktop. You can skip configuring the settings for a device after an audio configuration if your device is adaptable to the Arch Linux server settings. You can also ignore the process of checking blockage in the adapter connection if everything is going smoothly. This guide was designed to help out beginners using Arch Linux to set up their Bluetooth configuration with their server.

About the author

Younis Said

I am a freelancing software project developer, a software engineering graduate and a content writer. I love working with Linux and open-source software.