PDA

View Full Version : [SOLVED] Atheros driver from Debian



arvigeus
December 27th, 2018, 07:09 PM
For some reason newer version of this driver does not work on my machine. I tried Debian and it was working perfectly. The package version there is http://ftp.us.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-atheros_20161130-4_all.deb (https://packages.debian.org/stretch/all/firmware-atheros/download)
How can I install it without breaking linux-firmware on Ubuntu?

chili555
December 27th, 2018, 09:53 PM
That is not the driver; it is, as the name implies, firmware that is needed by some drivers.

Please run:
lspci -nnk | grep 0280 -A3Where is says, 'kernel driver in use' , run:
modinfo <driver_name> | grep firmwareHere is an example from my machine:
03:00.0 Network controller [0280]: Intel Corporation Wireless 7260 [8086:08b2] (rev 83)
Subsystem: Intel Corporation Dual Band Wireless-AC 7260 [8086:c270]
Kernel driver in use: iwlwifi
Kernel modules: iwlwifiSo I run:
modinfo iwlwifi | grep firmwareAnd I find:

firmware: iwlwifi-100-5.ucode
firmware: iwlwifi-1000-5.ucode
firmware: iwlwifi-135-6.ucode
firmware: iwlwifi-105-6.ucode
firmware: iwlwifi-2030-6.ucode
firmware: iwlwifi-2000-6.ucode
firmware: iwlwifi-5150-2.ucode
firmware: iwlwifi-5000-5.ucode
firmware: iwlwifi-6000g2b-6.ucode
firmware: iwlwifi-6000g2a-6.ucode
firmware: iwlwifi-6050-5.ucode
firmware: iwlwifi-6000-6.ucode
firmware: iwlwifi-7265D-29.ucode
firmware: iwlwifi-7265-17.ucode
firmware: iwlwifi-3168-29.ucode
firmware: iwlwifi-3160-17.ucode
firmware: iwlwifi-7260-17.ucode
firmware: iwlwifi-8265-36.ucode
firmware: iwlwifi-8000C-36.ucode
firmware: iwlwifi-9260-th-b0-jf-b0-38.ucode
firmware: iwlwifi-9260-th-a0-jf-a0-38.ucode
firmware: iwlwifi-9000-pu-a0-jf-b0-38.ucode
firmware: iwlwifi-9000-pu-b0-jf-b0-38.ucode
firmware: iwlwifi-9000-pu-a0-jf-a0-38.ucode
firmware: iwlwifi-QuQnj-a0-hr-a0-38.ucode
firmware: iwlwifi-QuQnj-a0-jf-b0-38.ucode
firmware: iwlwifi-QuQnj-f0-hr-a0-38.ucode
firmware: iwlwifi-Qu-a0-jf-b0-38.ucode
firmware: iwlwifi-Qu-a0-hr-a0-38.ucode

Then we'll examine the Debian package to see how it differs and copy over just the file we need.

arvigeus
December 28th, 2018, 12:21 AM
Kernel driver in use: ath10k_pci

modinfo ath10k_pci | grep firmware

firmware: ath10k/QCA9377/hw1.0/board.bin
firmware: ath10k/QCA9377/hw1.0/firmware-5.bin
firmware: ath10k/QCA6174/hw3.0/board-2.bin
firmware: ath10k/QCA6174/hw3.0/board.bin
firmware: ath10k/QCA6174/hw3.0/firmware-6.bin
firmware: ath10k/QCA6174/hw3.0/firmware-5.bin
firmware: ath10k/QCA6174/hw3.0/firmware-4.bin
firmware: ath10k/QCA6174/hw2.1/board-2.bin
firmware: ath10k/QCA6174/hw2.1/board.bin
firmware: ath10k/QCA6174/hw2.1/firmware-5.bin
firmware: ath10k/QCA6174/hw2.1/firmware-4.bin
firmware: ath10k/QCA9887/hw1.0/board-2.bin
firmware: ath10k/QCA9887/hw1.0/board.bin
firmware: ath10k/QCA9887/hw1.0/firmware-5.bin
firmware: ath10k/QCA988X/hw2.0/board-2.bin
firmware: ath10k/QCA988X/hw2.0/board.bin
firmware: ath10k/QCA988X/hw2.0/firmware-5.bin
firmware: ath10k/QCA988X/hw2.0/firmware-4.bin
firmware: ath10k/QCA988X/hw2.0/firmware-3.bin
firmware: ath10k/QCA988X/hw2.0/firmware-2.bin

chili555
December 28th, 2018, 02:56 AM
Now may we see:
lscpi -nnk | grep 0280 -A3
dmesg | grep ath

praseodym
December 28th, 2018, 05:47 PM
You can update the firmware via


sudo apt-get install git
git clone git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
cd linux-firmware
sudo cp -r * /lib/firmware
Debian might use an even older driver with older firmware?!

arvigeus
December 28th, 2018, 06:47 PM
You can update the firmware via

I don't want to upgrade, I want to downgrade. After December 2017 my perfectly working driver drops connection constantly. Because Debian uses older version of it, it is the only distro that works for me. And when they update it: kaput.

lspci -nnk | grep 0280 -A3

05:00.0 Network controller [0280]: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter [168c:003e] (rev 32)
Subsystem: ASUSTeK Computer Inc. QCA6174 802.11ac Wireless Network Adapter [1043:86cd]
Kernel driver in use: ath10k_pci
Kernel modules: ath10k_pci


dmesg | grep ath

[ +0,081184] ath10k_pci 0000:05:00.0: enabling device (0000 -> 0002)
[ +0,000750] ath10k_pci 0000:05:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0
[ +0,189579] ath10k_pci 0000:05:00.0: Direct firmware load for ath10k/pre-cal-pci-0000:05:00.0.bin failed with error -2
[ +0,000010] ath10k_pci 0000:05:00.0: Direct firmware load for ath10k/cal-pci-0000:05:00.0.bin failed with error -2
[ +0,194123] ath10k_pci 0000:05:00.0: qca6174 hw3.2 target 0x05030000 chip_id 0x00340aff sub 1043:86cd
[ +0,000002] ath10k_pci 0000:05:00.0: kconfig debug 0 debugfs 1 tracing 1 dfs 0 testmode 0
[ +0,000361] ath10k_pci 0000:05:00.0: firmware ver WLAN.RM.4.4.1-00079-QCARMSWPZ-1 api 6 features wowlan,ignore-otp crc32 fd869beb
[ +0,111845] ath10k_pci 0000:05:00.0: board_file api 2 bmi_id N/A crc32 20d869c3
[ +0,275424] ath10k_pci 0000:05:00.0: Unknown eventid: 118809
[ +0,002938] ath10k_pci 0000:05:00.0: Unknown eventid: 90118
[ +0,000678] ath10k_pci 0000:05:00.0: htt-ver 3.47 wmi-op 4 htt-op 3 cal otp max-sta 32 raw 0 hwcrypto 1
[ +0,081530] ath: EEPROM regdomain: 0x6c
[ +0,000001] ath: EEPROM indicates we should expect a direct regpair map
[ +0,000001] ath: Country alpha2 being used: 00
[ +0,000000] ath: Regpair used: 0x6c
[ +0,089224] ath10k_pci 0000:05:00.0 wlp5s0: renamed from wlan0
[ +0,125321] ath10k_pci 0000:05:00.0: Unknown eventid: 118809
[ +0,002936] ath10k_pci 0000:05:00.0: Unknown eventid: 90118

praseodym
December 28th, 2018, 07:41 PM
[ +0,189579] ath10k_pci 0000:05:00.0: Direct firmware load for ath10k/pre-cal-pci-0000:05:00.0.bin failed with error -2
[ +0,000010] ath10k_pci 0000:05:00.0: Direct firmware load for ath10k/cal-pci-0000:05:00.0.bin failed with error -2

Check if the Debian firmware file contains these?! The FW blob doesn't.

arvigeus
December 28th, 2018, 07:56 PM
Check if the Debian firmware file contains these?! The FW blob doesn't.
pre-cal-pci.bin
cal-pci.bin
No. Nothing remotely connected

chili555
December 29th, 2018, 10:40 PM
It appears that the driver is downloading files from the directory /lib/firmware/ath10k/QCA6174/hw3.0. My directory, using the latest version of linux-firmware, shows:
drwxr-xr-x 2 root root 4096 Nov 29 11:11 .
drwxr-xr-x 4 root root 4096 Apr 21 2018 ..
-rw-r--r-- 1 root root 551128 Apr 25 2018 board-2.bin
-rw-r--r-- 1 root root 8124 Mar 29 2017 board.bin
-rw-r--r-- 1 root root 733784 Mar 29 2017 firmware-4.bin
-rw-r--r-- 1 root root 730788 Nov 6 10:42 firmware-6.bin
-rw-r--r-- 1 root root 79689 Mar 29 2017 notice_ath10k_firmware-4.txt
-rw-r--r-- 1 root root 78564 Nov 6 10:42 notice_ath10k_firmware-6.txt
Extracting the deb file you linked above shows:
drwxr-xr-x 2 chili chili 4096 Oct 13 15:27 .
drwxr-xr-x 4 chili chili 4096 Oct 13 15:27 ..
-rw-r--r-- 1 chili chili 337204 Oct 13 15:27 board-2.bin
-rw-r--r-- 1 chili chili 8124 Oct 13 15:27 board.bin
-rw-r--r-- 1 chili chili 733784 Oct 13 15:27 firmware-4.bin
As you see, there are differences.

I suggest that you back up the current files so that we can revert if needed:
cd /lib/firmware/ath10k/QCA6174/
sudo mkdir backups
sudo mv hw3.0/* backupsNow, please download the deb file you linked. By default it will go to your Downloads directory. Find it and right-click it and select 'Extract Here.' A new directory will be created called firmware-atheros_20161130-4_all. Within it will be a compressed file data.tar.xz. Right-click it and select 'Extract Here.'

Now, back to the terminal:


sudo cp ~/Downloads/firmware-atheros_20161130-4_all/data/lib/firmware/ath10k/QCA6174/hw3.0/* /lib/firmware/ath10k/QCA6174/hw3.0Verify that the files are there:


ls -al /lib/firmware/ath10k/QCA6174/hw3.0You should see only:


total 1068
drwxr-xr-x 2 chili chili 4096 Oct 13 15:27 .
drwxr-xr-x 4 chili chili 4096 Oct 13 15:27 ..
-rw-r--r-- 1 chili chili 337204 Oct 13 15:27 board-2.bin
-rw-r--r-- 1 chili chili 8124 Oct 13 15:27 board.bin
-rw-r--r-- 1 chili chili 733784 Oct 13 15:27 firmware-4.binReboot and tell us if the performance has improved.

arvigeus
January 9th, 2019, 11:43 AM
Sorry for the very late reply, but I had to test it to make sure it is working for real (in normal circumstances wifi dropping was very inconsistent and not happening all the time). Confirming that @chili555's solution works. Hopefully one day they will fix the newer drivers.

praseodym
January 9th, 2019, 10:19 PM
Hi Chili,

would this git fit in here?

https://github.com/kvalo/ath10k-firmware

chili555
January 10th, 2019, 12:10 AM
Hi Chili,

would this git fit in here?

https://github.com/kvalo/ath10k-firmwareI don't know for sure. The files are a bit different.

chili@T440p:~/Desktop/Forum/kvalo/ath10k-firmware/QCA6174/hw3.0$ ls -al
total 1388
drwxr-xr-x 6 chili chili 4096 Jan 9 18:01 .
drwxr-xr-x 4 chili chili 4096 Jan 9 18:01 ..
drwxr-xr-x 2 chili chili 4096 Jan 9 18:01 4.4
drwxr-xr-x 2 chili chili 4096 Jan 9 18:01 4.4.1
drwxr-xr-x 2 chili chili 4096 Jan 9 18:01 4.4.1.c1
drwxr-xr-x 2 chili chili 4096 Jan 9 18:01 4.4.1.c2
-rw-r--r-- 1 chili chili 567608 Jan 9 18:01 board-2.bin
-rw-r--r-- 1 chili chili 8124 Jan 9 18:01 board.bin
-rw-r--r-- 1 chili chili 733784 Jan 9 18:01 firmware-4.bin_WLAN.RM.2.0-00180-QCARMSWPZ-1
-rw-r--r-- 1 chili chili 79801 Jan 9 18:01 notice.txt_WLAN.RM.2.0-00180-QCARMSWPZ-1
firmware-4.bin, after it is renamed, appears to be the same as above. board-2.bin is different.

As OP hasn't shared dmesg with us, we are unsure what firmware loads and works. Until we have more information, I don't think we know for sure.

At least for me, ath10k_pci is about guesswork and luck.

jaspolino
August 3rd, 2019, 02:10 PM
+++Straightforward simple solution+++
Using the above mentioned repository github.com/kvalo/ath10k-firmware
i simply got placed the appropriate binary in the /lib/firmware folder.
Keep in mind you might need to change "ath10k" or "QCA6174" to your value.



dmesg | grep ath10k #you can replace ath10k of course
# it will read something like "failed to load firmware ath10k/QCA6174/hw3.0/firmware-6.bin #<- remember this path

# if there is no folder for ath10k create it
cd /lib/fimware
mkdir ath10k

cd
git clone github.com/kvalo/ath10k-firmware
cd ath10k-firmware/
# pick the right firmware
cd QCA6174/hw3.0
# there are differemt versions directories, i just took the newest one
cd 4.4
# now copy one of these to the location where the kernel expects it to be and rename it
cp firmware-6.bin_WLAN.RM.4.4-00022-QCARMSWPZ-2 /lib/firmware/ath10k/QCA6174/hw3.0/firmware-6.bin


see https://wireless.wiki.kernel.org/en/users/Drivers/ath10k/firmware for the explaination of the different binaries.
it worked immediately for me