Qualcomm Atheros Troubleshooting Guide

Troubleshooting

Most new brand notebooks have IOT chip modules branded Qualcomm/Atheros or sub brand Killer Networks.

Sadly firmware developers did not resolved all minor/major issues for Linux and sometimes WLAN just does not works, or in dmesg report lots of pcieport errors. There are available simple workaround solutions for now.

This guide is designed for all chips used by ath10k_core Linux kernel module.
For sure check if you really need tweak some. Open terminal and check dmesg and/or lsmod results.

Workaround

  1. Add to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub following flags:
pcie_aspm=off ath10k_core.skip_otp=y 
  1. Reload saved grub config:
sudo update-grub
  1. Reboot.
  2. Check dmesg:
sudo dmesg|grep firmware|grep ath10k_pci

Sample results:

ath10k_pci 0000:03:00.0: firmware ver WLAN.TF.2.1-00021-QCARMSWP-1 api 6 features wowlan,ignore-otp crc32 42e41877

Details about skip_otp

parm:           skip_otp:Skip otp failure for calibration in testmode (bool)

Flag pcie_aspm=off disabled power saving for all PCIE against issues with it.

If you using TLP be sure that RUNTIME_PM_DRIVER_BLACKLIST is uncommented.

FIRMWARE CAN JUST CRASHED AFTER RE-LOGIN

I recently LOGOUT from current session SDDM and after while LOGIN again. Results? WIFI GONE.
DMESG IN RED.

[ 9900.905053] wlp3s0: deauthenticating from f4:bf:80:67:e4:b6 by local choice (Reason: 3=DEAUTH_LEAVING)
**[ 9900.915596] ath10k_pci 0000:03:00.0: firmware crashed! (guid 0e621a87-7754-4d66-b20d-b840f0f0dd23)**
[ 9900.915600] ath10k_pci 0000:03:00.0: qca9377 hw1.1 target 0x05020001 chip_id 0x003821ff sub 1a3b:2b31
[ 9900.915602] ath10k_pci 0000:03:00.0: kconfig debug 1 debugfs 1 tracing 1 dfs 0 testmode 0
[ 9900.916136] ath10k_pci 0000:03:00.0: firmware ver WLAN.TF.2.1-00021-QCARMSWP-1 api 6 features wowlan,ignore-otp crc32 42e41877
[ 9900.916354] ath10k_pci 0000:03:00.0: board_file api 2 bmi_id N/A crc32 8aedfa4a
[ 9900.916356] ath10k_pci 0000:03:00.0: htt-ver 3.56 wmi-op 4 htt-op 3 cal otp max-sta 32 raw 0 hwcrypto 1
[ 9900.916473] ath10k_pci 0000:03:00.0: firmware register dump:
[ 9900.916474] ath10k_pci 0000:03:00.0: [00]: 0x05020001 0x00000000 0x009F97CC 0x00000003
[ 9900.916476] ath10k_pci 0000:03:00.0: [04]: 0x009F97CC 0x00060133 0x00000008 0x00000000
[ 9900.916477] ath10k_pci 0000:03:00.0: [08]: 0x0040A054 0xFFFFFFFF 0x00411820 0x00000000
[ 9900.916478] ath10k_pci 0000:03:00.0: [12]: 0x00000009 0xFFFFFFFF 0x00952F6C 0x00952F77
[ 9900.916479] ath10k_pci 0000:03:00.0: [16]: 0x00952CC4 0x00913B8B 0x00000000 0x0091080D
[ 9900.916480] ath10k_pci 0000:03:00.0: [20]: 0x409F97CC 0x0040E9E8 0x00000000 0x0045A000
[ 9900.916481] ath10k_pci 0000:03:00.0: [24]: 0x8093426E 0x0040EA48 0x00000001 0xC09F97CC
[ 9900.916483] ath10k_pci 0000:03:00.0: [28]: 0x809BC439 0x0040EA68 0x0040A054 0x00000080
[ 9900.916484] ath10k_pci 0000:03:00.0: [32]: 0x809BC408 0x0040EA88 0x0040A054 0x00000000
[ 9900.916485] ath10k_pci 0000:03:00.0: [36]: 0x809F7212 0x0040EAA8 0x0040A054 0x00000000
[ 9900.916486] ath10k_pci 0000:03:00.0: [40]: 0x80911210 0x0040EAC8 0x0000000B 0x0040416C
[ 9900.916487] ath10k_pci 0000:03:00.0: [44]: 0x80911154 0x0040EB28 0x00400000 0x00000000
[ 9900.916488] ath10k_pci 0000:03:00.0: [48]: 0x8091122D 0x0040EB48 0x00000000 0x00400600
[ 9900.916489] ath10k_pci 0000:03:00.0: [52]: 0x40910024 0x0040EB78 0x0040AB98 0x0040AB98
[ 9900.916494] ath10k_pci 0000:03:00.0: [56]: 0x00000000 0x0040EB98 0x009BB001 0x00040020
[ 9900.916495] ath10k_pci 0000:03:00.0: Copy Engine register dump:
[ 9900.916503] ath10k_pci 0000:03:00.0: [00]: 0x00034400 11 11 3 3
[ 9900.916511] ath10k_pci 0000:03:00.0: [01]: 0x00034800 25 25 486 487
[ 9900.916518] ath10k_pci 0000:03:00.0: [02]: 0x00034c00 52 52 115 116
[ 9900.916526] ath10k_pci 0000:03:00.0: [03]: 0x00035000 14 14 15 14
[ 9900.916533] ath10k_pci 0000:03:00.0: [04]: 0x00035400 7031 7031 253 189
[ 9900.916541] ath10k_pci 0000:03:00.0: [05]: 0x00035800 0 0 64 0
[ 9900.916548] ath10k_pci 0000:03:00.0: [06]: 0x00035c00 20 20 28 28
[ 9900.916556] ath10k_pci 0000:03:00.0: [07]: 0x00036000 1 1 1 1
[ 9900.916584] ath10k_pci 0000:03:00.0: failed to set vdev 0 chainmask 0x1, nss 1: -108
[ 9900.987459] ieee80211 phy0: Hardware restart was requested
[ 9901.205556] ath10k_pci 0000:03:00.0: unsupported HTC service id: 1536
[ 9901.240950] ath10k_pci 0000:03:00.0: device successfully recovered

WORKAROUND CRASH FIRMWARE

sudo rmmod ath10k_core ath10k_pci && sudo modprobe ath10k_core ath10k_pci

UPDATE 2020-04-09

WORKAROUND for crashing driver after RESUME from suspend based on @NaX post

PROPER SYSTEMD SERVICE UNITS DIRS are /usr/lib/systemd/* and after enabling them these creating symlink to /etc/systemd/*

REFERENCE: https://unix.stackexchange.com/a/367237

===============================================================
After reviewing several other examples I have adapted and are using the following and seems to work. Slight delay of a few seconds for wireless to come back after logging back in, but it seems to works.

To adapt to other systems or drivers you will need to find the drivers module equivalents for ath10k_pci && ath10k_core and the device name wlp3s0 . @see ip link .

Opinion

This seems to work as a workaround , but for me feel like it should be unnecessary as this was working out the box and I believe is still a regression in the drivers power management.

I cant remember when setting up the machine but I think I was on ath9k and have not tried going back to it.

Systemd Suspend Service

Create file:

sudo nano /usr/lib/systemd/system/network-suspend.service

File content:

## -----------------------------------------------------------------------------
# Atheros "ath10k" driver suspend service for "wlp3s0" device
## -----------------------------------------------------------------------------
# /usr/lib/systemd/system/network-suspend.service
# sudo systemctl enable network-suspend.service
# sudo systemctl start network-suspend.service
# sudo systemctl status network-suspend.service
# sudo systemctl daemon-reload
## -----------------------------------------------------------------------------

[Unit]
Description=Network suspend service
Before=sleep.target
StopWhenUnneeded=yes

[Service]
User=root
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/sudo -u $USER /bin/bash -lc 'nmcli networking off'
ExecStart=/usr/bin/sleep 1
ExecStart=/usr/bin/systemctl stop NetworkManager
ExecStart=/usr/bin/sleep 1
ExecStart=/usr/bin/ip link set wlp3s0 down
ExecStart=/usr/bin/sleep 1
ExecStart=/usr/bin/rmmod  ath10k_pci
ExecStart=/usr/bin/sleep 1
ExecStartPost=/usr/bin/rmmod  ath10k_core

[Install]
WantedBy=sleep.target

Systemd Resume Service

Create file:

sudo nano /usr/lib/systemd/system/network-resume.service

File content:

## -----------------------------------------------------------------------------
# Atheros "ath10k" driver resume service for "wlp3s0" device
## -----------------------------------------------------------------------------
# /usr/lib/systemd/system/network-resume.service
# sudo systemctl enable network-resume.service
# sudo systemctl start network-resume.service
# sudo systemctl status network-resume.service
# sudo systemctl daemon-reload
## -----------------------------------------------------------------------------

[Unit]
Description=Network resume service
After=suspend.target
StopWhenUnneeded=yes

[Service]
User=root
Type=oneshot
RemainAfterExit=yes
ExecStartPre=/usr/bin/sleep 2
ExecStart=/usr/bin/modprobe ath10k_pci
ExecStart=/usr/bin/sleep 1
ExecStart=/usr/bin/modprobe ath10k_core
ExecStart=/usr/bin/sleep 1
ExecStart=/usr/bin/ip link set wlp3s0 up
ExecStart=/usr/bin/sleep 1
ExecStart=/usr/bin/systemctl start NetworkManager
ExecStart=/usr/bin/sleep 1
ExecStart=/usr/bin/sudo -u $USER /bin/bash -lc 'nmcli networking on'
ExecStart=/usr/bin/sleep 1
ExecStart=/usr/bin/sudo -u $USER /bin/bash -lc 'nmcli r wifi off'
ExecStart=/usr/bin/sleep 1
ExecStart=/usr/bin/sudo -u $USER /bin/bash -lc 'nmcli r wifi on'

[Install]
WantedBy=suspend.target

Enable Service

sudo systemctl enable network-suspend.service
sudo systemctl enable network-resume.service

Restart system or sudo systemctl daemon-reload

2 Likes