Can't enable HSP/HFP in bluetooth headphones

I have Bose bluetooth headphones and I can’t get the headset mode to work.
I installed bluez and blueman and I paired and connected the headphones.
See screenshot for more details.

inxi -F
System:
  Host: shmuel-eos Kernel: 5.13.7-arch1-1 x86_64 bits: 64 
  Desktop: KDE Plasma 5.22.4 Distro: EndeavourOS 
Machine:
  Type: Desktop Mobo: ASUSTeK model: PRIME B365M-A v: Rev X.0x 
  serial: <superuser required> UEFI: American Megatrends v: 1203 
  date: 10/10/2019 
CPU:
  Info: 8-Core model: Intel Core i7-9700 bits: 64 type: MCP 
  cache: L2: 12 MiB 
  Speed: 800 MHz min/max: 800/4700 MHz Core speeds (MHz): 1: 800 
  2: 800 3: 800 4: 800 5: 800 6: 800 7: 800 8: 800 
Graphics:
  Device-1: Intel CoffeeLake-S GT2 [UHD Graphics 630] 
  driver: i915 v: kernel 
  Device-2: IMC Networks XHC Camera type: USB driver: uvcvideo 
  Display: x11 server: X.org 1.20.13 driver: loaded: intel 
  unloaded: fbdev,modesetting,vesa 
  resolution: <missing: xdpyinfo> 
  Message: Unable to show advanced data. Required tool glxinfo 
  missing. 
Audio:
  Device-1: Intel 200 Series PCH HD Audio driver: snd_hda_intel 
  Device-2: JMTek LLC. USB PnP Audio Device type: USB 
  driver: hid-generic,snd-usb-audio,usbhid 
  Sound Server-1: ALSA v: k5.13.7-arch1-1 running: yes 
  Sound Server-2: PulseAudio v: 15.0 running: yes 
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8168 
  IF: enp3s0 state: up speed: 1000 Mbps duplex: full 
  mac: a8:5e:45:e2:87:3c 
  Device-2: Realtek 802.11ac NIC type: USB driver: N/A 
Bluetooth:
  Device-1: Cambridge Silicon Radio Bluetooth Dongle (HCI mode) 
  type: USB driver: btusb 
  Report: rfkill ID: hci0 state: up address: see --recommends 
Drives:
  Local Storage: total: 2.26 TiB used: 916.22 GiB (39.7%) 
  ID-1: /dev/sda vendor: Kingston model: SA400S37480G 
  size: 447.13 GiB 
  ID-2: /dev/sdb vendor: Toshiba model: HDWD120 size: 1.82 TiB 
Partition:
  ID-1: / size: 38.51 GiB used: 10.28 GiB (26.7%) fs: ext4 
  dev: /dev/sda6 
  ID-2: /boot/efi size: 96 MiB used: 37 MiB (38.5%) fs: vfat 
  dev: /dev/sda2 
Swap:
  Alert: No swap data was found. 
Sensors:
  System Temperatures: cpu: 29.8 C mobo: 27.8 C 
  Fan Speeds (RPM): N/A 
Info:
  Processes: 248 Uptime: 18m Memory: 15.49 GiB 
  used: 2.19 GiB (14.1%) Shell: Bash inxi: 3.3.05 

2021-08-02_19-02

First of all make sure no other device has paired to them. I think the best way is to use bluetoothctl and go through the steps. Also check if bluetooth is blocked with rfkill. Sometimes it can be a little finacky getting it to pair, register, connect, trust etc… Remove and start from the beginning.

Okay so I removed and started from the beginning, this time the cli way. But the issue is still there. I can’t get it into headset mode, which is what I need for Zoom sessions and Google Meet etc, so I can use earphones and mic.

Check https://wiki.archlinux.org/title/bluetooth_headset, especially the troubleshooting section. Look in the journalctl for the exact error message while connecting the headset and Google them. Linux, bluetooth and headsets is something which may not work as expected. Sometimes it is the headset sometimes the bluetooth part which causes the problems.

I looked in the wiki and tried a suggested command, and then did a little logging. I will paste below.
My headphones behave themselves, more or less, in Ubuntu, MX and Windows. I don’t think I am the only one having this problem on Arch
https://stackoverflow.com/questions/65449742/bluetooth-headset-cannot-set-card-profile-to-hsp-mode

pacmd set-card-profile bluez_card.60_AB_D2_45_5D_47 headset_head_unit
Failed to set card profile to 'headset_head_unit'.
[shmuel@shmuel-eos ~]$ LANG=C pulseaudio --log-time -vv
(   0.000|   0.000) I: [pulseaudio] main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
(   0.000|   0.000) I: [pulseaudio] main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted
(   0.000|   0.000) D: [pulseaudio] core-rtclock.c: Timer slack is set to 50 us.
(   0.003|   0.003) D: [pulseaudio] core-util.c: RealtimeKit worked.
(   0.003|   0.000) I: [pulseaudio] core-util.c: Successfully gained nice level -11.
(   0.003|   0.000) I: [pulseaudio] main.c: This is PulseAudio 15.0
(   0.003|   0.000) D: [pulseaudio] main.c: Compilation CFLAGS: Not yet supported on meson
(   0.003|   0.000) D: [pulseaudio] main.c: Running on host: Linux x86_64 5.13.7-arch1-1 #1 SMP PREEMPT Sat, 31 Jul 2021 13:18:52 +0000
(   0.003|   0.000) D: [pulseaudio] main.c: Found 8 CPUs.
(   0.003|   0.000) I: [pulseaudio] main.c: Page size is 4096 bytes
(   0.003|   0.000) D: [pulseaudio] main.c: Compiled with Valgrind support: yes
(   0.003|   0.000) D: [pulseaudio] main.c: Running in valgrind mode: no
(   0.003|   0.000) D: [pulseaudio] main.c: Running in VM: no
(   0.003|   0.000) D: [pulseaudio] main.c: Running from build tree: no
(   0.003|   0.000) D: [pulseaudio] main.c: Optimized build: yes
(   0.003|   0.000) D: [pulseaudio] main.c: All asserts enabled.
(   0.003|   0.000) I: [pulseaudio] main.c: Machine ID is 08990950f2904d7ebb2c25693f9fbaa4.
(   0.003|   0.000) I: [pulseaudio] main.c: Session ID is 2.
(   0.003|   0.000) I: [pulseaudio] main.c: Using runtime directory /run/user/1000/pulse.
(   0.003|   0.000) I: [pulseaudio] main.c: Using state directory /home/shmuel/.config/pulse.
(   0.003|   0.000) I: [pulseaudio] main.c: Using modules directory /usr/lib/pulse-15.0/modules.
(   0.003|   0.000) I: [pulseaudio] main.c: Running in system mode: no
(   0.003|   0.000) E: [pulseaudio] pid.c: Daemon already running.
(   0.003|   0.000) E: [pulseaudio] main.c: pa_pid_file_create() failed.
journalctl
-- Journal begins at Mon 2021-08-02 16:09:25 IDT, ends>
Aug 02 16:09:25 shmuel-eos kernel: microcode: microcod>
Aug 02 16:09:25 shmuel-eos kernel: Linux version 5.13.>
Aug 02 16:09:25 shmuel-eos kernel: Command line: BOOT_>
Aug 02 16:09:25 shmuel-eos kernel: x86/fpu: Supporting>
Aug 02 16:09:25 shmuel-eos kernel: x86/fpu: Supporting>
Aug 02 16:09:25 shmuel-eos kernel: x86/fpu: Supporting>
Aug 02 16:09:25 shmuel-eos kernel: x86/fpu: Supporting>
Aug 02 16:09:25 shmuel-eos kernel: x86/fpu: Supporting>
Aug 02 16:09:25 shmuel-eos kernel: x86/fpu: xstate_off>
Aug 02 16:09:25 shmuel-eos kernel: x86/fpu: xstate_off>
Aug 02 16:09:25 shmuel-eos kernel: x86/fpu: xstate_off>
Aug 02 16:09:25 shmuel-eos kernel: x86/fpu: Enabled xs>
Aug 02 16:09:25 shmuel-eos kernel: BIOS-provided physi>
Aug 02 16:09:25 shmuel-eos kernel: BIOS-e820: [mem 0x0>
Aug 02 16:09:25 shmuel-eos kernel: BIOS-e820: [mem 0x0>
Aug 02 16:09:25 shmuel-eos kernel: BIOS-e820: [mem 0x0>
lines 1-17

Can you please post the output of journalctl from only the last lines right after connecting the headset. You posted the beginning of the journal.

Where do I find this output?

My idea would be to reboot your PC. After rebooting login and open a terminal. Then connect your headset.
Run following command in the terminal:
journalctl -b -0 -n20 > journal.log (this will take the last 20 lines of the actual journal)
Open the journal.log with any editor and copy the complete content of the file and paste it here.

Not sure if this is the right part of the log… where do I find this journal.log file that the above command creates?

Aug 02 22:12:20 shmuel-eos systemd[1]: Starting Blueto>
Aug 02 22:12:20 shmuel-eos blueman-mechanism[1453]: Un>
Aug 02 22:12:21 shmuel-eos blueman-mechanism[1453]: Un>
Aug 02 22:12:21 shmuel-eos kwin_x11[1091]: qt.qpa.xcb:>
Aug 02 22:12:21 shmuel-eos blueman-mechani[1453]: gtk_>
Aug 02 22:12:21 shmuel-eos dbus-daemon[402]: [system] >
Aug 02 22:12:21 shmuel-eos systemd[1]: Started Bluetoo>
lines 1949-1965/2168 88%
Aug 02 22:12:21 shmuel-eos audit[1]: SERVICE_START pid>
Aug 02 22:12:21 shmuel-eos plasmashell[1160]: trying t>
Aug 02 22:12:21 shmuel-eos plasmashell[1160]: file:///>
Aug 02 22:12:21 shmuel-eos kded5[1087]: Registering ":>
Aug 02 22:12:21 shmuel-eos xembedsniproxy[1147]: Conta>
Aug 02 22:12:21 shmuel-eos plasmashell[1160]: trying t>
Aug 02 22:12:21 shmuel-eos xembedsniproxy[1147]: qt.qp>
Aug 02 22:12:21 shmuel-eos kded5[1087]: Service  ":1.5>
Aug 02 22:12:21 shmuel-eos kded5[1087]: Registering ":>
Aug 02 22:12:21 shmuel-eos xembedsniproxy[1147]: Conta>
Aug 02 22:12:21 shmuel-eos plasmashell[1160]: file:///>
Aug 02 22:12:21 shmuel-eos kwin_x11[1091]: kwin_core: >
Aug 02 22:12:21 shmuel-eos dbus-daemon[1041]: [session>
Aug 02 22:12:21 shmuel-eos systemd[1024]: Started Virt>
Aug 02 22:12:21 shmuel-eos plasmashell[1160]: Cyclic d>
lines 1964-1980/2168 89%

You need to open the terminal full screen so we can see all the info. Also please use code tags before and after what you copy and post from the terminal here. (~~~)

Edit: It is much easier to see and read through.

Forgive my ignorance but when I run
journalctl -b
I get way too much to post and I am just guessing which lines are relevant. The command

journalctl -b -0 -n20 > journal.log 

looks like it is creating a file somewhere. But where?

It creates it in your /home/username

Edit: Use your file manager and the file journal.log should be there. Just open it with a text editor.

This may not help you at all, if any, but please do check out my post that I had last month about my own bluetooth issues here: Bluetooth Doesn't Connect on Fresh Gnome Install

Essentially, I couldn’t get it to work, so I did a clean install, updated the system with pacman -Syu and did only these two commands:

sudo pacman -S --needed bluez bluez-utils pulseaudio-bluetooth
sudo systemctl enable --now bluetooth

And somehow it just started working. I wish I could explain why. All I can say is sometimes certain bluetooth devices are a hit or miss and unfortunately there isn’t a simple, quick fix for every issues, sometimes it’s down on the kernel level, other times it’s with one of the bluetooth packages. I don’t know how you feel about a clean install (that’s like a last resort option), but it may be something to consider as in my case I needed bluetooth to work since that was a deal breaker for me. I wish I could provide more help! But I hope my suggestion may be of value if you get to that point. Good luck for now!

@shmu26
Use Blueman as the GUI. Do you have bluez, pulseaudio-bluetooth, & bluez-utils installed. Make sure bluetooth is enabled and running. Try this and see if it works.

1 Like

Looks like you guys kept working after I went to sleep. I will have to try out your kindly suggestions.

2 Likes

The output of “journalctl -b -0 -n20 > journal.log” is below. I have bluez, pulseaudio-bluetooth, & bluez-utils installed.
I have blueman open, but it can’t switch to headset mode, it does like in the screenshot in the OP.

-- Journal begins at Tue 2021-08-03 03:32:45 IDT, ends at Tue 2021-08-03 06:34:01 IDT. --
Aug 03 06:33:59 shmuel-eos dbus-daemon[4592]: [session uid=1000 pid=4592] Activating via systemd: service name='org.gtk.vfs.MTPVolumeMonitor' unit='gvfs-mtp-volume-monitor.service' requested by ':1.64' (uid=1000 pid=41331 comm="thunar-volman --device-added /sys/devices/virtual/")
Aug 03 06:33:59 shmuel-eos systemd[4514]: Starting Virtual filesystem service - Media Transfer Protocol monitor...
Aug 03 06:33:59 shmuel-eos dbus-daemon[4592]: [session uid=1000 pid=4592] Successfully activated service 'org.gtk.vfs.MTPVolumeMonitor'
Aug 03 06:33:59 shmuel-eos systemd[4514]: Started Virtual filesystem service - Media Transfer Protocol monitor.
Aug 03 06:33:59 shmuel-eos dbus-daemon[4592]: [session uid=1000 pid=4592] Activating via systemd: service name='org.gtk.vfs.GPhoto2VolumeMonitor' unit='gvfs-gphoto2-volume-monitor.service' requested by ':1.64' (uid=1000 pid=41331 comm="thunar-volman --device-added /sys/devices/virtual/")
Aug 03 06:33:59 shmuel-eos systemd[4514]: Starting Virtual filesystem service - digital camera monitor...
Aug 03 06:33:59 shmuel-eos dbus-daemon[4592]: [session uid=1000 pid=4592] Successfully activated service 'org.gtk.vfs.GPhoto2VolumeMonitor'
Aug 03 06:33:59 shmuel-eos systemd[4514]: Started Virtual filesystem service - digital camera monitor.
Aug 03 06:33:59 shmuel-eos obexd[5215]: CONNECT(0x0), <unknown>(0xff)
Aug 03 06:33:59 shmuel-eos obexd[5215]: CONNECT(0x0), <unknown>(0x0)
Aug 03 06:33:59 shmuel-eos obexd[5215]: SETPATH(0x5), <unknown>(0xff)
Aug 03 06:33:59 shmuel-eos obexd[5215]: stat(/home/shmuel/phonebook/): No such file or directory (2)
Aug 03 06:33:59 shmuel-eos obexd[5215]: SETPATH(0x5), Not Found(0x44)
Aug 03 06:34:00 shmuel-eos bluetoothd[1407]: /org/bluez/hci0/dev_60_AB_D2_45_5D_47/fd0: fd(42) ready
Aug 03 06:34:00 shmuel-eos rtkit-daemon[5163]: Supervising 4 threads of 1 processes of 1 users.
Aug 03 06:34:00 shmuel-eos rtkit-daemon[5163]: Successfully made thread 42603 of process 5144 owned by '1000' RT at priority 5.
Aug 03 06:34:00 shmuel-eos rtkit-daemon[5163]: Supervising 5 threads of 1 processes of 1 users.
Aug 03 06:34:01 shmuel-eos plasmashell[5066]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/NotificationPopup.qml:116:15: QML QQuickItem: Binding loop detected for property "height"
Aug 03 06:34:01 shmuel-eos systemd[4514]: Finished EOS update notifier service.
Aug 03 06:34:01 shmuel-eos systemd[4514]: eos-update-notifier.service: Consumed 1.778s CPU time.

1 Like

Is it working now?

Nope, still not working. I edited my previous post, detailing the steps I took.

https://wiki.archlinux.org/title/Bluetooth_headset#HFP_not_working_with_PulseAudio

1 Like

@shmu26
What is the default sample rate in /etc/pulse/daemon.conf

Try changing it to

default-sample-rate = 48000