[SOLVED] Wifi unreliable - ath9k/AR9485 unstable connection

Questions about hardware,drivers and peripherals
Forum rules
Before you post please read how to get help
Post Reply
charlieg
Level 2
Level 2
Posts: 50
Joined: Tue Dec 31, 2013 8:02 am

[SOLVED] Wifi unreliable - ath9k/AR9485 unstable connection

Post by charlieg » Sun Jun 29, 2014 8:39 pm

This seems to be a bit of a common issue and there's lots of suggestions but few actual solutions. So here's what I've tried so far and where I'm up to. This is with Mint 17 Cinammon and Network Manager. I have a Lenovo Z500 IdeaPad with a Qualcomm Atheros AR9485 Wireless Network Adapter aka AR9485.

UPDATE - "fixed" using WICD, scroll down for info!

Firstly, identifying the network card.

Code: Select all

$ lspci -nn | grep -i net
02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller [10ec:8136] (rev 05)
03:00.0 Network controller [0280]: Qualcomm Atheros AR9485 Wireless Network Adapter [168c:0032] (rev 01)
This is a fresh install of Linux Mint. It is a relatively new laptop - I suffered Windows 8/8.1 for a few months before installing it.

Code: Select all

$ uname -a
Linux charles-mint-Z500 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
My wireless connection is problematic. It was under Windows, and moreso under Linux. When under a bit of stress (e.g. downloading something) or with a "weak" (<70%) signal, the connection would frequently stop working but still show as connected. On Windows I could at least turn the wifi on/off and it would reconnect. I couldn't even do that on vanilla Mint as it just showed as 'connecting...' and dropped even more regularly. Also on Linux the signal strength was much weaker than it should have been.

As I reguarly use my laptop on several networks plus visit customers, manually setting things like BSSID are not preferred options.

One of the first pages I found was this:
Stabilizing an atheros ar9485 (ath9k) connection in Linux (Wheezy)

I was put off by the words 'hokey pokey' and WICD not being updated since 2012. However, it would turn out to be the actual solution for me.

There are several popular simple solutions so I decided to try those first, and I would encourage you to as they could fix your problem with minimal modification to your Mint setup.

Set nohwcrypt=1

This is a much mooted solution. It didn't work for me, but it (unscientifically) appeared to speed up general browsing. I don't know nor could easily locate the specific meaning of hwcrypt but would guess it is something to do with hardware cryptography, and disabling it presumably falls back to the software equivalent (which, as you can imagine, is much easier to fix/update).

Code: Select all

$ sudo echo "options ath9k nohwcrypt=1" >/etc/modprobe.d/ath9k.conf
Disabling ANI

Next I found a launchpad entry that seemed to get straight to my issue:
168c:0032 Wifi connection unstable -- Atheros AR9485 ath9k

One of the comments (#59) suggests disabling ANI (Adaptive Noise Interference), which seems to be a method of estimating signals corrupted by additive noise or interference.

Disabling ANI is done by:

Code: Select all

$ sudo echo 1 >/sys/kernel/debug/ieee80211/phy0/ath9k/disable_ani
This notably improved signal strength, adding (unscientifically) up to 20% which is a bit counter intuitive if my understanding of the principle is correct. Still my connection was as unstable as hell though.

Note the "issue" identified in the kernel, as part of that launchpad bug, was merged in the Linux 3.11 release.

Disabling power management

To permanently disable power management, as suggested in several places although none with sufficient explanation:

Code: Select all

echo "wireless-power off" >> /etc/network/interfaces
This made no discernable difference for me. My understanding of it is that the computer may power down the wireless card to conserve battery power. For some cards, the powering down will cause the wireless connection to be lost (I would assume it transparently reconnects when working properly). Given I was always plugged in and my connection so unstable that a few minutes of usage was problematic, it was no surprise that this did not help.

Disabling IPv6

One answer suggested disabling IPv6, presumably because it may be a buggy implementation.

Add these lines to sysctl.conf file:

Code: Select all

#disable ipv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
It didn't seem to fix my problem.

Setting regdomain

Since every area/country seems to have different allowances for which frequencies etc for wireless networks to use, there's an identification process that goes on between the hub and the wifi card. It seems that this doesn't always work so well.

Instructions for GB (replace with your own), hat tip to JeremyB:

Code: Select all

sudo gedit /etc/default/crda
At the bottom of the file it will say:

Code: Select all

REGDOMAIN=
Make it say GB although 00 should work in most countries too (not the US though).

Also in /etc/modprobe.d/ath9k.conf it might not hurt to add:

Code: Select all

options cfg80211 ieee80211_regdom=GB
To edit it it:

Code: Select all

sudo gedit /etc/modprobe.d/ath9k.conf
Installing WICD

Digging into the logs a bit more:

Code: Select all

$ tail -f /var/log/syslog
Jun 30 00:08:07 charles-mint-Z500 wpa_supplicant[895]: wlan0: CTRL-EVENT-SCAN-STARTED
Jun 30 00:16:07 charles-mint-Z500 wpa_supplicant[895]: message repeated 4 times: [ wlan0: CTRL-EVENT-SCAN-STARTED ]
Jun 30 00:16:17 charles-mint-Z500 wpa_supplicant[895]: wlan0: WPA: Group rekeying completed with 9c:d3:6d:86:ed:48 [GTK=TKIP]
Jun 30 00:17:01 charles-mint-Z500 CRON[28149]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Jun 30 00:18:07 charles-mint-Z500 wpa_supplicant[895]: wlan0: CTRL-EVENT-SCAN-STARTED
un 30 00:26:07 charles-mint-Z500 wpa_supplicant[895]: message repeated 4 times: [ wlan0: CTRL-EVENT-SCAN-STARTED ]
Jun 30 00:26:17 charles-mint-Z500 wpa_supplicant[895]: wlan0: WPA: Group rekeying completed with 9c:d3:6d:86:ed:48 [GTK=TKIP]
Again, unscientifically, these events did seem to coincide with my connection going down (CTRL-EVENT-SCAN-STARTED) then back up (Group rekeying completed). They are caused by Network Manager scanning the network, which seems to disrupt the ath9k driver on my laptop.

So, I ended up installing WICD - the 'hokey pokey' solution:
https://help.ubuntu.com/community/WICD

It turns out it's not that hokey pokey at all. It just connects to your wireless network then doesn't do anything else, almost exactly as you'd like it to. It only scans when you ask it to. Otherwise, it just sits quietly - and, importantly, undisruptively - in the background. I don't know about you, but I don't need to know what other wireless networks are available every 2 minutes. I'm usually in 1 place for significantly longer than that!

To install WICD:

Code: Select all

$ sudo apt-get install wicd-gtk
I would also recommend installing the cli/curses as well; just in case!

Code: Select all

$ sudo apt-get install wicd-cli wicd-curses
You need to disable Network Manager and start WICD:

Code: Select all

$ sudo service networking restart && sudo service network-manager stop
$ sudo service wicd start
That should be enough, run the WICD app (Applications > Internet > Wicd Network Manager) and see how easy it is!

We also need to stop network-manager coming back on reboot. Instructions:

Code: Select all

$ sudo mv /etc/init/network-manager.conf /etc/init/network-manager.conf-disabled
$ sudo mv /etc/xdg/autostart/nm-applet.desktop /etc/xdg/autostart/nm-applet.desktop.disabled
To re-enable, just rename back to the original names again and reboot. Hat tip to jawilljr.

Note that the wiki page instructions start with this:

Code: Select all

$ sudo apt-get remove --purge network-manager-gnome network-manager
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED
  cinnamon* cinnamon-screensaver* mint-meta-cinnamon* nemo* nemo-fileroller*
  nemo-share* network-manager* network-manager-gnome*
Hrm, that's not a good idea! I accidentally said 'Yes' at this point :oops: and was left with no wireless network nor any application to connect for me but luckily WICD worked fine.

To get Cinnamon back:

Code: Select all

$ sudo apt-get install mint-meta-cinnamon
With WICD, my wireless connection is stable. On the odd occasion it did drop, an additional improvement is I can just disconnect/reconnect.

Untried Solutions
Last edited by charlieg on Fri Mar 20, 2015 7:54 am, edited 16 times in total.

JeremyB
Level 18
Level 18
Posts: 8254
Joined: Fri Feb 21, 2014 8:17 am

Re: My wifi is sick - ath9k / AR9485 unstable connection

Post by JeremyB » Mon Jun 30, 2014 6:23 am

So far the thing that sticks out is TKIP, can you change your router security to WPA2-AES?

And run this in terminal and post the results

Code: Select all

wget -N -t 5 -T 10 https://dl.dropbox.com/s/qjc87hzk1z5x6z0/wireless_script && chmod +x wireless_script && ./wireless_script
Depending on the size of the file it will make a .txt or .tar.gz

It will display a lot of wireless info while omitting MAC addresses from the results

charlieg
Level 2
Level 2
Posts: 50
Joined: Tue Dec 31, 2013 8:02 am

Re: My wifi is sick - ath9k / AR9485 unstable connection

Post by charlieg » Mon Jun 30, 2014 6:46 am

OK will do shortly. Still, that doesn't explain why WICD works pretty well (almost no dropping out now) while using Network Manager results in a practically unusable connection.

charlieg
Level 2
Level 2
Posts: 50
Joined: Tue Dec 31, 2013 8:02 am

Re: My wifi is sick - ath9k / AR9485 unstable connection

Post by charlieg » Mon Jun 30, 2014 7:00 am

Here is the output of the wireless script you posted:

Code: Select all

	======== Wireless-Info START ========

System-Info ~~~~~~~~~~~~~~~~~~~~~~~~

charles-mint-Z500 3.13.0-24-generic x86_64,  Linux Mint 17 Qiana, qiana

CPU    : Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz
Memory : 3814 MB
Uptime : 11:59:37 up 18:49,  5 users,  load average: 0.80, 0.52, 0.44


lspci ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller [10ec:8136] (rev 05)
	Subsystem: Lenovo Device [17aa:3977]
	Kernel driver in use: r8169
03:00.0 Network controller [0280]: Qualcomm Atheros AR9485 Wireless Network Adapter [168c:0032] (rev 01)
	Subsystem: Lenovo Device [17aa:3218]
	Kernel driver in use: ath9k


lsusb ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 005: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller
Bus 001 Device 009: ID 0cf3:3004 Atheros Communications, Inc. 
Bus 001 Device 003: ID 062a:4101 Creative Labs 
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 13d3:5170 IMC Networks 
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


PCMCIA Card Info ~~~~~~~~~~~~~~~~~~~



iwconfig ~~~~~~~~~~~~~~~~~~~~~~~~~~~

wlan0     IEEE 802.11bgn  ESSID:"VM527231-2G"  
          Mode:Managed  Frequency:2.437 GHz  Access Point: <MAC C-03 VM527231-2G>   
          Bit Rate=72.2 Mb/s   Tx-Power=20 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=69/70  Signal level=-41 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:42   Missed beacon:0



rfkill ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      Interface                  Soft blocked  Hard blocked
0: ideapad_wlan: Wireless LAN        no            no
1: ideapad_bluetooth: Bluetooth      no            no
3: phy0: Wireless LAN                no            no
5: hci0: Bluetooth                   no            no


lsmod ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ath9k                 164164  0 
ath9k_common           13551  1 ath9k
ath9k_hw              453856  2 ath9k_common,ath9k
ath                    28698  3 ath9k_common,ath9k,ath9k_hw
mac80211              626489  1 ath9k
cfg80211              484040  3 ath,ath9k,mac80211
mxm_wmi                13021  1 nouveau
wmi                    19177  2 mxm_wmi,nouveau


module parameters ~~~~~~~~~~~~~~~~~~

ath9k         (5): blink=0 | bt_ant_diversity=0 | btcoex_enable=0 | nohwcrypt=1 | ps_enable=0
cfg80211      (2): cfg80211_disable_40mhz_24ghz=N | ieee80211_regdom=00
mac80211      (5): beacon_loss_count=7 | ieee80211_default_rc_algo=minstrel_ht | max_nullfunc_tries=2 | max_probe_tries=5 | probe_wait_ms=500
wmi           (2): debug_dump_wdg=N | debug_event=N


nm-tool ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

State: unknown
================o======o========o==============o=========o===========o==============o===========
 Interface & ID | Type | Driver | State        | Default | Speed     | Support      | HW Addr   
================o======o========o==============o=========o===========o==============o===========
                |      |        |              |         |           |              |           
----------------+------+--------+--------------+---------+-----------+--------------+-----------


NetworkManager.state ~~~~~~~~~~~~~~~


NetworkManager.conf ~~~~~~~~~~~~~~~~

[main]
plugins=ifupdown,keyfile,ofono
dns=dnsmasq

[ifupdown]
managed=false


NM WiFi Profiles ~~~~~~~~~~~~~~~~~~~

Auto VM527231-2G     : ssid=VM527231-2G | mac-address=<MAC wlan0> | ipv4=auto | ipv6=auto 


interfaces ~~~~~~~~~~~~~~~~~~~~~~~~~

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

wireless-power off

resolv.conf ~~~~~~~~~~~~~~~~~~~~~~~~

nameserver 192.168.0.1


Routes & Ping ~~~~~~~~~~~~~~~~~~~~~~

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 wlan0
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan0

--- 192.168.0.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 2.047/2.075/2.104/0.053 ms

--- 192.168.0.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 2.046/2.238/2.431/0.198 ms


iw reg get ~~~~~~~~~~~~~~~~~~~~~~~~~

(Region : "en_GB.UTF-8")
country GB:
	(2402 - 2482 @ 40), (N/A, 20)
	(5170 - 5250 @ 40), (N/A, 20)
	(5250 - 5330 @ 40), (N/A, 20), DFS
	(5490 - 5710 @ 40), (N/A, 27), DFS
	(57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR


iwlist chan ~~~~~~~~~~~~~~~~~~~~~~~~

wlan0     13 channels in total; available frequencies :
          Channel 01 (2.412 GHz) - 13 (2.472 GHz)

          Current Frequency:2.437 GHz (Channel 6)


iwlist scan ~~~~~~~~~~~~~~~~~~~~~~~~

wlan0     Scan completed :
          Cell 01 - Address: <MAC C-01 virginmedia1939978>
                    Channel:11
                    Frequency:2.462 GHz (Channel 11)
                    Quality=33/70  Signal level=-77 dBm  
                    Encryption key:on
                    ESSID:"virginmedia1939978"
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
                              24 Mb/s; 36 Mb/s; 54 Mb/s
                    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s
                    Mode:Master
                    Extra:tsf=00000005eb2b31dd
                    Extra: Last beacon: 20ms ago
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : CCMP TKIP
                        Authentication Suites (1) : PSK
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : CCMP TKIP
                        Authentication Suites (1) : PSK
          Cell 02 - Address: <MAC C-02 VM783066-2G>
                    Channel:1
                    Frequency:2.412 GHz (Channel 1)
                    Quality=18/70  Signal level=-92 dBm  
                    Encryption key:on
                    ESSID:"VM783066-2G"
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
                              9 Mb/s; 12 Mb/s; 18 Mb/s
                    Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s
                    Mode:Master
                    Extra:tsf=00000186baf40180
                    Extra: Last beacon: 2324ms ago
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : CCMP TKIP
                        Authentication Suites (1) : PSK
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : CCMP TKIP
                        Authentication Suites (1) : PSK
          Cell 03 - Address: <MAC C-03 VM527231-2G>
                    Channel:6
                    Frequency:2.437 GHz (Channel 6)
                    Quality=70/70  Signal level=-40 dBm  
                    Encryption key:on
                    ESSID:"VM527231-2G"
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
                              9 Mb/s; 12 Mb/s; 18 Mb/s
                    Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s
                    Mode:Master
                    Extra:tsf=0000000002393cc5
                    Extra: Last beacon: 20ms ago
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK


blacklist ~~~~~~~~~~~~~~~~~~~~~~~~~~

[/etc/modprobe.d/blacklist-ath_pci.conf]
blacklist ath_pci


modinfo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[ath9k]
filename:       /lib/modules/3.13.0-24-generic/kernel/drivers/net/wireless/ath/ath9k/ath9k.ko
srcversion:     BAF225EEB618908380B28DA
depends:        ath9k_hw,mac80211,ath9k_common,cfg80211,ath
parm:           debug:Debugging mask (uint)
parm:           nohwcrypt:Disable hardware encryption (int)
parm:           blink:Enable LED blink on activity (int)
parm:           btcoex_enable:Enable wifi-BT coexistence (int)
parm:           bt_ant_diversity:Enable WLAN/BT RX antenna diversity (int)
parm:           ps_enable:Enable WLAN PowerSave (int)

[ath9k_common]
filename:       /lib/modules/3.13.0-24-generic/kernel/drivers/net/wireless/ath/ath9k/ath9k_common.ko
srcversion:     696B00A6C59713EC0966997
depends:        ath,ath9k_hw

[ath9k_hw]
filename:       /lib/modules/3.13.0-24-generic/kernel/drivers/net/wireless/ath/ath9k/ath9k_hw.ko
srcversion:     4809F3842A0542CD6B556D3
depends:        ath

[ath]
filename:       /lib/modules/3.13.0-24-generic/kernel/drivers/net/wireless/ath/ath.ko
srcversion:     88A67C5359B02C5A710AFCF
depends:        cfg80211

[mac80211]
filename:       /lib/modules/3.13.0-24-generic/kernel/net/mac80211/mac80211.ko
srcversion:     C0F95BBF832E05DEFD722F4
depends:        cfg80211
parm:           max_nullfunc_tries:Maximum nullfunc tx tries before disconnecting (reason 4). (int)
parm:           max_probe_tries:Maximum probe tries before disconnecting (reason 4). (int)
parm:           beacon_loss_count:Number of beacon intervals before we decide beacon was lost. (int)
parm:           probe_wait_ms:Maximum time(ms) to wait for probe response before disconnecting (reason 4). (int)
parm:           ieee80211_default_rc_algo:Default rate control algorithm for mac80211 to use (charp)

[cfg80211]
filename:       /lib/modules/3.13.0-24-generic/kernel/net/wireless/cfg80211.ko
srcversion:     8B3D642D1F2E6406EF33F74
depends:        
parm:           ieee80211_regdom:IEEE 802.11 regulatory domain code (charp)
parm:           cfg80211_disable_40mhz_24ghz:Disable 40MHz support in the 2.4GHz band (bool)


udev rules ~~~~~~~~~~~~~~~~~~~~~~~~~

# PCI device 0x10ec:0x8136 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="<MAC eth0>", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x168c:0x0032 (ath9k)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="<MAC wlan0>", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"


Custom files/entries ~~~~~~~~~~~~~~~

/etc/modules        : Default
/etc/rc.local       : Default
/etc/modprobe.d     : Not Default
/etc/pm/(cnf|pw|sl) : Not Default

[/etc/modprobe.d]
ath9k.conf        : options ath9k nohwcrypt=1
iwlwifi.conf      : remove iwlwifi \
                    (/sbin/lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs /sbin/rmmod) \
                    && /sbin/modprobe -r mac80211
mlx4.conf         : softdep mlx4_core post: mlx4_en

[/etc/pm/sleep.d/00_check_touchpad_status]
#!/bin/sh
#copy to /etc/pm/sleep.d
LOGFILE="/var/log/sleep.log"

case "$1" in
        resume|thaw)
                echo "Resumed from suspend at `date`" >> "$LOGFILE"
                /usr/bin/python3 /opt/extras.ubuntu.com/touchpad-indicator/share/touchpad-indicator/check_touchpad_status.py
                echo "Touchpad enabled"
                ;;
esac


Kernel boot line ~~~~~~~~~~~~~~~~~~~

BOOT_IMAGE=/boot/vmlinuz-3.13.0-24-generic root=UUID=f7bd9cf6-74cf-4bbb-add8-b96ba006bb9f ro quiet splash vt.handoff=7


dmesg ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[    4.065179] microcode: Microcode Update Driver: v2.00 <tigran@aivazian.fsnet.co.uk>, Peter Oruba
[    4.065479] audit: initializing netlink socket (disabled)
[    4.403765] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[    4.409883] wmi: Mapper loaded
[    5.165560] psmouse serio1: elantech: assuming hardware version 4 (with firmware version 0x361f01)
[   18.571172] ath: phy0: Set BT/WLAN RX diversity capability
[   18.578455] ath: phy0: ASPM enabled: 0x42
[   18.578460] ath: EEPROM regdomain: 0x65
[   18.578462] ath: EEPROM indicates we should expect a direct regpair map
[   18.578465] ath: Country alpha2 being used: 00
[   18.578466] ath: Regpair used: 0x65
[   20.303164] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   23.617129] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   24.617573] wlan0: authenticate with <MAC C-03 VM527231-2G>
[   24.634618] wlan0: send auth to <MAC C-03 VM527231-2G> (try 1/3)
[   24.636949] wlan0: authenticated
[   24.638952] wlan0: associate with <MAC C-03 VM527231-2G> (try 1/3)
[   24.643478] wlan0: RX AssocResp from <MAC C-03 VM527231-2G> (capab=0x411 status=0 aid=2)
[   24.643532] wlan0: associated
[   24.643561] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   24.645535] ath: EEPROM regdomain: 0x833a
[   24.645537] ath: EEPROM indicates we should expect a country code
[   24.645539] ath: doing EEPROM country->regdmn map search
[   24.645540] ath: country maps to regdmn code: 0x37
[   24.645541] ath: Country alpha2 being used: GB
[   24.645541] ath: Regpair used: 0x37
[   24.645542] ath: regdomain 0x833a dynamically updated by country IE
[ 8038.857214] wlan0: authenticate with <MAC C-03 VM527231-2G>
[ 8038.883728] wlan0: send auth to <MAC C-03 VM527231-2G> (try 1/3)
[ 8038.885999] wlan0: authenticated
[ 8038.888552] wlan0: associate with <MAC C-03 VM527231-2G> (try 1/3)
[ 8038.893070] wlan0: RX AssocResp from <MAC C-03 VM527231-2G> (capab=0x411 status=0 aid=2)
[ 8038.893129] wlan0: associated
[ 8038.893144] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 8038.897649] ath: EEPROM regdomain: 0x833a
[ 8038.897654] ath: EEPROM indicates we should expect a country code
[ 8038.897657] ath: doing EEPROM country->regdmn map search
[ 8038.897659] ath: country maps to regdmn code: 0x37
[ 8038.897661] ath: Country alpha2 being used: GB
[ 8038.897663] ath: Regpair used: 0x37
[ 8038.897666] ath: regdomain 0x833a dynamically updated by country IE
[11229.112242] wlan0: deauthenticating from <MAC C-03 VM527231-2G> by local choice (reason=3)
[11230.849631] ath: phy0: ASPM enabled: 0x42
[11231.409983] usb 1-1.3: device firmware changed
[11233.647123] ath9k 0000:03:00.0: no hotplug settings from platform
[11234.592672] wlan0: authenticate with <MAC C-03 VM527231-2G>
[11234.616543] wlan0: send auth to <MAC C-03 VM527231-2G> (try 1/3)
[11234.719748] wlan0: send auth to <MAC C-03 VM527231-2G> (try 2/3)
[11234.722698] wlan0: authenticated
[11234.723782] wlan0: associate with <MAC C-03 VM527231-2G> (try 1/3)
[11234.728437] wlan0: RX AssocResp from <MAC C-03 VM527231-2G> (capab=0x411 status=0 aid=2)
[11234.728483] wlan0: associated
[11234.730562] ath: EEPROM regdomain: 0x833a
[11234.730565] ath: EEPROM indicates we should expect a country code
[11234.730566] ath: doing EEPROM country->regdmn map search
[11234.730567] ath: country maps to regdmn code: 0x37
[11234.730568] ath: Country alpha2 being used: GB
[11234.730569] ath: Regpair used: 0x37
[11234.730570] ath: regdomain 0x833a dynamically updated by country IE
[26412.886028] wlan0: deauthenticating from <MAC C-03 VM527231-2G> by local choice (reason=3)
[26642.105429] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[26682.079301] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[26682.581551] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[26685.769313] wlan0: authenticate with <MAC C-03 VM527231-2G>
[26685.786621] wlan0: send auth to <MAC C-03 VM527231-2G> (try 1/3)
[26685.789222] wlan0: authenticated
[26685.789918] wlan0: associate with <MAC C-03 VM527231-2G> (try 1/3)
[26685.794330] wlan0: RX AssocResp from <MAC C-03 VM527231-2G> (capab=0x411 status=0 aid=2)
[26685.794388] wlan0: associated
[26685.794429] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[26686.054469] ath: EEPROM regdomain: 0x833a
[26686.054473] ath: EEPROM indicates we should expect a country code
[26686.054474] ath: doing EEPROM country->regdmn map search
[26686.054476] ath: country maps to regdmn code: 0x37
[26686.054477] ath: Country alpha2 being used: GB
[26686.054478] ath: Regpair used: 0x37
[26686.054479] ath: regdomain 0x833a dynamically updated by country IE
[31534.772329] wlan0: deauthenticating from <MAC C-03 VM527231-2G> by local choice (reason=3)
[31534.867451] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[31536.721526] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[31536.811933] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[31537.412585] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[31539.998623] wlan0: authenticate with <MAC C-03 VM527231-2G>
[31540.015361] wlan0: send auth to <MAC C-03 VM527231-2G> (try 1/3)
[31540.018171] wlan0: authenticated
[31540.022006] wlan0: associate with <MAC C-03 VM527231-2G> (try 1/3)
[31540.026424] wlan0: RX AssocResp from <MAC C-03 VM527231-2G> (capab=0x411 status=0 aid=2)
[31540.026480] wlan0: associated
[31540.026521] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[31540.032182] ath: EEPROM regdomain: 0x833a
[31540.032187] ath: EEPROM indicates we should expect a country code
[31540.032190] ath: doing EEPROM country->regdmn map search
[31540.032192] ath: country maps to regdmn code: 0x37
[31540.032195] ath: Country alpha2 being used: GB
[31540.032196] ath: Regpair used: 0x37
[31540.032199] ath: regdomain 0x833a dynamically updated by country IE
[38946.907526] wlan0: deauthenticating from <MAC C-03 VM527231-2G> by local choice (reason=3)
[38946.971221] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[38947.873626] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[38947.964919] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[38951.043470] ath: phy0: ASPM enabled: 0x42
[38951.604094] usb 1-1.3: device firmware changed
[38953.840091] ath9k 0000:03:00.0: no hotplug settings from platform
[38958.094855] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[65691.428345] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[65692.160217] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[65695.410347] wlan0: authenticate with <MAC C-03 VM527231-2G>
[65695.434887] wlan0: send auth to <MAC C-03 VM527231-2G> (try 1/3)
[65695.437146] wlan0: authenticated
[65695.437768] wlan0: associate with <MAC C-03 VM527231-2G> (try 1/3)
[65695.443488] wlan0: RX AssocResp from <MAC C-03 VM527231-2G> (capab=0x411 status=0 aid=2)
[65695.443549] wlan0: associated
[65695.443562] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[65695.448953] ath: EEPROM regdomain: 0x833a
[65695.448959] ath: EEPROM indicates we should expect a country code
[65695.448962] ath: doing EEPROM country->regdmn map search
[65695.448965] ath: country maps to regdmn code: 0x37
[65695.448967] ath: Country alpha2 being used: GB
[65695.448969] ath: Regpair used: 0x37
[65695.448972] ath: regdomain 0x833a dynamically updated by country IE
[67746.390391] wlan0: disassociated from <MAC C-03 VM527231-2G> (Reason: 8)
[67746.437355] wlan0: deauthenticating from <MAC C-03 VM527231-2G> by local choice (reason=3)
[67749.597901] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[67754.277876] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[67755.672057] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[67756.449037] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[67758.597729] wlan0: authenticate with <MAC C-03 VM527231-2G>
[67758.615478] wlan0: send auth to <MAC C-03 VM527231-2G> (try 1/3)
[67758.734744] wlan0: send auth to <MAC C-03 VM527231-2G> (try 2/3)
[67758.857722] wlan0: send auth to <MAC C-03 VM527231-2G> (try 3/3)
[67758.967333] wlan0: authentication with <MAC C-03 VM527231-2G> timed out
[67763.656998] wlan0: authenticate with <MAC C-03 VM527231-2G>
[67763.674284] wlan0: send auth to <MAC C-03 VM527231-2G> (try 1/3)
[67763.676515] wlan0: authenticated
[67763.680470] wlan0: associate with <MAC C-03 VM527231-2G> (try 1/3)
[67763.684892] wlan0: RX AssocResp from <MAC C-03 VM527231-2G> (capab=0x411 status=0 aid=1)
[67763.684956] wlan0: associated
[67763.684998] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

	======== Done ========
Last edited by charlieg on Mon Jun 30, 2014 7:29 am, edited 1 time in total.

JeremyB
Level 18
Level 18
Posts: 8254
Joined: Fri Feb 21, 2014 8:17 am

Re: My wifi is sick - ath9k / AR9485 unstable connection

Post by JeremyB » Mon Jun 30, 2014 7:00 am

charlieg wrote:OK will do shortly. Still, that doesn't explain why WICD works pretty well (almost no dropping out now) while using Network Manager results in a practically unusable connection.
I think WICD works better with TKIP than network manager does. One day I will see if I can switch my hotspot over to TKIP from the control panel and see what issues it might cause

charlieg
Level 2
Level 2
Posts: 50
Joined: Tue Dec 31, 2013 8:02 am

Re: My wifi is sick - ath9k / AR9485 unstable connection

Post by charlieg » Mon Jun 30, 2014 7:04 am

I noticed a bunch of IPv6 messages in there. I thought I'd disabled that (forgot to add that to my original post - will do).

JeremyB
Level 18
Level 18
Posts: 8254
Joined: Fri Feb 21, 2014 8:17 am

Re: My wifi is sick - ath9k / AR9485 unstable connection

Post by JeremyB » Mon Jun 30, 2014 8:36 am

You might want to check the crda file

Code: Select all

sudo gedit /etc/default/crda
at the bottom of the file it will say REGDOMAIN=
Make it say GB as I think it probably 00

And it might not hurt to add

Code: Select all

options cfg80211 ieee80211_regdom=GB
to your /etc/modprobe.d/ath9k.conf

charlieg
Level 2
Level 2
Posts: 50
Joined: Tue Dec 31, 2013 8:02 am

Re: My wifi is sick - ath9k / AR9485 unstable connection

Post by charlieg » Mon Jun 30, 2014 9:07 am

Done both. At work now (where I'm next to the router so usually the connection is OK - would still drop out but less disruptively) also still using WICD (I will test with Network Manager a bit later and also when I get home).

Thanks for your help so far.

Regarding the regdomain / GB, it did seem to be picking this up previously (seen it several times in dmesg/syslog plus in the output from your wireless script, quoted below) but I figured it wouldn't hurt to add it as per your instructions.

Code: Select all

[ 8038.897649] ath: EEPROM regdomain: 0x833a
[ 8038.897654] ath: EEPROM indicates we should expect a country code
[ 8038.897657] ath: doing EEPROM country->regdmn map search
[ 8038.897659] ath: country maps to regdmn code: 0x37
[ 8038.897661] ath: Country alpha2 being used: GB
Last edited by charlieg on Mon Jun 30, 2014 9:17 am, edited 2 times in total.

ktheking
Level 4
Level 4
Posts: 430
Joined: Tue May 13, 2014 9:13 am

Re: My wifi is sick - ath9k / AR9485 unstable connection

Post by ktheking » Mon Jun 30, 2014 9:16 am

The guy in this thread might have struck gold : http://forums.linuxmint.com/viewtopic.php?f=53&t=171718

My theory is the following :

With the latest release (maybe the earlier ones too) ,have the opensource wifi drivers gained the upperhand when assigned to hardware. The drivers from the vendors don't play along anymore.

So you could use the technique described in this thread to blacklist the opensource driver,and next to it install your own driver that is better made for it,and force the system to use that driver.

charlieg
Level 2
Level 2
Posts: 50
Joined: Tue Dec 31, 2013 8:02 am

Re: My wifi is sick - ath9k / AR9485 unstable connection

Post by charlieg » Mon Jun 30, 2014 9:42 am

@ktheking Sorry that's the wrong brand of driver; this is for a Qualcomm Atheros AR9485 Wireless Network Adapter, not a Broadcom one.

ktheking
Level 4
Level 4
Posts: 430
Joined: Tue May 13, 2014 9:13 am

Re: My wifi is sick - ath9k / AR9485 unstable connection

Post by ktheking » Mon Jun 30, 2014 10:04 am

Correct ,but it's very likely that the same reason why the broadcom opensource driver is loaded every time ,instead of the installed vendor driver ,might be the same rootcause for your card. Just replace all the lines mentioning Broadcom with Quallcom.
So in short I'm suggesting that in the end the wrong driver is loaded for your card.

Here they suggest to download ,and install the latest backported one : http://superuser.com/questions/685361/a ... linux-mint

JeremyB
Level 18
Level 18
Posts: 8254
Joined: Fri Feb 21, 2014 8:17 am

Re: Re: My wifi is sick - ath9k / AR9485 unstable connection

Post by JeremyB » Mon Jun 30, 2014 10:42 am

charlieg wrote:Done both. At work now (where I'm next to the router so usually the connection is OK - would still drop out but less disruptively) also still using WICD (I will test with Network Manager a bit later and also when I get home).

Thanks for your help so far.

Regarding the regdomain / GB, it did seem to be picking this up previously (seen it several times in dmesg/syslog plus in the output from your wireless script, quoted below) but I figured it wouldn't hurt to add it as per your instructions.

Code: Select all

[ 8038.897649] ath: EEPROM regdomain: 0x833a
[ 8038.897654] ath: EEPROM indicates we should expect a country code
[ 8038.897657] ath: doing EEPROM country->regdmn map search
[ 8038.897659] ath: country maps to regdmn code: 0x37
[ 8038.897661] ath: Country alpha2 being used: GB
I saw that too but a few times I saw 00 instead. There is a discussion on ubuntuforums I need to read as some think the other entries are important

charlieg
Level 2
Level 2
Posts: 50
Joined: Tue Dec 31, 2013 8:02 am

Re: My wifi is sick - ath9k / AR9485 unstable connection

Post by charlieg » Mon Jun 30, 2014 11:18 am

@ktheking As far as I can tell (from this list at least) the open source and vendor drivers are one and the same.

charlieg
Level 2
Level 2
Posts: 50
Joined: Tue Dec 31, 2013 8:02 am

Re: Re: My wifi is sick - ath9k / AR9485 unstable connection

Post by charlieg » Mon Jun 30, 2014 4:57 pm

JeremyB wrote:There is a discussion on ubuntuforums I need to read as some think the other entries are important
Got a link so I can peruse too? :D

JeremyB
Level 18
Level 18
Posts: 8254
Joined: Fri Feb 21, 2014 8:17 am

Re: Re: My wifi is sick - ath9k / AR9485 unstable connection

Post by JeremyB » Mon Jun 30, 2014 6:50 pm

charlieg wrote:
JeremyB wrote:There is a discussion on ubuntuforums I need to read as some think the other entries are important
Got a link so I can peruse too? :D
Sure, I had to look for it, but here it is. http://ubuntuforums.org/showthread.php? ... st13061444

I thought some of the frequency examples were compelling enough

charlieg
Level 2
Level 2
Posts: 50
Joined: Tue Dec 31, 2013 8:02 am

Re: [SOLVED] Wifi unreliable - ath9k/AR9485 unstable connect

Post by charlieg » Tue Jul 01, 2014 6:55 pm

I'll have to come back to this next week as I need to do some work then am away Thursday to Sunday.

limuhob
Level 1
Level 1
Posts: 2
Joined: Mon Jul 28, 2014 7:29 am

Re: [SOLVED] Wifi unreliable - ath9k/AR9485 unstable connect

Post by limuhob » Mon Jul 28, 2014 7:36 am

Hi guys.

In my case, I have finally solved the problem by turning the WIFI router mode to b/g instead of b/g/n.

Hooray

charlieg
Level 2
Level 2
Posts: 50
Joined: Tue Dec 31, 2013 8:02 am

Re: [SOLVED] Wifi unreliable - ath9k/AR9485 unstable connect

Post by charlieg » Sat Aug 30, 2014 7:56 pm

I started having issues again. I tried turning off 5G (n) but that did nothing for me.

No, the issue was that I'd started rebooting rather than just suspending my laptop, and network-manager was coming back on in the background and wreaking havoc.

Instructions for disabling network-manager on boot are added.

Post Reply

Return to “Hardware Support”