Buggy Bluetooth Connection with Intel Wireless-AC 9560 on Ubuntu 19.10

19.10bluetoothdrivers

I have a buggy bluetooth connection with the following computer

  • Machine: HP Pavilion 14 ce2065tx
  • WiFi/Bluetooth chip: Intel Wireless-AC 9560
  • OS: Ubuntu 19.10

Problem:
Terrible bluetooth connectivity. Often the bluetooth connection with my speakers drops, and I'm unable to reconnect them unless I restart my machine. In short, bluetooth connections are very unreliable.

Something strange I noticed; apparently the WiFi/Bluetooth is not being even used? (Though WiFi works flawlessly), see below screenshot :

(Link to screenshot)

Output of lsusb:

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 04f2:b627 Chicony Electronics Co., Ltd HP Wide Vision HD Camera
Bus 001 Device 004: ID 8087:0aaa Intel Corp. 
Bus 001 Device 002: ID 046d:c534 Logitech, Inc. Unifying Receiver
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Output of dmesg | grep -i blue

[    3.252039] Bluetooth: Core ver 2.22
[    3.252052] Bluetooth: HCI device and connection manager initialized
[    3.252054] Bluetooth: HCI socket layer initialized
[    3.252056] Bluetooth: L2CAP socket layer initialized
[    3.252062] Bluetooth: SCO socket layer initialized
[    3.282179] Bluetooth: hci0: Firmware revision 0.1 build 199 week 48 2017
[    4.188336] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    4.188338] Bluetooth: BNEP filters: protocol multicast
[    4.188341] Bluetooth: BNEP socket layer initialized
[   15.254269] Bluetooth: RFCOMM TTY layer initialized
[   15.254272] Bluetooth: RFCOMM socket layer initialized
[   15.254294] Bluetooth: RFCOMM ver 1.11
[  147.659673] Bluetooth: hci0: unexpected event for opcode 0x0500
[  150.198335] Bluetooth: hci0: urb 00000000cf7901c5 failed to resubmit (113)
[  168.721340] Bluetooth: hci0: urb 0000000000f1e476 failed to resubmit (113)
[  187.484624] Bluetooth: hci0: urb 00000000e27374bc failed to resubmit (113)
[  198.107762] Bluetooth: hci0: urb 000000008f587935 failed to resubmit (113)
[  208.342270] Bluetooth: hci0: urb 00000000e891c73d failed to resubmit (113)
[  306.916278] Bluetooth: hci0: urb 000000009907dbc4 failed to resubmit (113)

Output of lspci:

00:00.0 Host bridge: Intel Corporation Device 3e34 (rev 0c)
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (Whiskey Lake) (rev 02)
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 0c)
00:12.0 Signal processing controller: Intel Corporation Cannon Point-LP Thermal Controller (rev 30)
00:14.0 USB controller: Intel Corporation Cannon Point-LP USB 3.1 xHCI Controller (rev 30)
00:14.2 RAM memory: Intel Corporation Cannon Point-LP Shared SRAM (rev 30)
00:14.3 Network controller: Intel Corporation Cannon Point-LP CNVi [Wireless-AC] (rev 30)
00:16.0 Communication controller: Intel Corporation Cannon Point-LP MEI Controller #1 (rev 30)
00:17.0 RAID bus controller: Intel Corporation 82801 Mobile SATA Controller [RAID mode] (rev 30)
00:19.0 Serial bus controller [0c80]: Intel Corporation Device 9dc5 (rev 30)
00:1c.0 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #1 (rev f0)
00:1c.4 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #5 (rev f0)
00:1d.0 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #9 (rev f0)
00:1d.1 PCI bridge: Intel Corporation Device 9db1 (rev f0)
00:1d.4 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #13 (rev f0)
00:1e.0 Communication controller: Intel Corporation Device 9da8 (rev 30)
00:1e.2 Serial bus controller [0c80]: Intel Corporation Device 9daa (rev 30)
00:1f.0 ISA bridge: Intel Corporation Cannon Point-LP LPC Controller (rev 30)
00:1f.3 Audio device: Intel Corporation Cannon Point-LP High Definition Audio Controller (rev 30)
00:1f.4 SMBus: Intel Corporation Cannon Point-LP SMBus Controller (rev 30)
00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP SPI Controller (rev 30)
02:00.0 3D controller: NVIDIA Corporation GP108M [GeForce MX250] (rev a1)
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
05:00.0 Non-Volatile memory controller: Intel Corporation SSDPEKNW020T8 [660p, 2TB] (rev 03)

What can I do to fix this?

Best Answer

If you have problems with simultaneous usage of Wi-Fi on 2.4 GHz and bluetooth on Intel combo chips, I suggest to set an option for iwlwifi kernel module.

Run in a terminal:

sudo tee /etc/modprobe.d/iwlwifi-opt.conf <<< "options iwlwifi bt_coex_active=N"

and reboot.

The command creates /etc/modprobe.d/iwlwifi-opt.conf file that sets an option for iwlwifi kernel module. It disables buggy "bluetooth coexistence" technology.

You can give the file a more meaningful name like intel-btfix.conf. The only requirement is to have .conf at the end. You can also add commentary to the file like

#Manually created file to fix bluetooth issues

if you forget where this file came from in the future.

You can revert this setting by removing this file:

sudo rm /etc/modprobe.d/iwlwifi-opt.conf

Regarding proprietary drivers for this chip. It is not required if the chip is supported by in-tree kernel module.

Additional information on this issue:

Nowadays Bluetooth and Wi-Fi are in most cases handled by one combo chip. In your case it is Intel 9560.

The problem is that 2.4 GHz Wi-Fi and bluetooth are working on the same frequency. That's why Wi-Fi kernel module in your case iwlwifi has built-in technology that handles (badly) conflicts between Wi-Fi and BT. It can be enabled or disabled by a kernel option.

iwlwifi has this option bt_coex_active enabled by default and it gives priority to Wi-Fi. That's why users have problems with BT. Generally the coexistence technology used by Intel in their module looks really ugly, because in most cases BT is unusable for audio streaming from Wi-Fi.

Another example of this problem is in Qualcomm Atheros older chips (ath9k), that is not that noticeable.

There is an option for the same purpose btcoex_enable in ath9k that is disabled by default. If you stream audio from 2.4 GHz Wi-Fi same problems may appear. In this case the option should be enabled. But QCA option gives priority to bluetooth and there may be packet drops on Wi-Fi even if you are not using bluetooth at all. So it is recommended to enable it only if badly needed.

New ath10k QCA chips don't have this option and it looks like they solved the problem perfectly because I never met any complaints.

Anyway it is highly recommended to switch to 5 GHz Wi-Fi if you are using bluetooth streaming.

Related Question