########################################################################################## MISC-49: Seinnheiser HD 450BT Bluetooth audio issues on Linux ########################################################################################## Issue Type: Bug ----------------------------------------------------------------------------------------- Issue Information ==================== Priority: Major Status: Open Resolution: Unresolved Project: Miscellaneous (MISC) Reported By: btasker Assigned To: btasker Time Estimate: 0 minutes Time Logged: 0 minutes ----------------------------------------------------------------------------------------- Issue Description ================== I have an issue with my HD 405BT (https://assets.sennheiser.com/global-downloads/file/14814/HD_450BT_Manual_EN.pdf) headpones I've found that when I'm using the headset as an A2DP sink to listen to music, it periodically drops to HSP/HFP. pavucontrol shows A2DP as Unavailable and I have to disconnect and reconnect the headset to get it back for a bit. HSP/HFP audio quality is dire - not entirely unexpected as, by design, it's lower quality than A2DP (which is only 1 way - no mic). It is possible to have better quality HSP/HFP audio (although not to A2DP levels), but it seems that PulseAudio is quite stubbornly behind the curve though - https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/776 I've ordered a USB bluetooth soundcard to avoid having to use pavucontrol to switch the headset profile when I went to go on a call, but in the meantime want to try and get to the bottom of this (if I can fix it, I might just set up an software toggle, or try and get PA's auto-toggle working). dmesg doesn't show much -- BEGIN SNIPPET -- [Tue Aug 3 09:29:52 2021] input: HD 450BT (AVRCP) as /devices/virtual/input/input94 [Tue Aug 3 09:29:53 2021] Bluetooth: hci0: SCO packet for unknown connection handle 0 [Tue Aug 3 09:29:53 2021] Bluetooth: hci0: SCO packet for unknown connection handle 0 [Tue Aug 3 09:29:53 2021] Bluetooth: hci0: SCO packet for unknown connection handle 0 [Tue Aug 3 09:29:53 2021] Bluetooth: hci0: SCO packet for unknown connection handle 0 [Tue Aug 3 09:29:53 2021] Bluetooth: hci0: SCO packet for unknown connection handle 0 [Tue Aug 3 09:30:43 2021] Bluetooth: hci0: SCO packet for unknown connection handle 257 [Tue Aug 3 09:31:48 2021] input: HD 450BT (AVRCP) as /devices/virtual/input/input95 -- END SNIPPET -- As well as the audio quality issues, I had other issues whilst on a Zoom call yesterday. At first, my headset wasn't available for use (headset was showing as connected in Bluezman). So, I gave up and plugged in a wired headset. Midway through the call, it suddenly switched an my HD450BT came into use. A little while later, the headset dropped into A2DP so the mic input moved to my wired headset, leaving me in the ridiculous position of holding a headset up to my face to use the mic. I would _guess_ that's related though - the result of it disconnecting/reconnecting, with PA then trying to adjust config as a result. --------------------------------------------------------------------- *Installed versions* OS: -- BEGIN SNIPPET -- root@bumblebee:~# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 21.04 Release: 21.04 Codename: hirsute -- END SNIPPET -- Software: -- BEGIN SNIPPET -- root@bumblebee:/home/ben# dpkg --list | egrep -e 'Pulse|blue' ii bluedevil 4:5.21.4-0ubuntu1 amd64 KDE Bluetooth stack ii bluez 5.56-0ubuntu4.1 amd64 Bluetooth tools and daemons ii bluez-cups 5.56-0ubuntu4.1 amd64 Bluetooth printer driver for CUPS ii bluez-obexd 5.56-0ubuntu4.1 amd64 bluez obex daemon ii gstreamer1.0-pulseaudio:amd64 1.18.4-1ubuntu1 amd64 GStreamer plugin for PulseAudio (transitional package) ii libbluetooth3:amd64 5.56-0ubuntu4.1 amd64 Library to use the BlueZ Linux Bluetooth stack ii libcanberra-pulse:amd64 0.30-7ubuntu2 amd64 PulseAudio backend for libcanberra ii libkf5bluezqt-data 5.80.0-0ubuntu1 all data files for bluez-qt ii libkf5bluezqt6:amd64 5.80.0-0ubuntu1 amd64 Qt wrapper for bluez ii libkf5pulseaudioqt2:amd64 1.2-2build1 amd64 Pulseaudio bindings library for Qt ii libopenconnect5:amd64 8.10-2build1 amd64 open client for Cisco AnyConnect, Pulse, GlobalProtect VPN - shared library ii libpulse-mainloop-glib0:amd64 1:14.2-1ubuntu1 amd64 PulseAudio client libraries (glib support) ii libpulse0:amd64 1:14.2-1ubuntu1 amd64 PulseAudio client libraries ii libpulsedsp:amd64 1:14.2-1ubuntu1 amd64 PulseAudio OSS pre-load library ii pulseaudio 1:14.2-1ubuntu1 amd64 PulseAudio sound server ii pulseaudio-module-bluetooth 1:14.2-1ubuntu1 amd64 Bluetooth module for PulseAudio sound server ii pulseaudio-module-gsettings 1:14.2-1ubuntu1 amd64 GSettings module for PulseAudio sound server ii pulseaudio-utils 1:14.2-1ubuntu1 amd64 Command line tools for the PulseAudio sound server ii qml-module-org-kde-bluezqt:amd64 5.80.0-0ubuntu1 amd64 QML wrapper for bluez -- END SNIPPET -- *Hardware* lshw doesn't show much: -- BEGIN SNIPPET -- description: Bluetooth wireless interface vendor: Intel Corp. physical id: a bus info: usb@3:a version: 0.02 capabilities: bluetooth usb-2.01 configuration: driver=btusb maxpower=100mA speed=12Mbit/s -- END SNIPPET -- lspci shows a little more though -- BEGIN SNIPPET -- 00:14.3 Network controller [0280]: Intel Corporation Wi-Fi 6 AX201 [8086:a0f0] (rev 20) Subsystem: Intel Corporation Wi-Fi 6 AX201 [8086:0070] Kernel driver in use: iwlwifi Kernel modules: iwlwifi -- END SNIPPET -- The AX201 is integrated Wi-Fi and Bluetooth (https://ark.intel.com/content/www/us/en/ark/products/130293/intel-wi-fi-6-ax201-gig.html) ----------------------------------------------------------------------------------------- Attachments ============ - Screenshot_20210803_094535.png ----------------------------------------------------------------------------------------- Activity ========== ----------------------------------------------------------------------------------------- 2021-08-03 09:45:42 btasker ----------------------------------------------------------------------------------------- I've said this before, so I'll start by saying it again: Fuck PulseAudio. Sideways. Apparently, it's taken issue with that - as I finished that sentence my headset has again dropped A2DP -- BEGIN SNIPPET -- [Tue Aug 3 09:43:26 2021] input: HD 450BT (AVRCP) as /devices/virtual/input/input96 [Tue Aug 3 09:43:27 2021] Bluetooth: hci0: SCO packet for unknown connection handle 0 [Tue Aug 3 09:43:27 2021] Bluetooth: hci0: SCO packet for unknown connection handle 0 [Tue Aug 3 09:43:27 2021] Bluetooth: hci0: SCO packet for unknown connection handle 0 [Tue Aug 3 09:43:27 2021] Bluetooth: hci0: SCO packet for unknown connection handle 0 -- END SNIPPET -- ----------------------------------------------------------------------------------------- 2021-08-03 09:45:56 ----------------------------------------------------------------------------------------- btasker added 'Screenshot_20210803_094535.png' to Attachments ----------------------------------------------------------------------------------------- 2021-08-03 09:52:27 btasker ----------------------------------------------------------------------------------------- JournalD shows a bit more activity around that time -- BEGIN SNIPPET -- Aug 03 09:38:03 bumblebee systemd[1]: Started Hostname Service. Aug 03 09:38:33 bumblebee systemd[1]: systemd-hostnamed.service: Succeeded. Aug 03 09:42:10 bumblebee systemd[1]: Starting Daily apt download activities... Aug 03 09:42:14 bumblebee PackageKit[1978]: get-updates transaction /107_aeaceeea from uid 1000 finished with success after 889ms Aug 03 09:42:25 bumblebee systemd[1]: apt-daily.service: Succeeded. Aug 03 09:42:25 bumblebee systemd[1]: Finished Daily apt download activities. Aug 03 09:43:25 bumblebee dbus-daemon[834]: [system] Rejected send message, 0 matched rules; type="method_return", sender=":1.206" (uid=1000 pid=27410 comm="/usr/bin/pulseaudio --daemonize=no --log-target=jo" label="unconfined") interface="(unset)" member="(unset)" error name="(unset)" requested_reply="0" destination=":1.2" (uid=0 pid=831 comm="/usr/lib/bluetooth/bluetoothd " label="unconfined") Aug 03 09:43:25 bumblebee acpid[823]: input device has been disconnected, fd 25 Aug 03 09:43:25 bumblebee bluetoothd[831]: src/profile.c:ext_io_disconnected() Unable to get io data for Headset Voice gateway: getpeername: Transport endpoint is not connected (107) Aug 03 09:43:26 bumblebee bluetoothd[831]: src/service.c:btd_service_connect() a2dp-sink profile connect failed for 00:1B:66:C8:C9:CA: Device or resource busy Aug 03 09:43:26 bumblebee bluetoothd[831]: plugins/policy.c:reconnect_timeout() Reconnecting services failed: Operation already in progress (114) Aug 03 09:43:27 bumblebee bluetoothd[831]: profiles/audio/a2dp.c:a2dp_select_capabilities() Unable to select SEP Aug 03 09:43:27 bumblebee kernel: input: HD 450BT (AVRCP) as /devices/virtual/input/input96 Aug 03 09:43:27 bumblebee systemd-logind[859]: Watching system buttons on /dev/input/event30 (HD 450BT (AVRCP)) Aug 03 09:43:28 bumblebee acpid[823]: input device has been disconnected, fd 25 Aug 03 09:43:28 bumblebee rtkit-daemon[1252]: Supervising 19 threads of 6 processes of 1 users. Aug 03 09:43:28 bumblebee rtkit-daemon[1252]: Successfully made thread 40929 of process 27410 owned by '1000' RT at priority 5. Aug 03 09:43:28 bumblebee rtkit-daemon[1252]: Supervising 20 threads of 6 processes of 1 users. Aug 03 09:43:28 bumblebee kernel: Bluetooth: hci0: SCO packet for unknown connection handle 0 Aug 03 09:43:28 bumblebee kernel: Bluetooth: hci0: SCO packet for unknown connection handle 0 Aug 03 09:43:28 bumblebee kernel: Bluetooth: hci0: SCO packet for unknown connection handle 0 Aug 03 09:43:28 bumblebee kernel: Bluetooth: hci0: SCO packet for unknown connection handle 0 Aug 03 09:44:31 bumblebee sudo[40940]: ben : TTY=pts/3 ; PWD=/home/ben ; USER=root ; COMMAND=/usr/bin/dmesg -T Aug 03 09:44:31 bumblebee sudo[40940]: pam_unix(sudo:session): session opened for user root by (uid=1000) Aug 03 09:44:31 bumblebee sudo[40940]: pam_unix(sudo:session): session closed for user root Aug 03 09:45:50 bumblebee dbus-daemon[834]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' requested by ':1.446' (uid=1000 pid=2010 comm=> Aug 03 09:45:50 bumblebee systemd[1]: Starting Hostname Service... Aug 03 09:45:50 bumblebee dbus-daemon[834]: [system] Successfully activated service 'org.freedesktop.hostname1' Aug 03 09:45:50 bumblebee systemd[1]: Started Hostname Service. Aug 03 09:46:09 bumblebee kernel: Bluetooth: hci0: SCO packet for unknown connection handle 257 Aug 03 09:46:09 bumblebee kernel: Bluetooth: hci0: SCO packet for unknown connection handle 257 Aug 03 09:46:09 bumblebee kernel: Bluetooth: hci0: SCO packet for unknown connection handle 257 Aug 03 09:46:09 bumblebee bluetoothd[831]: src/profile.c:ext_io_disconnected() Unable to get io data for Headset Voice gateway: getpeername: Transport endpoint is not connected (107) Aug 03 09:46:20 bumblebee systemd[1]: systemd-hostnamed.service: Succeeded. Aug 03 09:46:22 bumblebee bluetoothd[831]: /org/bluez/hci0/dev_00_1B_66_C8_C9_CA/sep1/fd5: fd(41) ready Aug 03 09:46:22 bumblebee rtkit-daemon[1252]: Supervising 19 threads of 6 processes of 1 users. Aug 03 09:46:22 bumblebee rtkit-daemon[1252]: Successfully made thread 41017 of process 27410 owned by '1000' RT at priority 5. Aug 03 09:46:22 bumblebee rtkit-daemon[1252]: Supervising 20 threads of 6 processes of 1 users. Aug 03 09:46:22 bumblebee kernel: input: HD 450BT (AVRCP) as /devices/virtual/input/input97 Aug 03 09:46:22 bumblebee systemd-logind[859]: Watching system buttons on /dev/input/event30 (HD 450BT (AVRCP)) Aug 03 09:46:24 bumblebee sudo[41023]: ben : TTY=pts/3 ; PWD=/home/ben ; USER=root ; COMMAND=/bin/bash Aug 03 09:46:24 bumblebee sudo[41023]: pam_unix(sudo:session): session opened for user root by (uid=1000) -- END SNIPPET -- Earlier examples look similar, but there's nothing else logging that's common -- BEGIN SNIPPET -- Aug 03 09:07:59 bumblebee gpg-agent[39223]: listening on: std=5 extra=6 browser=4 ssh=3 Aug 03 09:10:41 bumblebee kernel: usb 3-5.2.4: reset full-speed USB device number 50 using xhci_hcd Aug 03 09:12:29 bumblebee dbus-daemon[834]: [system] Rejected send message, 0 matched rules; type="method_return", sender=":1.206" (uid=1000 pid=27410 comm="/usr/bin/pulseaudio --daemonize=no --log-target=jo" l> Aug 03 09:12:29 bumblebee acpid[823]: input device has been disconnected, fd 25 Aug 03 09:12:29 bumblebee bluetoothd[831]: src/profile.c:ext_io_disconnected() Unable to get io data for Headset Voice gateway: getpeername: Transport endpoint is not connected (107) Aug 03 09:12:32 bumblebee bluetoothd[831]: profiles/audio/avdtp.c:avdtp_connect_cb() connect to 00:1B:66:C8:C9:CA: Host is down (112) Aug 03 09:12:34 bumblebee bluetoothd[831]: src/service.c:btd_service_connect() a2dp-sink profile connect failed for 00:1B:66:C8:C9:CA: Device or resource busy Aug 03 09:12:34 bumblebee bluetoothd[831]: plugins/policy.c:reconnect_timeout() Reconnecting services failed: Operation already in progress (114) Aug 03 09:12:34 bumblebee bluetoothd[831]: profiles/audio/a2dp.c:a2dp_select_capabilities() Unable to select SEP Aug 03 09:12:34 bumblebee kernel: input: HD 450BT (AVRCP) as /devices/virtual/input/input92 Aug 03 09:12:34 bumblebee systemd-logind[859]: Watching system buttons on /dev/input/event30 (HD 450BT (AVRCP)) Aug 03 09:12:35 bumblebee acpid[823]: input device has been disconnected, fd 25 -- END SNIPPET -- ----------------------------------------------------------------------------------------- 2021-08-03 09:54:41 btasker ----------------------------------------------------------------------------------------- Later today I've got one of these: https://www.amazon.co.uk/1mii-Bluetooth-Adapter-Transmitter-Headphone/dp/B086L2WNPG/ref=sr_1_6?dchild=1&keywords=1mii+bluetooth+audio&qid=1627980786&sr=8-6 : arriving. So, the headset won't be paired with the laptop/touch Bluez at all - Pulseaudio will just see a USB soundcard (the button on the front of it is used to switch between HFP and A2DP). ----------------------------------------------------------------------------------------- 2021-08-03 11:07:40 btasker ----------------------------------------------------------------------------------------- So, I've just spent an hour listening to a training video without a single drop-out. The video was just someone talking over slides, so incredibly low bandwidth on the audio side of things. I've another video to watch, but I've put some music (much higher bandwidth) on first to see if I get a dropout. Not that it _should_ matter too much, but in both cases, the audio source is Firefox (music playing in Jamstash, video playing on the training site). ----------------------------------------------------------------------------------------- 2021-08-03 14:22:11 btasker ----------------------------------------------------------------------------------------- The music lasted about 40 mins (ish) earlier. It's also just died again. ----------------------------------------------------------------------------------------- 2021-08-03 14:42:11 btasker ----------------------------------------------------------------------------------------- Sounds a lot like this: https://unix.stackexchange.com/questions/575020/bluetooth-keeps-changing-from-a2dp-to-headset-and-loses-connection-on-debian-bus Unfortunately: -- BEGIN QUOTE -- The problem was solved by using another bluetooth adapter. With the "Priva III" from Avantree the connection has not got lost again. It worked right after plugin. -- END QUOTE -- This BlueZ bug also sounds about right: https://github.com/bluez/bluez/issues/102 -- BEGIN QUOTE -- With 5.56, my Mpow Cheetah headset connects as expected when powered on. However, after a while (maybe an hour), the connection drops out. A few seconds later it comes back, but is locked into HSP mode with very poor audio quality. I am forced to turn the Mpow Cheetah off and back on again, to reconnect in the proper mode. -- END QUOTE -- The version I'm running is right too -- BEGIN SNIPPET -- ii bluez 5.56-0ubuntu4.1 amd64 -- END SNIPPET -- They also list a logline that's common with mine -- BEGIN SNIPPET -- mars 09 13:14:47 bespin bluetoothd[377]: profiles/audio/a2dp.c:a2dp_select_capabilities() Unable to select SEP -- END SNIPPET -- Fix is here - https://github.com/tedd-an/bluez/commit/fac790455a8a2d1fd7973db1fed2f297d67f5d9f There is an update in the Ubuntu repos to 5.56-0ubuntu4.2, - that's too low, we need 5.58, but installing that and lets see what happens ----------------------------------------------------------------------------------------- 2021-08-03 17:04:22 btasker ----------------------------------------------------------------------------------------- I've restarted Pulse and the Bluetooth stack to be sure -- BEGIN SNIPPET -- pulseaudio -k sudo systemctl restart bluetooth -- END SNIPPET -- ----------------------------------------------------------------------------------------- 2021-08-03 17:21:04 btasker ----------------------------------------------------------------------------------------- Unfortunately, no-dice, did it again. Log entries look the same too ----------------------------------------------------------------------------------------- 2021-08-04 09:27:22 btasker ----------------------------------------------------------------------------------------- Actually, it's possible that it wouldn't be fixed even if I had 5.58. There's a bug here: https://github.com/bluez/bluez/issues/130 where a user waited for Manjaro to get 5.58 only for the issue to persist. Like me, they've got an AX201 chipset. There's some discussion about linux-firmware causing problems for this chipset here: - https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1155 - https://bugzilla.redhat.com/show_bug.cgi?id=1929434 I'm running the following: -- BEGIN SNIPPET -- ben@bumblebee:/tmp$ dpkg-query --list linux-firmware Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-==============-============-============-================================= ii linux-firmware 1.197 all Firmware for Linux kernel drivers -- END SNIPPET -- The Ubuntu Errata for this version notes -- BEGIN QUOTE -- linux-firmware (1.197) hirsute; urgency=medium * Intel AX210 Wi-Fi card does not work since updating to 1.196 (LP: #1922406) - SAUCE: Revert "iwlwifi: add new FWs from core59-66 release" -- Seth Forshee