Suspect QCA6174 btcoex | Ubuntu 18 Bluetooth Audio Skip/Stutter/Delay WiFi bandwidth conflict Dell XPS 9570 [Pending PulseAudio testing]

Bug #1810636 reported by Berg Lloyd-Haig on 2019-01-06
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Undecided
Unassigned

Bug Description

I'm running Linux 4.20.0-042000-generic #201812232030 x64 on a Dell XPS 9570 with QCA6174 chipset, and have had the problem with Bluetooth audio choppiness ever since I have owned this laptop. This problem has persisted for me with previous kernels. If I disable wifi and use media on machine
locally, the problem doesn't occur.

Note: I've reverted back v4.18.0-13-generic and reproduced the problem for
the apport-collect report.

It started with Ubuntu 18.04 and continues with 18.10. It's particularly noticeable when the when saturating the WLAN connection with throughput, i.e. copying a large file sequentially across from a samba share, but also streaming video online results in the audio progressively delaying over-time. Re-establishing the Bluetooth audio sync restores the sync, but slowly creeps out again.

I've upgraded my linux-firmware package to disco 176 to match v4.20 kernel drivers ref: https://launchpad.net/ubuntu/+source/linux-firmware/1.176

The ath10k_core driver that supports this device has a reference for btcoex: ref https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/wireless/ath/ath10k/core.c?h=v4.20#n2598

It's possible that the Bluetooth component firmware is not supporting or communicating btcoex compatibility, but this is starting to reach the edge of my ability to diagnose the problem.

This btcoex support in ath9k has resolved/improved the Bluetooth bandwidth problem for older Qualcomm chipsets as shown in https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1746164

As a troubleshooting step, I've also tried the very latest firmware-6 file from, but I'm continuing to experience the problem ref: https://github.com/kvalo/ath10k-firmware/tree/master/QCA6174/hw3.0/4.4.1
---
ProblemType: Bug
ApportVersion: 2.20.10-0ubuntu13.1
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: berg 2871 F.... pulseaudio
CurrentDesktop: GNOME
DistroRelease: Ubuntu 18.10
InstallationDate: Installed on 2018-07-02 (187 days ago)
InstallationMedia: Ubuntu 18.04 LTS "Bionic Beaver" - Release amd64 (20180426)
MachineType: Dell Inc. XPS 15 9570
Package: linux (not installed)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_AU.UTF-8
 SHELL=/bin/bash
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.18.0-13-generic root=UUID=c825a7b0-a5ac-41de-bd57-7663fef8a1f1 ro quiet splash vt.handoff=1
ProcVersionSignature: Ubuntu 4.18.0-13.14-generic 4.18.17
RelatedPackageVersions:
 linux-restricted-modules-4.18.0-13-generic N/A
 linux-backports-modules-4.18.0-13-generic N/A
 linux-firmware 1.176
Tags: cosmic
Uname: Linux 4.18.0-13-generic x86_64
UpgradeStatus: Upgraded to cosmic on 2018-10-18 (79 days ago)
UserGroups: adm cdrom dip libvirt lpadmin plugdev sambashare sudo
_MarkForUpload: True
dmi.bios.date: 11/02/2018
dmi.bios.vendor: Dell Inc.
dmi.bios.version: 1.6.0
dmi.board.name: 07GHH0
dmi.board.vendor: Dell Inc.
dmi.board.version: A00
dmi.chassis.type: 10
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvr1.6.0:bd11/02/2018:svnDellInc.:pnXPS159570:pvr:rvnDellInc.:rn07GHH0:rvrA00:cvnDellInc.:ct10:cvr:
dmi.product.family: XPS
dmi.product.name: XPS 15 9570
dmi.product.sku: 087C
dmi.sys.vendor: Dell Inc.

Berg Lloyd-Haig (berglh) wrote :
Download full text (3.5 KiB)

3b:00.0 Network controller: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter (rev 32)
 Subsystem: Bigfoot Networks, Inc. QCA6174 802.11ac Wireless Network Adapter
 Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
 Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
 Latency: 0, Cache Line Size: 64 bytes
 Interrupt: pin A routed to IRQ 138
 Region 0: Memory at ed200000 (64-bit, non-prefetchable) [size=2M]
 Capabilities: [40] Power Management version 3
  Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
  Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
 Capabilities: [50] MSI: Enable+ Count=1/8 Maskable+ 64bit-
  Address: fee00498 Data: 0000
  Masking: 000000fe Pending: 00000000
 Capabilities: [70] Express (v2) Endpoint, MSI 00
  DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s unlimited, L1 <64us
   ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset- SlotPowerLimit 10.000W
  DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
   RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-
   MaxPayload 256 bytes, MaxReadReq 512 bytes
  DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr+ TransPend-
  LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <4us, L1 <64us
   ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp+
  LnkCtl: ASPM L1 Enabled; RCB 64 bytes Disabled- CommClk+
   ExtSynch- ClockPM+ AutWidDis- BWInt- AutBWInt-
  LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
  DevCap2: Completion Timeout: Not Supported, TimeoutDis+, LTR+, OBFF Via message
  DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR+, OBFF Disabled
  LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
    Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
    Compliance De-emphasis: -6dB
  LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete-, EqualizationPhase1-
    EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
 Capabilities: [100 v2] Advanced Error Reporting
  UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
  UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
  UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
  CESta: RxErr+ BadTLP- BadDLLP+ Rollover- Timeout+ NonFatalErr-
  CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
  AERCap: First Error Pointer: 00, GenCap- CGenEn- ChkCap- ChkEn-
 Capabilities: [148 v1] Virtual Channel
  Caps: LPEVC=0 RefClk=100ns PATEntryBits=1
  Arb: Fixed- WRR32- WRR64- WRR128-
  Ctrl: ArbSelect=Fixed
  Status: InProgress-
  VC0: Caps: PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
   Arb: Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
   Ctrl: Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
   Status: NegoPending- InProgress-
 Capabilities: [168 v1] Device Serial Number 00-00-00-00-00-00-00-00
 Capabilities: [178 v1] Latency Tolerance Reporting
  Max snoop latency: 3145728ns
  Max no snoop latency: 3145728ns
 Cap...

Read more...

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1810636

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete

apport information

tags: added: apport-collected cosmic
description: updated

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
description: updated
summary: - QCA6174 doesn't utlise btcoex - Ubuntu 18 Bluetooth Audio
+ QCA6174 doesn't utilise btcoex - Ubuntu 18 Bluetooth Audio
Skip/Stutter/Delay WiFi bandwidth conflict Dell XPS 9570
description: updated
Berg Lloyd-Haig (berglh) wrote :

@kaihengfeng I did try the latest version of the QCA6174 4.4.1 firmware which matches the firmware in linux-firmware v176, and the result is the same. I replaced firmware-6 file in the /lib/firmware/ath10k/QCA6174/hw3.0 folder to test this.

[1] https://github.com/kvalo/ath10k-firmware/blob/master/QCA6174/hw3.0/4.4.1/firmware-6.bin_WLAN.RM.4.4.1-00128-QCARMSWPZ-1

description: updated
Kai-Heng Feng (kaihengfeng) wrote :

board-2.bin is also required.

Berg Lloyd-Haig (berglh) wrote :

@kaihengfeng - after adding board-2.bin, neither the wireless or bluetooth is loading. I've ensured I downloaded the files correctly and used the same file permissions.

berg@bxps:$ md5sum ~/Downloads/firmware-6.bin_WLAN.RM.4.4.1-00128-QCARMSWPZ-1 /lib/firmware/ath10k/QCA6174/hw3.0/firmware-6.bin
32c3af49730a0babdb1f3004219debf5 /home/berg/Downloads/firmware-6.bin_WLAN.RM.4.4.1-00128-QCARMSWPZ-1
32c3af49730a0babdb1f3004219debf5 /lib/firmware/ath10k/QCA6174/hw3.0/firmware-6.bin
berg@bxps:$ md5sum ~/Downloads/board-2.bin /lib/firmware/ath10k/QCA6174/hw3.0/board-2.bin
db8264c352f202f38dfb99175209274c /home/berg/Downloads/board-2.bin
db8264c352f202f38dfb99175209274c /lib/firmware/ath10k/QCA6174/hw3.0/board-2.bin

I'll post my syslog from the boot, but I can't see any references for the PCI id of the chip or the kernel driver.

Berg Lloyd-Haig (berglh) wrote :

@kaihengfeng - do I need to do an update-initramfs -u -v -k all and then shutdown completely after placing the files?

Kai-Heng Feng (kaihengfeng) wrote :

No, ath10k_pci is not included in the initramfs so replace firmware alone is sufficient.

Berg Lloyd-Haig (berglh) wrote :

Ok, I managed to get the latest firmware working. It still exhibits the same issue. I think I must of only rebooted last time instead of shutting down completely.

I've tried the speaker sitting on top of the track-pad, about 50 cm away from the laptop - all to the same effect - the it's like it misses an audio packet, and rather than dropping the packet, it re-transmits again, buffering all subsequent packets for the stream. I would rather lose the packets completely in this case.

The speaker is a Sony SRS-HG1. I can pair the speaker to my Xiaomi Mi8 phone and it negotiates LDAC codec for the Bluetooth audio sink. I can then run high load on the Mi8 WiFi and play a movie in FullHD over DLNA and it never skips a beat, there is a small delay as you'd expect with Bluetooth, but it's less than 100 ms and seems normal after a short while.

I experienced this problem also in another location when I was house sitting recently - so different environment/access points etc. I think demonstrating the problem with the speaker and my phone without any problems puts me back on the firmware/driver troubleshooting path.

Do you have any other ideas @kaihengfeng? Would you like me to do Bluetooth packet capture?

Berg Lloyd-Haig (berglh) wrote :

Here is a demo of the stuttering sound, you can hear it at around 11 seconds after I start a file copy over SMB.

pulseaudio 1:12.2-0ubuntu4

Firmware seems less stable than that in linux-firmware 1.176. Getting strange delays with the WiFi in general.

One thing I noticed was that it was better, but not perfect on my 2.4 GHz SSID/radio. During this time my throughput from my server is only about 2 MB/s. When I switch to 5 GHz SSID/radio, the throuhgput increases to around 20 MB/s.

Berg Lloyd-Haig (berglh) wrote :

To clarify, higher bandwidth transfers on the radio seems to increase the stuttering, delay.

Here is my tlp config, incase there's anything in there you think could be related to my issues because of power saving etc.

Kai-Heng Feng (kaihengfeng) wrote :

Subscribed ath10k maintainer. I think he uses Launchpad, but if he doesn't reply here, please raise this issue to <email address hidden>.

Berg Lloyd-Haig (berglh) wrote :

Ok, I'm pretty sure this is a pulseaudio issue now and I'm going to close.

I reverted back to linux-firmware 1.176, and I had also used undervolt [1] to help reduce thermal load on the Core i9 Dell XPS 15 which has suffered from thermal shutdown under high load. I disabled undervolt service from running and ensured everything was back to normal values - the stuttering improved, but was still present.

I then focused on the difference between my Mi8 and my Ubuntu 18.10 installation. The Mi8 is running a LinesageOS ROM that supports LDAC/Apt-X codecs. I noticed with the regular AD2P codec in Ubuntu that I was getting some noise included in the Bluetooth audio encoding, and it sounded much cleaner via the Mi8 connection. I then found pulseaudio-modules-bt repo on github [2] that includes [3] a Ubuntu 18.04|18.10 repo that enabled LDAC/Apt-X codecs, LDAC is supported by the Sony bluetooth speaker.

After installing and rebooting the machine, I confirmed that the codec was correctly initialised in the a2dp sync:

berg@bxps:~$ pactl list sinks | grep -e bluez -e a2dp_codec
 Name: bluez_sink.E0_37_BF_09_F9_8B.a2dp_sink
 Driver: module-bluez5-device.c
 Monitor Source: bluez_sink.E0_37_BF_09_F9_8B.a2dp_sink.monitor
  bluetooth.a2dp_codec = "LDAC"
  device.api = "bluez"
  bluez.path = "/org/bluez/hci0/dev_E0_37_BF_09_F9_8B"
  bluez.class = "0x240414"
  bluez.alias = "bshg"

The sound is now perfect, and copying files across the network results in no stuttering. I think this proves that the btcoex support is working correctly and there is no issue specifically with the Qualcomm firmware. I notice if I pair the bluetooth speaker and play back audio my network throughput is limited to about 14-15 MB/s, when I turn of the speaker it improves to 17-18 MB/s. So the module is correctly allowing bluetooth to operate with priority.

Resuming the undervolt [1] service, I notice no stuttering as well with the updated pulseaudio and pulseaudio-module-bt packages in [2].

I'm going to continue testing for a few days before closing this bug, but I'm pretty sure I've gotten to the bottom of this one. Thanks @kaihenfeng.

[1] https://github.com/georgewhewell/undervolt
[2] https://github.com/EHfive/pulseaudio-modules-bt
[3] https://github.com/EHfive/pulseaudio-modules-bt/wiki/Packages

summary: - QCA6174 doesn't utilise btcoex - Ubuntu 18 Bluetooth Audio
- Skip/Stutter/Delay WiFi bandwidth conflict Dell XPS 9570
+ Suspect QCA6174 btcoex | Ubuntu 18 Bluetooth Audio Skip/Stutter/Delay
+ WiFi bandwidth conflict Dell XPS 9570 [Pending PulseAudio testing]
Berg Lloyd-Haig (berglh) wrote :

It might be worth saying, however, without the pulseaudio-modules-bt in [2] in comment #27, the throughput of the WLAN was not affected when playing sound via the A2DP sync and I was seeing abotu 18 MB/s. Maybe I'm a bit premature in saying it's solely a pulseaudio-modules-bt issue. Regardless, it seems to be working a lot better with LDAC.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers