Bluetooth controller fails to initialise on Dell XPS 13 (9310)

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.

Very rarely it does work, but it’s one out of ten boots at most, and yet on the discussion page for the device on the Arch wiki others claim that it works just fine for them.

It works well in Windows on every boot, so it doesn’t seem broken. What can I do?

As you didn’t provide an inxi --admin --verbosity=7 --filter --no-host --width:

  • Did you upgrade your firmware to the latest version?

:thinking:

Apologies.

System:
  Kernel: 5.13.0-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0 
  parameters: BOOT_IMAGE=/@/boot/vmlinuz-5.13-x86_64 
  root=UUID=f23fde82-93ba-48a2-8af4-d111a9007d6a rw rootflags=subvol=@ quiet 
  apparmor=1 security=apparmor 
  resume=UUID=dd07bde4-73ab-48fc-af25-0eaf05161348 udev.log_priority=3 audit=0 
  mitigations=off log_buf_len=64M i915.enable_psr=0 i915.mitigations=off 
  intel_iommu=igfx_off memmap=12M$20M 
  Console: tty pts/8 wm: kwin_x11 DM: SDDM Distro: Manjaro Linux 
  base: Arch Linux 
Machine:
  Type: Laptop System: Dell product: XPS 13 9310 v: N/A serial: <filter> 
  Chassis: type: 10 serial: <filter> 
  Mobo: Dell model: 0MRT12 v: A00 serial: <filter> UEFI: Dell v: 3.0.3 
  date: 06/19/2021 
Battery:
  ID-1: BAT0 charge: 50.4 Wh (98.8%) condition: 51.0/51.0 Wh (100.0%) 
  volts: 8.7 min: 7.6 model: LGC-LGC6.5 DELL 2XXFW11 type: Li-poly 
  serial: <filter> status: Charging 
Memory:
  RAM: total: 30.79 GiB used: 6.03 GiB (19.6%) 
  Array-1: capacity: 32 GiB slots: 8 EC: None max-module-size: 4 GiB 
  note: est. 
  Device-1: Motherboard size: 4 GiB speed: 4267 MT/s type: LPDDR4 
  detail: synchronous bus-width: 16 bits total: 16 bits manufacturer: 16 
  part-no: N/A serial: <filter> 
  Device-2: Motherboard size: 4 GiB speed: 4267 MT/s type: LPDDR4 
  detail: synchronous bus-width: 16 bits total: 16 bits manufacturer: 16 
  part-no: N/A serial: <filter> 
  Device-3: Motherboard size: 4 GiB speed: 4267 MT/s type: LPDDR4 
  detail: synchronous bus-width: 16 bits total: 16 bits manufacturer: 16 
  part-no: N/A serial: <filter> 
  Device-4: Motherboard size: 4 GiB speed: 4267 MT/s type: LPDDR4 
  detail: synchronous bus-width: 16 bits total: 16 bits manufacturer: 16 
  part-no: N/A serial: <filter> 
  Device-5: Motherboard size: 4 GiB speed: 4267 MT/s type: LPDDR4 
  detail: synchronous bus-width: 16 bits total: 16 bits manufacturer: 16 
  part-no: N/A serial: <filter> 
  Device-6: Motherboard size: 4 GiB speed: 4267 MT/s type: LPDDR4 
  detail: synchronous bus-width: 16 bits total: 16 bits manufacturer: 16 
  part-no: N/A serial: <filter> 
  Device-7: Motherboard size: 4 GiB speed: 4267 MT/s type: LPDDR4 
  detail: synchronous bus-width: 16 bits total: 16 bits manufacturer: 16 
  part-no: N/A serial: <filter> 
  Device-8: Motherboard size: 4 GiB speed: 4267 MT/s type: LPDDR4 
  detail: synchronous bus-width: 16 bits total: 16 bits manufacturer: 16 
  part-no: N/A serial: <filter> 
CPU:
  Info: Quad Core model: 11th Gen Intel Core i7-1185G7 bits: 64 type: MT MCP 
  arch: Tiger Lake family: 6 model-id: 8C (140) stepping: 1 microcode: 86 
  cache: L1: 320 KiB L2: 12 MiB L3: 12 MiB bogomips: 47936 
  Speed: 1835 MHz min/max: 400/4800 MHz base/boost: 4300/3000 volts: 0.8 V 
  ext-clock: 100 MHz Core speeds (MHz): 1: 1835 2: 2546 3: 1261 4: 1243 
  5: 1580 6: 1189 7: 1354 8: 3709 
  Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat arch_capabilities 
  arch_perfmon art avx avx2 avx512_bitalg avx512_vbmi2 avx512_vnni 
  avx512_vp2intersect avx512_vpopcntdq avx512bw avx512cd avx512dq avx512f 
  avx512ifma avx512vbmi avx512vl bmi1 bmi2 bts cat_l2 cdp_l2 clflush 
  clflushopt clwb cmov constant_tsc cpuid cpuid_fault cx16 cx8 de ds_cpl 
  dtes64 dtherm dts epb ept ept_ad erms est f16c flexpriority flush_l1d fma 
  fpu fsgsbase fsrm fxsr gfni ht hwp hwp_act_window hwp_epp hwp_notify 
  hwp_pkg_req ibpb ibrs ibrs_enhanced ida intel_pt invpcid invpcid_single 
  lahf_lm lm mca mce md_clear mmx monitor movbe movdir64b movdiri msr mtrr 
  nonstop_tsc nopl nx ospke pae pat pbe pcid pclmulqdq pdcm pdpe1gb pebs pge 
  pku pln pni popcnt pse pse36 pts rdpid rdrand rdseed rdt_a rdtscp rep_good 
  sdbg sep sha_ni smap smep smx split_lock_detect ss ssbd sse sse2 sse4_1 
  sse4_2 ssse3 stibp syscall tm tm2 tme tpr_shadow tsc tsc_adjust 
  tsc_deadline_timer tsc_known_freq umip vaes vme vmx vnmi vpclmulqdq vpid 
  x2apic xgetbv1 xsave xsavec xsaveopt xsaves xtopology xtpr 
  Vulnerabilities: Type: itlb_multihit status: Not affected 
  Type: l1tf status: Not affected 
  Type: mds status: Not affected 
  Type: meltdown status: Not affected 
  Type: spec_store_bypass status: Vulnerable 
  Type: spectre_v1 status: Vulnerable: __user pointer sanitization and 
  usercopy barriers only; no swapgs barriers 
  Type: spectre_v2 status: Vulnerable, IBPB: disabled, STIBP: disabled 
  Type: srbds status: Not affected 
  Type: tsx_async_abort status: Not affected 
Graphics:
  Device-1: Intel Iris Xe Graphics vendor: Dell driver: i915 v: kernel 
  bus-ID: 00:02.0 chip-ID: 8086:9a49 class-ID: 0300 
  Device-2: Realtek Integrated_Webcam_HD type: USB driver: uvcvideo 
  bus-ID: 3-6:3 chip-ID: 0bda:5517 class-ID: fe01 serial: <filter> 
  Display: server: X.Org 1.20.11 compositor: kwin_x11 driver: 
  loaded: modesetting alternate: fbdev,intel,vesa display-ID: :0 screens: 1 
  Screen-1: 0 s-res: 3840x2400 s-dpi: 192 s-size: 508x317mm (20.0x12.5") 
  s-diag: 599mm (23.6") 
  Monitor-1: eDP-1 res: 3840x2400 hz: 60 dpi: 339 size: 288x180mm (11.3x7.1") 
  diag: 340mm (13.4") 
  OpenGL: renderer: Mesa Intel Xe Graphics (TGL GT2) v: 4.6 Mesa 21.1.2 
  direct render: Yes 
Audio:
  Device-1: Intel Tiger Lake-LP Smart Sound Audio vendor: Dell 
  driver: sof-audio-pci-intel-tgl 
  alternate: snd_hda_intel,snd_sof_pci_intel_tgl bus-ID: 00:1f.3 
  chip-ID: 8086:a0c8 class-ID: 0401 
  Sound Server-1: ALSA v: k5.13.0-1-MANJARO running: yes 
  Sound Server-2: JACK v: 0.125.0 running: no 
  Sound Server-3: PulseAudio v: 14.2 running: yes 
  Sound Server-4: PipeWire v: 0.3.30 running: no 
Network:
  Message: No device data found. 
  IF-ID-1: wlp114s0 state: up mac: <filter> 
  IP v4: <filter> type: dynamic noprefixroute scope: global 
  broadcast: <filter> 
  IP v6: <filter> type: noprefixroute scope: link 
  WAN IP: <filter> 
Bluetooth:
  Message: No bluetooth data found. 
Logical:
  Message: No logical block device data found. 
RAID:
  Message: No RAID data found. 
Drives:
  Local Storage: total: 953.87 GiB used: 391.46 GiB (41.0%) 
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Micron model: 2300 NVMe 1024GB 
  size: 953.87 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s 
  lanes: 4 rotation: SSD serial: <filter> rev: 23000020 temp: 48 Celsius C 
  scheme: GPT 
  SMART: yes health: PASSED on: 18d 19h cycles: 206 
  read-units: 2,643,811 [1.35 TB] written-units: 5,815,727 [2.97 TB] 
  Message: No optical or floppy data found. 
Partition:
  ID-1: / raw-size: 48.83 GiB size: 48.83 GiB (100.00%) 
  used: 31.32 GiB (64.1%) fs: btrfs block-size: 4096 B dev: /dev/nvme0n1p7 
  maj-min: 259:7 label: manjaro uuid: f23fde82-93ba-48a2-8af4-d111a9007d6a 
  ID-2: /.snapshots raw-size: 48.83 GiB size: 48.83 GiB (100.00%) 
  used: 31.32 GiB (64.1%) fs: btrfs block-size: 4096 B dev: /dev/nvme0n1p7 
  maj-min: 259:7 label: manjaro uuid: f23fde82-93ba-48a2-8af4-d111a9007d6a 
  ID-3: /boot/efi raw-size: 190 MiB size: 186 MiB (97.89%) 
  used: 103.4 MiB (55.6%) fs: vfat block-size: 512 B dev: /dev/nvme0n1p1 
  maj-min: 259:1 label: ESP uuid: B058-656C 
  ID-4: /etc/.snapshots raw-size: 48.83 GiB size: 48.83 GiB (100.00%) 
  used: 31.32 GiB (64.1%) fs: btrfs block-size: 4096 B dev: /dev/nvme0n1p7 
  maj-min: 259:7 label: manjaro uuid: f23fde82-93ba-48a2-8af4-d111a9007d6a 
  ID-5: /home raw-size: 19.53 GiB size: 19.06 GiB (97.56%) 
  used: 13.73 GiB (72.1%) fs: ext4 block-size: 4096 B dev: /dev/nvme0n1p9 
  maj-min: 259:9 label: home uuid: 9a66ab92-7cbb-45a6-9bba-478a3ca48154 
  ID-6: /var/cache/pacman/pkg raw-size: 48.83 GiB size: 48.83 GiB (100.00%) 
  used: 31.32 GiB (64.1%) fs: btrfs block-size: 4096 B dev: /dev/nvme0n1p7 
  maj-min: 259:7 label: manjaro uuid: f23fde82-93ba-48a2-8af4-d111a9007d6a 
  ID-7: /var/log raw-size: 48.83 GiB size: 48.83 GiB (100.00%) 
  used: 31.32 GiB (64.1%) fs: btrfs block-size: 4096 B dev: /dev/nvme0n1p7 
  maj-min: 259:7 label: manjaro uuid: f23fde82-93ba-48a2-8af4-d111a9007d6a 
  ID-8: /var/tmp raw-size: 48.83 GiB size: 48.83 GiB (100.00%) 
  used: 31.32 GiB (64.1%) fs: btrfs block-size: 4096 B dev: /dev/nvme0n1p7 
  maj-min: 259:7 label: manjaro uuid: f23fde82-93ba-48a2-8af4-d111a9007d6a 
  ID-9: /win raw-size: 860.32 GiB size: 860.32 GiB (100.00%) 
  used: 346.31 GiB (40.3%) fs: fuseblk block-size: 4096 B dev: /dev/nvme0n1p3 
  maj-min: 259:3 label: win uuid: 72125A63125A2C7B 
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default) 
  ID-1: swap-1 type: partition size: 6.84 GiB used: 0 KiB (0.0%) priority: -2 
  dev: /dev/nvme0n1p8 maj-min: 259:8 label: N/A 
  uuid: dd07bde4-73ab-48fc-af25-0eaf05161348 
Unmounted:
  ID-1: /dev/nvme0n1p2 maj-min: 259:2 size: 128 MiB fs: N/A label: N/A 
  uuid: N/A 
  ID-2: /dev/nvme0n1p4 maj-min: 259:4 size: 990 MiB fs: ntfs label: WINRETOOLS 
  uuid: EC50F14C50F11E50 
  ID-3: /dev/nvme0n1p5 maj-min: 259:5 size: 15.72 GiB fs: ntfs label: Image 
  uuid: E266F18166F156AF 
  ID-4: /dev/nvme0n1p6 maj-min: 259:6 size: 1.36 GiB fs: ntfs 
  label: DELLSUPPORT uuid: 2C7E57BE7E577F8E 
USB:
  Hub-1: 1-0:1 info: Full speed (or root) Hub ports: 1 rev: 2.0 
  speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900 
  Hub-2: 2-0:1 info: Full speed (or root) Hub ports: 4 rev: 3.1 speed: 10 Gb/s 
  chip-ID: 1d6b:0003 class-ID: 0900 
  Hub-3: 3-0:1 info: Full speed (or root) Hub ports: 12 rev: 2.0 
  speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900 
  Device-1: 3-3:2 info: Shenzhen Goodix FingerPrint type: <vendor specific> 
  driver: N/A interfaces: 1 rev: 2.0 speed: 12 Mb/s power: 100mA 
  chip-ID: 27c6:533c class-ID: ff00 
  Device-2: 3-6:3 info: Realtek Integrated_Webcam_HD type: Video 
  driver: uvcvideo interfaces: 5 rev: 2.0 speed: 480 Mb/s power: 500mA 
  chip-ID: 0bda:5517 class-ID: fe01 serial: <filter> 
  Hub-4: 4-0:1 info: Full speed (or root) Hub ports: 4 rev: 3.1 speed: 10 Gb/s 
  chip-ID: 1d6b:0003 class-ID: 0900 
Sensors:
  System Temperatures: cpu: 48.0 C mobo: N/A 
  Fan Speeds (RPM): cpu: 6077 mobo: 5774 fan-2: 
Info:
  Processes: 275 Uptime: 4m wakeups: 1420 Init: systemd v: 248 tool: systemctl 
  Compilers: gcc: 11.1.0 clang: 12.0.0 Packages: pacman: 1474 lib: 465 
  flatpak: 0 Shell: Zsh (sudo) v: 5.8 default: Bash v: 5.1.8 running-in: tmux: 
  inxi: 3.3.04 

BIOS is up to date as of today’s release, 3.0.3. linux-firmware is the latest 20210518.r1928.f846292-1.

$ dmesg | grep -i 'uart\|blue'
[    2.290086] Bluetooth: Core ver 2.22
[    2.290110] Bluetooth: HCI device and connection manager initialized
[    2.290114] Bluetooth: HCI socket layer initialized
[    2.290116] Bluetooth: L2CAP socket layer initialized
[    2.290121] Bluetooth: SCO socket layer initialized
[    2.499940] Bluetooth: HCI UART driver ver 2.3
[    2.499944] Bluetooth: HCI UART protocol H4 registered
[    2.499945] Bluetooth: HCI UART protocol BCSP registered
[    2.499957] Bluetooth: HCI UART protocol LL registered
[    2.499958] Bluetooth: HCI UART protocol ATH3K registered
[    2.499965] Bluetooth: HCI UART protocol Three-wire (H5) registered
[    2.500011] Bluetooth: HCI UART protocol Intel registered
[    2.500043] Bluetooth: HCI UART protocol Broadcom registered
[    2.500048] Bluetooth: HCI UART protocol QCA registered
[    2.500049] Bluetooth: HCI UART protocol AG6XX registered
[    2.500053] Bluetooth: HCI UART protocol Marvell registered
[    2.896890] dw-apb-uart.4: ttyS4 at MMIO 0x4017004000 (irq = 16, base_baud = 6250000) is a 16550A
[    2.943248] hci_uart_qca serial0-0: failed to acquire enable gpio
[    2.968257] Bluetooth: hci0: setting up ROME/QCA6390
[    3.174407] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    3.174410] Bluetooth: BNEP filters: protocol multicast
[    3.174415] Bluetooth: BNEP socket layer initialized
[    5.312407] Bluetooth: hci0: command 0xfc00 tx timeout
[   13.419090] Bluetooth: hci0: Reading QCA version information failed (-110)
[   13.419106] Bluetooth: hci0: Retry BT power ON:0
[   15.765748] Bluetooth: hci0: command 0xfc00 tx timeout
[   23.872539] Bluetooth: hci0: Reading QCA version information failed (-110)
[   23.872549] Bluetooth: hci0: Retry BT power ON:1
[   26.219218] Bluetooth: hci0: command 0xfc00 tx timeout
[   34.325864] Bluetooth: hci0: Reading QCA version information failed (-110)
[   34.325873] Bluetooth: hci0: Retry BT power ON:2
[   36.885794] Bluetooth: hci0: command 0xfc00 tx timeout
[   44.779231] Bluetooth: hci0: Reading QCA version information failed (-110)

According to the Dell specs, it doesn’t have any BlueTooth capabilities,

and inxi agrees, but just in case I missed something:

Yeah, very new hardware.

  1. Stay on Manjaro
  2. Try new kernels as they arrive
  3. Buy a cheap second-hand Linux-compatible BT dongle until the built-in one starts working.

:man_shrugging:

The page you linked to does say it supports Bluetooth 5.1 at the bottom of the table, though.

All right, thanks. I’ll have a look around for some dongles.

I have the exact same behavior. I am on one of these rare boots right now, yet inxi says it doesn’t work. But it does, I am using it atm.

$ inxi -E
Bluetooth: Message: No bluetooth data found.

Is there anything I can do to help further investigation?

System:

$ inxi -SM
System:    Host: flathead Kernel: 5.13.1-3-MANJARO x86_64 bits: 64 Desktop: Xfce 4.16.0 Distro: Manjaro Linux 
Machine:   Type: Laptop System: Dell product: XPS 13 9310 v: N/A serial: <superuser required> 
           Mobo: Dell model: 0MRT12 v: A00 serial: <superuser required> UEFI: Dell v: 3.0.3 date: 06/19/2021 

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

$ cat << EOF | sudo tee /etc/systemd/system/load_bt.service
[Unit]
Description=QCA6390 Workaround

[Service]
ExecStartPre=/bin/sleep 10
ExecStart=/usr/bin/modprobe hci_uart

[Install]
WantedBy=multi-user.target
EOF

Step 3: Register the new service with systemd

$ sudo systemctl enable load_bt.service

Step 4: Reboot

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.

$ sudo systemctl disable load_bt.service
$ sudo rm /etc/systemd/system/load_bt.service
$ sudo rm /etc/modprobe.d/blacklist_bt.conf
1 Like

I have tried your second approach. Booted 5 times and got it working 4 out of the 5. With the first one I guess I was a little too impatient.

This seems a little low for my system. It’s more like 30s for me.

Still, great solution. Thank you for your handy approach.

Edit: Tho inxi isn’t accurate

$ inxi -E Bluetooth: Message: No bluetooth data found.