How to enable Bluetooth headset microphone support in Ubuntu 20.04

This post explains how you can enable bluetooth headset microphone support by installing pipewire in Ubuntu 20.04

Ok, I recently purchased a new BOLTT BH1300 bluetooth headset, which has inbuilt microphone support. The main purpose of the headset was to enable Meetings without having to worry about wires. My Headset instantly connected to the laptop’s bluetooth and to my surprise, the mic was not working. Upon checking the System settings, I found that it was still using the laptop’s internal microphone which was already broken and was not usable. See the screenshot below:

Upon googling and fiddling with my configuration for a few hours, I found that this was a very common problem on the Ubuntu Linux and the pulseaudio  was to blame. So, typically what happens is that for microphone to work, you require HSP (Handset Profile) /HFP(Hands-Free Profile) support in your OS and that is provided by default sound driver pulseaudio in case of Ubuntu linux and pulseaudio does not support HSP out of the box.

It took me some hours to finally make it work using pipewire which is an open source software that aims to greatly improve handling of audio and video under Linux. There were other options too like using oFono library but it was useless to me and too much of configuration. oFono is a mobile telephony software and it was never meant for this particular problem anyway. If you guys are also suffering from the same problem then please follow the rest of the article.

Enable Bluetooth headset microphone

Before installing pipewire, please make sure that your issue is the same as mine.

First, type this command in Terminal

$] bluetoothctl

It should show something like this:

[BOLTT BH1300]#

Where BOLTT BH1300 is my device name. type info and you will see info about your headset:

Device 07:F8:87:8F:B9:ED (public)
	Name: BOLTT BH1300
	Alias: BOLTT BH1300
	Class: 0x00340404
	Icon: audio-card
	Paired: yes
	Trusted: yes
	Blocked: no
	Connected: yes
	LegacyPairing: no
	UUID: Serial Port               (00001101-0000-1000-8000-00805f9b34fb)
	UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)
	UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
	UUID: Advanced Audio Distribu.. (0000110d-0000-1000-8000-00805f9b34fb)
	UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
	UUID: Handsfree                 (0000111e-0000-1000-8000-00805f9b34fb)
	UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
	Modalias: bluetooth:v05D6p000Ad0240

Notice Audio Sink which is necessary to make sure the headset’s microphone is detected. Type quit to exit from bluetoothctl.

Now run pacmd list-cards to show all connected devices.

It should show all the devices. Locate your bluetooth headset and look for the profiles key like below. headset_head_unit available no means that HSP/HFP is not enabled.

    a2dp_sink: High Fidelity Playback (A2DP Sink) (priority 40, available: unknown)
    headset_head_unit: Headset Head Unit (HSP/HFP) (priority 30, available: no)
    off: Off (priority 0, available: yes)
active profile: <a2dp_sink>

As pulseaudio does not support HSP/HFP by default, we can override it with the pipewire library.

Installing Pipewire in ubuntu 20.04

To Install pipewire, you need to add a pipewire repository. Type the following command in Terminal:

sudo add-apt-repository ppa:pipewire-debian/pipewire-upstream
sudo apt update
sudo apt install pipewire
sudo apt install libspa-0.2-bluetooth
sudo apt install pipewire-audio-client-libraries

Once updated, you will need to reload bluetooth services and mask pulseaudio.

systemctl --user daemon-reload
systemctl --user --now disable pulseaudio.service pulseaudio.socket
systemctl --user mask pulseaudio
systemctl --user --now enable pipewire-media-session.service

If you run into some issues in the last command, which I did too. The best way is to restart pipewire or reboot your system.

systemctl --user restart pipewire
sudo reboot
# make sure eveything is working
pactl info

I don’t know why but for me, it never worked straight and I always had to choose the Headset in Microphone settings manually as shown below.

Please keep in mind that choosing HSP/HFP profile makes your bluetooth in mono mode and you lose stereo sound. I would recommend you to use it only in case of meetings.

You can now enjoy your bluetooth headsets fully in your Ubuntu Linux. Have a great day. Thanks.

19 thoughts on “How to enable Bluetooth headset microphone support in Ubuntu 20.04”

  1. I rejoiced the whole evening when I received a working microphone in bluetooth headphones on the laptop without support of built-in mic (Lenovo Yoga c930)! But on the next day I cannot connect my headphones to my laptop. The Bluetooth manager sees them, but disconnects on connection. I tried to reinstall all the stuff, including a fresh install of Ubuntu, but I still can’t get it to work.

      1. Unfortunately I am started receiving nasty artifacts on display as on old TV with installed pipewire. To top it all off, my headphones began to turn off again. I reverted to pulseaudio without mic

  2. Working fine on Ubuntu 20.04, thanks!
    Have manually switch profiles between HSP and A2DP for calls through browser, but it works

  3. Thanks for sharing the solution. I can only choose “HSP/HFP, codec CVSD” so that both bluetooth microphone and speaker works. Otherwise, only microphone worked. It’s not a big issue to me. Just a tweak you probably need to do if not both work. BTW, I use my airpod.

  4. Hi, I tried following your steps. All seems to work fine, until I reboot the system. All the system becames slow, I don’t know why. I undo the previous steps to enable again pulseaudio, and the system worked fine again. So I don’t know why I can’t use pipewire I’m using Ubuntu 20.04

  5. Thanks, that worked!
    The only thing it was necessary for me to replace:
    systemctl –user start pulseaudio.socket

    Now I can use Samsung U-flex with a microphone =)

  6. Hello, thank you for this – great article. I’ve got just one issue (but a major one!) – on HSP/HFP profiles there is loopback (voice from headphone’s mic is played, loopbacked, on the headphones).

    I have tried popular solutions, e.g. looking into alsamixer but there is nothing wrong there.

    Any ideas?

    1. Hi Jakub,

      Unfortunately I can’t replicate the issue If you find some solution, please feel free to post here for others too.

      Glad you liked the post. Thanks

  7. Working good but when i switched to from speaker to bluetooth device, videos are crashing in chrome and other browsers. I need to restart browser to make them work.

    Also, i’m facing connection issue. I need to remove the bluetooth device and pair again to make it work,

Leave a Reply

Exit mobile version