Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] (was Intel VT/iommu error) Debian + Asus N550JV + Atheros AR9485 = painfully slow wifi

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
fu7zed
Posts: 7
Joined: 2022-03-03 22:30
Has thanked: 2 times

[SOLVED] (was Intel VT/iommu error) Debian + Asus N550JV + Atheros AR9485 = painfully slow wifi

#1 Post by fu7zed »

Hi,

I’ve installed Debian 11 on my Asus N550JV and can’t get the wifi to work properly.

The problem :
I can connect using the NetworkManager Applet from the tray icon in XFCE, but the signal works properly only to 5 to 10 seconds, until it reduces to a point I can't even ping a website.

Until now, I used Ubuntu derivatives or Arch on this computer, and wifi connection always worked without any tweaks.

The laptop has an Atheros AR9485 Wireless Network Adapter, running the ath9k driver

Code: Select all

sudo lshw -class network
  *-network
       description: Interface réseau sans fil
       produit: AR9485 Wireless Network Adapter
       fabriquant: Qualcomm Atheros
       identifiant matériel: 0
       information bus: pci@0000:04:00.0
       nom logique: wlp4s0
       version: 01
       numéro de série: 24:0a:64:63:bc:43
       bits: 64 bits
       horloge: 33MHz
       fonctionnalités: pm msi pciexpress bus_master cap_list rom ethernet physical wireless
       configuration: broadcast=yes driver=ath9k driverversion=5.16.0-3-amd64 firmware=N/A ip=192.168.1.13 latency=0 link=yes multicast=yes wireless=IEEE 802.11
       ressources: irq:18 mémoire:f7900000-f797ffff mémoire:f7980000-f798ffff
  *-network
       description: Ethernet interface
       produit: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       fabriquant: Realtek Semiconductor Co., Ltd.
       identifiant matériel: 0
       information bus: pci@0000:05:00.0
       nom logique: enp5s0
       version: 0c
       numéro de série: 74:d0:2b:b7:a4:19
       capacité: 1Gbit/s
       bits: 64 bits
       horloge: 33MHz
       fonctionnalités: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=5.16.0-3-amd64 firmware=rtl8168g-2_0.0.1 02/06/13 latency=0 link=no multicast=yes port=twisted pair
       ressources: irq:19 portE/S:d000(taille=256) mémoire:f7800000-f7800fff mémoire:f2100000-f2103fff
What I tried :

1)
I installed debian using the default iso (debian-11.2.0-amd64-netinst.iso).
As I ran into the problem during the installation (unable to download necessary packages), I admitted that even if I was able to connect, maybe I was needing something from the non-free repos.

2)
I tried another install, this time the dirty way with the non-free XFCE live iso (debian-live-11.2.0-amd64-xfce+nonfree.iso).
Still having the wifi bug, but I could at least finish the installation.

Anyway, now I don’t think it could be a proprietary firmware issue, as the `ath9k` driver is included in the kernel https://cateee.net/lkddb/web-lkddb/ATH9K.html

3)
I’ve seen a lot of forum posts about tweaking the params of `/etc/modprobe.d/ath9k.conf`, especially the `nohwcrypt=1` param.
(full list of available params here https://github.com/reynhout/chrx/blob/m ... ath9k.conf)
I tried a bit of everything, didn’t fix.

4)
I’ve found this article, about replacing network-manager with `wicd` …
http://pkill-9.com/2013/04/23/stabilizi ... ux-wheezy/
but `wicd` is not maintained anymore and has been kicked out of the debian repos.

5)
I tried to compile a backported driver, as described here :
https://ubuntuforums.org/showthread.php ... st12890183
The driver compiled successfully.
But didn´t fix.

6)
I wondered if my bug would be fixed in a recent kernel, so I decided to take a turn for the worse and upgraded to Sid.

Code: Select all

cat /proc/version
Linux version 5.16.0-3-amd64 (debian-kernel@lists.debian.org) (gcc-11 (Debian 11.2.0-18) 11.2.0, GNU ld (GNU Binutils for Debian) 2.38) #1 SMP PREEMPT Debian 5.16.11-1 (2022-02-25)
I am now running a shiny new 5.16 kernel.
Didn’t fix either.

7)
As I was running out of troubleshooting ideas, I installed other distributions aside to check if my hardware is faulty, or if they would include specific configuration or hint for a fix.
- MX Linux : same bug
- Manjaro : works
- Linux Mint : works
- Ubuntu : works
- Fedora : works
(currently : Triple Boot Debian Sid XFCE / Xubuntu 21.10 XFCE / Fedora 35 XFCE)
It seems like only Debian and direct derivatives would be impacted by the problem on my machine.

The `/etc/modprobe.d/` is stacked with config files on the other distributions (mostly blacklisting stuff), but nothing related with the ath9k driver.

Most config files, like `/etc/resolv.conf` have exactly the same contents in each distribution, and I have a hard time trying to understand what is going on.

Any tip would be highly appreciated ! 🙏
Last edited by fu7zed on 2022-03-04 15:29, edited 1 time in total.

User avatar
sunrat
Administrator
Administrator
Posts: 6603
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 119 times
Been thanked: 503 times

Re: Debian + Asus N550JV + Atheros AR9485 = painfully slow wifi

#2 Post by sunrat »

firmware=N/A
Maybe needs firmware-atheros installed
Some wifi chips have issues with power saving mode. Search for how to disable it.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

User avatar
4D696B65
Site admin
Site admin
Posts: 2696
Joined: 2009-06-28 06:09
Been thanked: 86 times

Re: Debian + Asus N550JV + Atheros AR9485 = painfully slow wifi

#3 Post by 4D696B65 »

This happened long ago to me, maybe the problem is similar.
viewtopic.php?p=364733#p364733

fu7zed
Posts: 7
Joined: 2022-03-03 22:30
Has thanked: 2 times

Re: Debian + Asus N550JV + Atheros AR9485 = painfully slow wifi

#4 Post by fu7zed »

Hi, and thanks for your answers !

I just tried to set `/etc/modprobe.d/ath9k.conf` with the following options:

Code: Select all

options ath9k nohwcrypt=1 ps_enable=0
According to your recommendations and the docs, it should disable hardware encryption and disable WLAN PowerSave.

But nothing changes (upon reboot or `sudo modprobe -r ath9k && sudo modprobe ath9k`).

--

I think I will dig further on the `firmware=N/A` issue.

This is weird, as synaptic says these two firmwares are already installed :
  • firmware-ath9k-htc (from main)
  • firmware-atheros (from non-free)
Even weirder is that it works under Ubuntu and Fedora with the same `firmware=N/A` output :

Ubuntu :

Code: Select all

  *-network
       description: Interface réseau sans fil
       produit: AR9485 Wireless Network Adapter
       fabricant: Qualcomm Atheros
       identifiant matériel: 0
       information bus: pci@0000:04:00.0
       nom logique: wlp4s0
       version: 01
       numéro de série: 24:0a:64:63:bc:43
       bits: 64 bits
       horloge: 33MHz
       fonctionnalités: pm msi pciexpress bus_master cap_list rom ethernet physical wireless
       configuration : broadcast=yes driver=ath9k driverversion=5.13.0-30-generic firmware=N/A ip=192.168.1.13 latency=0 link=yes multicast=yes wireless=IEEE 802.11
       ressources : irq:18 mémoire:f7900000-f797ffff mémoire:f7980000-f798ffff
Fedora :

Code: Select all

  *-network                 
       description: Wireless interface
       product: AR9485 Wireless Network Adapter
       vendor: Qualcomm Atheros
       physical id: 0
       bus info: pci@0000:04:00.0
       logical name: wlp4s0
       version: 01
       serial: 24:0a:64:63:bc:43
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list rom ethernet physical wireless
       configuration: broadcast=yes driver=ath9k driverversion=5.16.11-200.fc35.x86_64 firmware=N/A ip=192.168.1.13 latency=0 link=yes multicast=yes wireless=IEEE 802.11
       resources: irq:18 memory:f7900000-f797ffff memory:f7980000-f798ffff
Last edited by fu7zed on 2022-03-04 10:42, edited 1 time in total.

fu7zed
Posts: 7
Joined: 2022-03-03 22:30
Has thanked: 2 times

[SOLVED] Debian + Asus N550JV + Atheros AR9485 = painfully slow wifi

#5 Post by fu7zed »

I finally fixed it ! 🎉

There was a looping error message in the logs:

Code: Select all

sudo dmesg
...
[  488.032111] ath: phy0: DMA failed to stop in 10 ms AR_CR=0x00000024 AR_DIAG_SW=0x02000020 DMADBG_7=0x00006100
[  489.200480] wlp4s0: authenticate with a4:3e:51:bc:bf:76
[  489.220944] wlp4s0: send auth to a4:3e:51:bc:bf:76 (try 1/3)
[  489.222922] wlp4s0: authenticated
[  489.223321] wlp4s0: associate with a4:3e:51:bc:bf:76 (try 1/3)
[  489.227577] wlp4s0: RX AssocResp from a4:3e:51:bc:bf:76 (capab=0x1411 status=0 aid=1)
[  489.227686] wlp4s0: associated
[  489.227751] ath: EEPROM regdomain: 0x80fa
[  489.227751] ath: EEPROM indicates we should expect a country code
[  489.227752] ath: doing EEPROM country->regdmn map search
[  489.227753] ath: country maps to regdmn code: 0x37
[  489.227754] ath: Country alpha2 being used: FR
[  489.227755] ath: Regpair used: 0x37
[  489.227756] ath: regdomain 0x80fa dynamically updated by country element
[  489.281060] wlp4s0: Limiting TX power to 20 (20 - 0) dBm as advertised by a4:3e:51:bc:bf:76
...
I have found a related entry here :
https://wiki.archlinux.org/title/Networ ... s#Cause_#5

My bug was related to Intel VT (Virtualization Technology).
I still don't understand why and how it would mess with a physical device, but it did.

I've found two ways to make it work :

1)
In the BIOS, disable the VT-d entry

OR

2)
Disable the Intel IOMMU driver in the kernel boot parameters:
- open `/etc/default/grub`
- find the `GRUB_CMDLINE_LINUX_DEFAULT` option and append `intel_iommu=off` at the end of the parameters list
example :

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=off"
So far, I'm not sure about the side effects this tweak will have.
I'll try to create a VM to see if I find noticeable problems.

Many thanks sunrat and 4D696B65 for helping me !
Last edited by fu7zed on 2022-03-04 15:23, edited 2 times in total.

Post Reply