2

Whenever i connect my Bluetooth headphone in Ubuntu my Wi-fi starts to drop and slow down. But just by turning the bluetooth off the wi-fi connection gets normal again. How can I use the two normally? (Obs: I've came from Windows and it was working fine)

 ubuntu@ubuntu:~$ lspci -knn | grep Net -A3; lsusb
02`enter code here`:00.0 Network controller [0280]: Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter [168c:0042] (rev 31)
    Subsystem: Lenovo QCA9377 802.11ac Wireless Network Adapter [17aa:0901]
    Kernel driver in use: ath10k_pci
    Kernel modules: ath10k_pci
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 174f:116a Syntek 
Bus 001 Device 003: ID 0cf3:e500 Atheros Communications, Inc. 
Bus 001 Device 002: ID 0781:5567 SanDisk Corp. Cruzer Blade
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

1 Answers1

1

I was having the same problem with QCA9377 0cf3:e500 Atheros Communications, Inc. bluetooth adapter. I answered in this question, I solved by including 0cf3:e500 to blacklist in btusb.c and recompiling the modules. You can check the link if you want to see how I arrived to this answer.

Unfortunately this fix is still not applied in official repository. But you can do that following the steps below:

1) Download Kernel Source (consider changing '4.18.0' for whichever version you're using):

# In a working directory, run:
apt source linux-source-4.18.0 

2) Fix code for this device. Include 0x0cf3:e500 to blacklist in btusb.c.

# Here the source was extracted to linux-hwe-4.18.0.
cd linux-hwe-4.18.0/drivers/bluetooth

# Change btusb.c with editor of your choice. Ex:
vim btusb.c

In btusb.c file just add { USB_DEVICE(0x0cf3, 0xe500), .driver_info = BTUSB_QCA_ROME }, to static const struct usb_device_id blacklist_table[].

File should be something like this:

static const struct usb_device_id blacklist_table[] = {
    ...
    /* QCA ROME chipset */
    ...
    { USB_DEVICE(0x04ca, 0x3015), .driver_info = BTUSB_QCA_ROME },
    { USB_DEVICE(0x04ca, 0x3016), .driver_info = BTUSB_QCA_ROME },
    { USB_DEVICE(0x04ca, 0x301a), .driver_info = BTUSB_QCA_ROME },
    { USB_DEVICE(0x13d3, 0x3496), .driver_info = BTUSB_QCA_ROME },
    // This is the fix for QCA9377 bluetooth 0x0cf3:e500
    { USB_DEVICE(0x0cf3, 0xe500), .driver_info = BTUSB_QCA_ROME },
    ...

3) Compile modules. You may need some need make and build-essential for that, install using 'sudo apt install make build-essential' if they are not installed.

make -C /lib/modules/$(uname -r)/build M=$PWD modules

4) "Install" and reboot. Replace btusb module for the new btusb and reboot.

# You may do a backup of the old file:
sudo mv /lib/modules/$(uname -r)/kernel/drivers/bluetooth/btusb.ko /lib/modules/$(uname -r)/kernel/drivers/bluetooth/btusb.ko.backup

# Copy and replace btusb.ko to module location:
sudo cp btusb.ko /lib/modules/$(uname -r)/kernel/drivers/bluetooth/

# Reboot and test
reboot

I didn't experience any problem after that. Wireless seems ok, bluetooth headset also seems to be ok.

If you also could test, please, share results here. If it really solves the problem we can ask this to be included in future linux kernel versions.

  • I just got a QCA9377 device… and I'm surprised to find that this problem still isn't fixed in the official btusb.c as of 2021. Has anyone tried to submit it to the kernel devs? – Dan May 18 '21 at 01:46
  • I've submitted a patch to the Linux-Bluetooth kernel maintainers to add QCA_ROME support for this device: https://marc.info/?l=linux-bluetooth&m=162136440231258&w=2 – Dan May 19 '21 at 09:37
  • 1
    Thank you @Dan for submitting this patch! I really appreciate it. Following your patch on linux repository, it were merged days ago, sadly it is not in 5.13 :( but hope it will be in 5.14. – Alef Pereira Jul 08 '21 at 14:23