19

I really don't like that, like Skype changes my bluetooth profile automatically to very low quality HSP profile and then just muted the high quality A2DP profile.

So i want to know, is it possible just to remove or disable HSP/HFP profile (pulse audio, bluez) and if it, how?

Internet is full for tutorials how to get HSP/HFP enable, but for my case, that is the problem.

PS: I don't use bluetooth mic, so it is irrelevant to get that working on A2DP, i know that this is a hard thing to get working, so no need extra work on that one.

  • 1
  • 2
    Hi @VarunChhangani and thank you for your question, but no. Or perhaps yes, it give me a answer for that i cannot use a2dp with mic at all :) but yeah, i still need answer for how to disable HSP/HFP and only allow voip output to a2dp profile. – survivor303 Feb 21 '20 at 17:07
  • having the same annoyance every single day – Marc Wittke Jun 10 '20 at 10:59
  • 1
    did you find a solution? there must be a software solution for this. I just don't want to see hear or know anything about the stupid HFP profile anymore, is there a way to manually delete the dll files? This is absurd. It's like gmail forcing you to send only faxes and you need to manually re-enable the option to send mails. – refaelio Jun 22 '20 at 10:03
  • 1
    None of the provided solutions worked for me.

    I am using Mint 20.1 based on Ubuntu 20 and it just keeps switching to HSP / HFP every 10 minutes. Any other ideas?

    Also it is a mystery for me, why bluetooth on Laptop / PC can not work with high quality audio + mic while it perfectly does with my Samsung galaxy A41.

    – fires3as0n Apr 17 '21 at 16:18

4 Answers4

20

Check out this answer: https://askubuntu.com/a/1119934/1025239

Copying the most important part, that just disables this "feature" the way like pulseaudio developers intended.

Open (sudo) /etc/pulse/default.pa and add auto_switch=false like this:

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

Restart pulseaudio by just killing the running instance: pulseaudio -k. After this you can restart it by using pulseaudio -D. Done. You still can switch to the HFP profile, but there is no automatic switching any more.

Nallath
  • 103
8

I've been researching this for quite some time now. It turns out the idea is that most bluetooth mics don't support A2DP, so Pulse Audio is configured to switch from A2DP to HSP whenever an app that would use the microphone (such as Skype) is connected. In the end, what worked for me is the tutorial from this link: https://sandalov.org/blog/2146/

  1. Modify /etc/bluetooth/audio.conf, adding the following:
[General]
Disable=Headset
  1. Kill pulseaudio (it autorestarts) and restart the bluetooth service:
pulseaudio -k
sudo systemctl restart bluetooth

This will disconnect the audio device you are connected to via bluetooth, you'll have to reconnect to it.

Hope this helps :)

  • 1
    Can you provide a source for the Parameter? I search the source code, specifically https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/src/main.conf this. The option is nowhere to be found. I could also not find any documentation on it. – Artemios Antonio Balbach Dec 23 '21 at 14:58
  • I'm not sure which parameter you mean, but the source of the fix is the link in the post. New and better answers seem to have been added since anyway. :) – Rumen Rumenov Jan 07 '22 at 09:13
  • 2
    I'm talking about Disable=Headset option in main.conf. I've searched its source code and I don't think that option is even implemented. – Artemios Antonio Balbach Jan 13 '22 at 16:39
1

For me the following was the solution:

# /etc/pulseaudio/default.pa
ifexists module-bluetooth-policy.so
  load-module module-bluetooth-policy auto_switch=false  <-- add auto switch
.endif

.ifexists module-bluetooth-discover.so load-module module-bluetooth-discover load-module module-switch-on-connect <-- add this .endif

/etc/bluetooth/main.conf

[General] Disable=Headset <-- add this

This will disable autoswitch to hsp from pulseaudio and explicitly tell bluez to disable hsp. in addition pulseaudio will switch to the bluetooth device upon connection.

Atleast this is my understanding of the above.

netbrain
  • 43
  • 7
0

To disable a specific device only (Ubuntu 20.04 & 22.04), find the UUID for the device's services. You can do this in Blueman:

blueman uuid

It can also be obtained by running bluetoothctl info and other methods as well.

Next, edit the following to remove the UUID from "Services" under "General".

# For Ubuntu 20.04
sudo vim /var/lib/bluetooth/{{deviceid}}/info

For Ubuntu 22.04

sudo vim /var/lib/bluetooth/{{controller}}/{{deviceid}}/info

Then restart bluetooth

sudo systemctl restart bluetooth.service
NotTheDr01ds
  • 17,888
olabri
  • 1