As in the topic, I have a Dell XPS 13 (9310) and it’s currently running Manjaro. edit: Kernel is 5.13-rc5 from linux513. It affects 5.12 too, and I can’t go below that without losing wifi.
On boot, I get the following messages in dmesg and the bluetooth controller isn’t visible.
[...]
[Wed Jun 23 06:38:25 2021] hci_uart_qca serial0-0: failed to acquire enable gpio
[Wed Jun 23 06:38:25 2021] Bluetooth: hci0: setting up ROME/QCA6390
[Wed Jun 23 06:38:27 2021] Bluetooth: hci0: command 0xfc00 tx timeout
[Wed Jun 23 06:38:35 2021] Bluetooth: hci0: Reading QCA version information failed (-110)
[Wed Jun 23 06:38:35 2021] Bluetooth: hci0: Retry BT power ON:0
[Wed Jun 23 06:38:38 2021] Bluetooth: hci0: command 0xfc00 tx timeout
[Wed Jun 23 06:38:41 2021] Bluetooth: hci0: Reading QCA version information failed (-110)
[Wed Jun 23 06:38:41 2021] Bluetooth: hci0: Retry BT power ON:1
[Wed Jun 23 06:38:41 2021] Bluetooth: hci0: QCA Product ID :0x00000010
[Wed Jun 23 06:38:41 2021] Bluetooth: hci0: QCA SOC Version :0x400a0200
[Wed Jun 23 06:38:41 2021] Bluetooth: hci0: QCA ROM Version :0x00000200
[Wed Jun 23 06:38:41 2021] Bluetooth: hci0: QCA Patch Version:0x00002baa
[Wed Jun 23 06:38:41 2021] Bluetooth: hci0: QCA controller version 0x02000200
[Wed Jun 23 06:38:41 2021] Bluetooth: hci0: QCA Downloading qca/htbtfw20.tlv
[Wed Jun 23 06:38:41 2021] Bluetooth: hci0: QCA Failed to send TLV segment (-110)
[Wed Jun 23 06:38:41 2021] Bluetooth: hci0: QCA Failed to download patch (-110)
[Wed Jun 23 06:38:41 2021] Bluetooth: hci0: Retry BT power ON:2
[Wed Jun 23 06:38:43 2021] Bluetooth: hci0: command 0xfc00 tx timeout
[Wed Jun 23 06:38:52 2021] Bluetooth: hci0: Reading QCA version information failed (-110)
Bluetooth: hci0: Frame reassembly failed (-84) is another common error message.
I’m seeing the exact same thing. The whole issue just felt to me like a race condition between the Bluetooth adapter (QCA6390) and the kernel during adapter boot up. I tried adding some delay in the kernel at adapter startup and it seems to be much more reliable for me now!
If you are willing to test my fix and can patch and compile your own kernel, here’s a patch (made against 5.13.2-1-MANJARO):
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 0a0056912d51..00faeaca84c6 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -1657,6 +1657,16 @@ static int qca_power_on(struct hci_dev *hdev)
gpiod_set_value_cansleep(qcadev->bt_en, 1);
/* Controller needs time to bootup. */
msleep(150);
+ } else if (soc_type == QCA_QCA6390) {
+ /* The QCA6390 may come integrated with WiFi.
+ * If so, they share a power supply and the QCA6390
+ * may still need time to boot up. We can't easily
+ * detect if this is the case, so wait a bit on startup
+ * just in case the WiFi was powered on recently
+ */
+ bt_dev_dbg(hdev, "waiting on QCA6390 to stabilize...");
+ msleep(250);
+ bt_dev_dbg(hdev, "continuing");
}
}
I’ll try to follow up with a prebuilt package with this change later today for those who are willing to test, but who don’t want to go through compiling.
Ok, I think I found a much simpler temporary solution while I attempt a permanent fix. You can delay the loading of the module hci_uart which seems to fix the problem.
Step 1: Prevent automatic loading of module
$ echo "blacklist hci_uart" | sudo tee /etc/modprobe.d/blacklist_bt.conf
Step 2: Create service to load after 10 second delay
These steps prevent the loading of the Bluetooth driver immediately. Instead, a new service waits 10 seconds then manually loads module. This doesn’t require any modifications to the kernel and should work on any recent version (say 5.10+). What you should see is that the Bluetooth is working within 15 seconds of the graphical interface appearing.
Please let me know if this fix helps. I’m actively trying to debug why this fails and seeing the error messages from others is very helpful.
How to undo
Run sudo systemctl disable load_bt.service and then delete the two files created above.
Hi, sorry to revive this thread. I was wondering if anyone here got the BT working for the Dell XPS 9310 (I mean without the workaround posted in this thread).
I tried installing Manjaro or other Arch-based distros and I can’t get BT working, WiFi works fine out-of-the-box but BT doesn’t. Some kernel versions see the hardware and BT devices but can connect. Others don’t see BT hardware altogether.
I find it so strange that Ubuntu/PopOS have both BT and WiFi working fine for over a year now.
If someone has both working do you mind sharing your distro, Kernel, Linux firmware, and system firmware versions? Thanks
Sure. I’ve got bluetooth working with a manual load of the module after startup. The automatic loading in the workaround I posted above stopped working after a kernel update, but I’m not sure why.
Wow thank you very much for that info, I am gonna try this tonight. How long does it take for BT to be available after startup? unfortunately, since I use my laptop closed (and everything is bt based) I need bt to work right away, like on ubuntu based distros.
Mine works perfectly now (bios 3.4.0), if and only if I never unload the module. If I do, I need to power the computer completely off before it can get initialised without just spamming dmesg with errors. It gets put in some invalid state that a reboot won’t solve. I don’t think it works in Windows either at that point, but not sure.
So assuming your machine works like mine, my advice is to try to not be clever and just do an initial full power off to get it back up. It should work across reboots after that unless you break it by unloading things, in which case you’ll need to power it off again.
Hi Zoreal, could you share your kernel, linux-firmware versions too? what do you mean by “if I never unload the module”, what would be the situation where you unload the module?
Let’s pretend I am using my laptop in a normal situation. I boot up, expect Bluetooth to work, power off, reboot, no tinckering happening.