23

Kubuntu 20.04 on Lenovo Thinkpad.

I recently bought an entry level Sony Bluetooth headset (WH-CH500) for the express purpose of audio- and video-conferencing.

It all works flawlessly except for one thing: when the headset connects, it always uses the "A2DP" high quality profile, which is fine to listen to music, but disables the microphone. I can change it to "headset HSP/HFP" in the bluetooth device manager. But next time I reconnect the headset, e.g. after switching it off, rebooting or putting the PC to sleep, I have to change the profile manually again.

Of course, sometimes I will forget to, so will enter a meeting without a microphone. Annoying!

enter image description here

Is there a way to make it remember a default profile to use, so the given headset will always connect using this profile (or, simply use the last profile used) ?

There are many questions and threads here and elsewhere about the opposite problem (force A2DP mode), but I could not find anything to force the "headset" profile.

Pierre Henry
  • 283
  • 2
  • 6
  • 2
    I have the exact same problem after upgrading from Linux Mint 18.3 (Ubuntu 16.04) to Kubuntu 20.04. It's really really annoying. In the old version the last used profile was remembered. If you find a solution please let me know. – Mauro Molinari Oct 08 '20 at 06:54
  • 1
    I think this is the origin of this problem: https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/508522 – Mauro Molinari Oct 08 '20 at 07:08

2 Answers2

10

Sharing what worked for me.I spent many hours googling. Hope this helps someone else. I am using Ubuntu 22.04

This was the link that saved me: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/975

I added the following line:

load-module module-card-restore restore_bluetooth_profile=true

to file /etc/pulse/default.pa

Rebooted.

Now it remembers the Audio profile set on the bluetooth device.

This really should be an out of the box setting....

bain
  • 10,860
  • 2
  • 42
  • 48
Daniel Spindler
  • 101
  • 1
  • 2
  • This worked for me with Zoom. The other answer (`module-bluetooth-policy auto_switch=2`) resulted in either the zoom audio tab hanging, or the audio profile of the headset being set to "Off". – bain Jul 06 '22 at 16:56
  • I had the same issue with Manjaro. I have a pair of Trekz bone conducting earphones and been using them as a headset with linphone. Problem was that every time would I walk out of range or re-connect, the Audio Profile would reset to 'A2DP Sink' in my case. I tried Daniel Spindler's solution and it worked perfectly. Just wanted to describe my situation in case anybody has the same problem with Manjaro. Would have added a comment but don't have the rep yet. – Armando Juarez Jul 22 '22 at 23:38
  • Another option is to put this line into `~/.config/pulse/default.pa`, and another line `.include /etc/pulse/default.pa`. That's what I use on Ubuntu 20.04. – Maxim Egorushkin Oct 02 '22 at 01:30
  • Thank you! this worked for me with 22.04.1 LTS. auto_switch didn't seem to do the trick – asgs Nov 01 '22 at 11:21
  • Didn't work for me on `22.04.3 LTS (Jammy Jellyfish) 6.2.0-26-generic #26~22.04.1-Ubuntu` for Intel ax bluetooth card and JBL infinity on ear headphones. – Nidhin David Aug 08 '23 at 15:34
6

You can consider this as a workaround, as here The profile will be switched to HSP/HFP once you start an activity that requires a microphone but the profile initially is set to a2dp_sink.

Modify /etc/pulse/default.pa

Add the following lines or modify them

### Automatically load driver modules for Bluetooth hardware
.ifexists module-bluetooth-policy.so
load-module module-bluetooth-policy auto_switch=2
.endif

The magic here in auto_switch=2 which will make the pulse audio switch the profile based on requirements.

For more information and options you can refer to this reference wiki : https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/#module-bluetooth-policy

Edit

These are some of the pre-conditions that may affect the method.

Muhammad Yusuf
  • 561
  • 1
  • 5
  • 10
  • 1
    I tried that, unfortunately it doesn't seem to be working. Tried with Kubuntu 20.10 and Zoom. – Pierre Henry Jan 13 '21 at 16:34
  • @PierreHenry, I have tested with kde Neon (based on ubuntu-20.04 only). but the change is applied from the freedesktop site so it should work on all dists that uses pulse audio. give it another try and check other options if they work. – Muhammad Yusuf Jan 23 '21 at 16:41
  • It works fine on Ubuntu 22.04 – rneves Nov 08 '22 at 18:53