1

My Dell XPS15 9560 laptop (running on linux kernel 5.0.9), has a Qualcomm wireless adapter, whose Tx rate is capped at 1 Mbps. I want to make it better, if at all possible.

$ lspci -k | grep -A4 -e Qualcomm
Qualcomm  Atheros QCA6174 802.11ac Wireless Network Adapter (rev 32).
Subsystem: Bigfoot Networks, Inc. QCA6174 802.11ac Wireless Network Adapter
Kernel driver in use: ath10k_pci
Kernel modules: ath10k_pci

Linux wireless warns (last line of referenced page):

TX speeds are extremely poor on certain chips (QCA6174 is one). A patch (source) solves the issue in most cases.

I've never applied any patch to any system's software component. Concretely where and how should I apply the patch on Arch ? I've a number of posts on that (here and especially here, the latter explains the diff syntax in the provided patch) so I know the patch at hand is about adding two lines (one of them blank).

EDIT on what I did so far:

I want to know the installed driver's version and dependencies:

$ lsmod | grep ath                                                              
ath10k_pci             61440  0
ath10k_core           552960  1 ath10k_pci
ath                    36864  1 ath10k_core
mac80211              950272  1 ath10k_core
cfg80211              798720  3 ath,mac80211,ath10k_core

So everything depends on ath10k_pci. No news here.

Using the canonical path /sys/class/net/<iface>/device/:

$ readlink /sys/class/net/wifi0/device/driver
 ../../bus/pci/drivers/ath10k_pci

so the "where" resolves as /sys/bus/pci/drivers/ath10k_pci/. Going down that fs-tree branch further, there are a number of sub-directories and files, quite a few are compiled binaries (it seems).

I don't know of any cmd to directly query loaded driver's versions, so I'm no closer to learning what the installed driver's version is.


I guess I need to test that patch on the Qualcomm ath10k_pci WiFi driver on Arch.

Cbhihe
  • 2,549
  • 2
  • 21
  • 30
  • 1
    One of the reasons I did not buy a Dell XPS is because the USBC and Wifi are near each other, and the only thing Dell did in 4 generations of the product was placing a sheet isolation between the two and issuing a BIOS patch for the power of wifi to be weaker. Draw your own conclusions. – Rui F Ribeiro Apr 26 '19 at 10:35
  • 1
    @RuiFRibeiro: I did not know all that, and I am not really surprised. This is not a place for rant, but after forking out a very big amount of cash for a machine with 8 threads and a big chunk of memory (I actually get to use all of it) they replaced my mother board on day zero (literally day 0), my keyboard a week later, only with a keyboard whose Esc key (kinda useful key, for vim punchers like me) is BROKEN. So yeah. I'm not really surprised, that they are cutting all kinds of corners. Funny thing is that does not happen with XPS13 family machines.... – Cbhihe Apr 26 '19 at 10:42
  • 1
    Anyway, being more direct with your question. Dell is limiting transmission power on the firmware side of things (75% I think), and that limits TX. While you might improve it, you wont improve it as much as on other brands. – Rui F Ribeiro Apr 26 '19 at 11:22
  • 2
    The original source file is [here](https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/tree/drivers/net/wireless/ath/ath10k/mac.c) (linked from the [Atheros Linux wireless drivers](https://wireless.wiki.kernel.org/en/users/Drivers/Atheros#PCI_.2F_PCI-E_.2F_AHB_Drivers) under ath10k), see line 3391. Note that there's an additional line 3389 which is not in the patch file. Maybe compile the driver from source and patch it there? – Freddy Apr 26 '19 at 11:25
  • 1
    To query the module version, you can do a `modinfo ath10k_pci`, you will see that it is built for your kernel version. To get it from the filesystem use the full path to the binary like `modinfo /lib/modules/$(uname -r)/kernel/drivers/net/wireless/ath/ath10k/ath10k_pci.ko` (if you have different versions lying around). Start with [Compile kernel module (archlinux)](https://wiki.archlinux.org/index.php/Compile_kernel_module). – Freddy Apr 27 '19 at 07:50
  • @Freddy: now reading Arch wiki on kernel module compilation, and attempting to `git clone https://github.com/torvalds/linux/drivers/net/wireless/ath/ath10k` before applying the patch manually (just a line) and then somehow compiling. Compilation can take place anywhere right ? (For me, would be in `/var/builds/ath10k`). My `git clone` fails though, presumably because I don't apply it to the root of the repo's tree. Do I need to clone all the repo ? I am not doing this right... – Cbhihe Apr 27 '19 at 13:07
  • 1
    Follow the guide and [Kernel/Traditional compilation](https://wiki.archlinux.org/index.php/Kernel/Traditional_compilation). For the 5.09 kernel run `wget https://mirrors.edge.kernel.org/pub/linux/kernel/v5.x/linux-5.0.9.tar.xz`, I would start with that before trying a new kernel version. Linus Torvald's latest release is v5.1-rc6 which can also be downloaded from kernel.org. – Freddy Apr 27 '19 at 13:30
  • 1
    For the master branch of the [ath10k sources](https://wireless.wiki.kernel.org/en/users/drivers/ath10k/sources) you need `git clone git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git`, you may want to add option `--depth 1` for a shallow copy (latest commit only), the repo is huge. I would try a full build of the default kernel ath driver (without/with patch) including module installation first (to practice) before swapping the directory with the source tree. – Freddy Apr 27 '19 at 14:01
  • @Freddy: I follow but it's getting hairy. I'm at a crossroad and to decide where to, I need to know just one thing. Say that I successfully compile the patched module. The patch works and all. Will the patch stick the next time the kernel is updated, e.g. to 5.1 ? or will I potentially have to repeat-compile the patched module at every `core/linux` update, until the patch is no longer valid ? If so I might be better off buying an Intel WiFi/BT drop-in replacement of my Qualcomm lemon adapter, for instance https://www.amazon.com/gp/product/B0197 … UTF8&psc=1 or newer. Your opinion ? – Cbhihe Apr 27 '19 at 17:20
  • 1
    Yes, you would have to patch with every new kernel if the patch is not already included in the update. But if the kernel works why update with every latest release? Your amazon link is broken. I would probably go for an [Intel 9560 or 9260](https://www.intel.com/content/www/us/en/support/articles/000005511/network-and-i-o/wireless-networking.html?_ga=2.125999885.1613043322.1556388761-621693602.1556387779) if your card is a M.2 :) – Freddy Apr 27 '19 at 18:12
  • @Freddy: Sorry, I meant https://www.amazon.com/gp/product/B0197W86IE/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1. Will be looking at a drop-in replacement then. I don't usually solve problems by suppressing them, but this case will definitely be an exception. Thank you very much for your help. – Cbhihe Apr 27 '19 at 21:05
  • 1
    @Cbhihe My pleasure. Btw my wifi card was also an exception. I swapped my Intel 7265 with a crappy Broadcom (no Intel driver on OSX). The 9x60 are faster, 1.73Gbps vs. 867Mbps, just make sure you buy the correct length (M.2 2230 or 1216) and also have a look on ebay. [9560](https://ark.intel.com/content/www/us/en/ark/products/99446/intel-wireless-ac-9560.html) vs. [9260](https://ark.intel.com/content/www/us/en/ark/products/99445/intel-wireless-ac-9260.html) vs. [8260](https://ark.intel.com/content/www/us/en/ark/products/86068/intel-dual-band-wireless-ac-8260.html) – Freddy Apr 27 '19 at 21:23
  • @Freddy: Would it be worth providing a schematic answer summarizing comments ? I would gladly accept it. If not I'm afraid comments might end up being seen as stale. – Cbhihe Apr 29 '19 at 16:01

0 Answers0