How permanently remove or disable HSP/HFP bluetooth profile

9,768

Solution 1

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.

Solution 2

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

Hope this helps :)

Solution 3

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.

Share:
9,768

Related videos on Youtube

survivor303
Author by

survivor303

Updated on September 18, 2022

Comments

  • survivor303
    survivor303 almost 2 years

    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.

    • Admin
      Admin over 4 years
    • Admin
      Admin over 4 years
      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.
    • Admin
      Admin about 4 years
      having the same annoyance every single day
    • Admin
      Admin about 4 years
      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.
    • Admin
      Admin about 3 years
      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.
  • Artemios Antonio Balbach
    Artemios Antonio Balbach over 2 years
    Can you provide a source for the Parameter? I search the source code, specifically git.kernel.org/pub/scm/bluetooth/bluez.git/tree/src/main.con‌​f this. The option is nowhere to be found. I could also not find any documentation on it.
  • Rumen Rumenov
    Rumen Rumenov over 2 years
    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. :)
  • Artemios Antonio Balbach
    Artemios Antonio Balbach over 2 years
    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.