Bug 42877

Summary: ath9k - Wireless connection randomly drops
Product: Drivers Reporter: Laurent Dinclaux (laurent)
Component: network-wirelessAssignee: drivers_network-wireless (drivers_network-wireless)
Status: NEW ---    
Severity: high CC: acelan, alexander, blogmp3place, christian.blaicher, ciberguerra, dajoker, dev, egeorget, florin.arjocu, frysadpromo1, herr.ernst, k2718, kortrax11, linville, mark, neycho.mihov, qbanin, ratnam.rachuri, sawbona, sean, shafi.wireless, sujith, sworddragon2, szg00000
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 3.3RC6 Subsystem:
Regression: Yes Bisected commit-id:
Bug Depends on:    
Bug Blocks: 56331    

Description Laurent Dinclaux 2012-03-06 21:27:06 UTC
This an old problem that oneiric had in its early days. 

The wifi connection randomly drops. Sometimes it reconnects itself (after asking for the WPA key again ...), but most of time it is needed to deactivate/activate wireless networking from Network Manager or, when it doesn't do the trick, I need to turn off/on wireless networks using the hw switch.

Tested on 3.2.0 and 3.3 RC6.

The original bug report: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/945379

I think the driver used is ath9k.

I didn't have the issue in oneiric using the latest kernel available from here: http://kernel.ubuntu.com/~kernel-ppa/mainline/ , which was v3.2-rc4.
Comment 1 conualfy 2012-03-19 02:00:31 UTC
It might help you with tracking this if you know that it is a very old and nasty bug, I could see it during the last few Ubuntu versions.

I get it once in a while (minutes/hours, depending on how much traffic I make); it disconnects the Wifi (WPA2) connection and I cannot connect back to it (asks for wlan key but it cannot connect no matter of the key). Usually a restart either of the router, or of the ubuntu system makes it work again (until it disconnects again) (haven't tried disabling&enabling the adapter since Natty).

I use the latest official launched kernel on Oneiric (3.0.0-16-generic) and all updates up-to-date.

sudo lspci -v -s 02:00.0 |egrep -v 'Serial Number'
02:00.0 Network controller: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) (rev 01)
 Subsystem: Lite-On Communications Inc Device 6611
 Flags: bus master, fast devsel, latency 0, IRQ 17
 Memory at d4400000 (64-bit, non-prefetchable) [size=64K]
 Capabilities: [40] Power Management version 3
 Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit-
 Capabilities: [60] Express Legacy Endpoint, MSI 00
 Capabilities: [100] Advanced Error Reporting
 Capabilities: [140] Virtual Channel
 Capabilities: [170] Power Budgeting <?>
 Kernel driver in use: ath9k
 Kernel modules: ath9k

uname -a
Linux florin-Satellite-C650 3.0.0-16-generic #29-Ubuntu SMP Tue Feb 14 12:48:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
Comment 2 Zhang Rui 2012-03-19 08:52:44 UTC
I do not know why you file the bug report against ACPI but now I'll reassign it to the wireless experts. :p
Comment 3 conualfy 2012-04-12 10:47:56 UTC
Yes, it is a very old and nasty bug, I could see it during the last Ubuntu versions.

This bug makes a linux system totally unreliable for long automated run or for any kind of larger/faster downloads (I can never download torrents without hardware restarting my router at least once) using wifi connection.


I get it once in a while (minutes/hours, depending on how much traffic I make); it disconnects the Wifi (WPA2) connection and I cannot connect back to it. Usually a restart either of the router, or of the ubuntu system makes it work again (until it disconnects again). I can't restart the computer each time I lose connection and but restarting the router is clearly faster.


I use the latest official launched kernel on Oneiric (3.0.0-17-generic) and all updates up-to-date.

sudo lspci -v -s 02:00.0 |egrep -v 'Serial Number'
02:00.0 Network controller: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) (rev 01)
 Subsystem: Lite-On Communications Inc Device 6611
 Flags: bus master, fast devsel, latency 0, IRQ 17
 Memory at d4400000 (64-bit, non-prefetchable) [size=64K]
 Capabilities: [40] Power Management version 3
 Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit-
 Capabilities: [60] Express Legacy Endpoint, MSI 00
 Capabilities: [100] Advanced Error Reporting
 Capabilities: [140] Virtual Channel
 Capabilities: [170] Power Budgeting <?>
 Kernel driver in use: ath9k
 Kernel modules: ath9k

uname -a
3.0.0-17-generic #30-Ubuntu SMP Thu Mar 8 20:45:39 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
Comment 4 conualfy 2012-04-12 10:52:44 UTC
If you need any debugging data while the bug occurs, please say.
Comment 5 conualfy 2012-05-04 19:07:50 UTC
I run Precise Pangolin (Ubuntu 12.04) for almost one week already and I can add more data.

uname -a
Linux florin-Satellite-C650 3.2.0-24-generic #37-Ubuntu SMP Wed Apr 25 08:43:22 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

So, in kernel version 3.2* the bug is still there.
Comment 6 Ruediger Helsch 2012-06-11 17:02:30 UTC
I observe the same problem in a freshly installed Debian Wheezy with kernel 3.2.0-2-amd64. The WLAN stick is a TP-Link TL-WN821N. It is reported as AR9287 Rev:2 and uses the ath9k_htc driver and htc_7010.fw. The interesting thing is I am able to reliably reproduce the problem: if I send a huge file to another computer on the same WLAN router, after a few minutes the system hangs without syslog message. Pulling out the USB stick and plugging it in again resets the driver, and it works until a few minutes later it hangs again.

As long as I mostly read data through the WLAN, everything works for hours.

Maybe this information helps reproduce the problem.

Regards, Rüdiger
Comment 7 shafi 2012-06-23 13:42:01 UTC
(In reply to comment #6)
> I observe the same problem in a freshly installed Debian Wheezy with kernel
> 3.2.0-2-amd64. The WLAN stick is a TP-Link TL-WN821N. It is reported as
> AR9287
> Rev:2 and uses the ath9k_htc driver and htc_7010.fw. The interesting thing is
> I
> am able to reliably reproduce the problem: if I send a huge file to another
> computer on the same WLAN router, after a few minutes the system hangs
> without
> syslog message. Pulling out the USB stick and plugging it in again resets the
> driver, and it works until a few minutes later it hangs again.
> 
> As long as I mostly read data through the WLAN, everything works for hours.
> 
> Maybe this information helps reproduce the problem.
> 
> Regards, Rüdiger

for ath9k_htc it could be
http://permalink.gmane.org/gmane.linux.kernel.wireless.general/93099
Comment 8 Laurent Dinclaux 2012-07-23 10:25:20 UTC
The options ath9k nohwcrypt=1 workaround some suggested doesn't fix the issue. It is very anoying when developing using eclipse over the network ...
Comment 9 dajoker 2012-09-02 00:03:23 UTC
I stumbled upon this while trying to find out more about my current issue and believe it may be the same.  I'm using OpenSUSE 12.2 with 3.4.6-2.10-desktop kernel on a new box.  My old box, with an older kernel, did not exhibit this problem nearly as reliably as this machine though this machine is a higher performer in every way.  A few odd things that MAY help with either confirming I am seeing the same issue or hopefully work toward bug resolution.

1.  Wired connections do not exhibit the problem, obviously (I am also using WPA2 with a passphrase).
2.  The problem happens on this computer when other wireless connections (Android phone, another laptop) are all fine, so my WAP and network both seem to be fine.
3.  I cannot duplicate it right now sitting five feet from the WAP, or at least it's hard to duplicate.  If I move upstairs to another part of the house where I usually sit I can duplicate it reliably.  I also have not seen this while on other networks, though that's only happened a couple times since I set this up.
4.  Duplication involves doing what may be slightly bandwidth intensive.  I"m not moving big files between boxes but if I start a good-sized download, or load an IM client that needs to send a few hundred contacts to the server for status checking, the connection goes.  My current 100% duplication method is to connect Pidgin to a couple of services.
5.  Wireless device per 'lspci': 04:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8188CE 802.11b/g/n WiFi Adapter (rev 01)
6.  I've taken a LAN trace and I do not see anything particularly alarming other than a lack of any data coming back from the router/WAP MAC address after the problem starts.  Once in a while things will resume on their own if I am VERY patient.  I saw a bug recently on an ICMP redirect problem but I do not see ICMP redirects anywhere in my LAN trace so I think that is unrelated.
7.  My old laptop is running OpenSUSE 12.1, I think using an Intel card, using a kernel closer to 3.1.10, and does not exhibit the problem for whatever combination of reasons.

If there are any tests or data I can get please let me know.
Comment 10 Sean Qureshi 2012-09-28 08:31:57 UTC
Let me try making a patch to replace the module with the one from 2.6.34.13, to see if that's the reason for the problem and not say...wpa_supplicant. I'm away from my laptop now, but if I get any time ill make that patch.
Comment 11 conualfy 2012-09-30 14:51:45 UTC
You might alse be interested on the report I submitted on Ubuntu bug system:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/945379/comments/24

There are some strange things happening in my system, pinging a direct ip works, domain names do not work.
Comment 12 conualfy 2012-09-30 14:52:56 UTC
PS> the complete thread is here: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/945379
Comment 13 Christian Blaicher 2012-10-02 10:25:12 UTC
The bug still occurs on Ubuntu 12.10. Using the wireless driver from Realtek fixes the wireless. But the driver only works up to Kernel 3.2.x. Therefore I have to stuck at Kernel 3.2.X.

Is there any way to downgrade the wireless kernel module?
Comment 14 John W. Linville 2012-10-02 13:46:39 UTC
What does Realtek have to do with a bug report about ath9k?  Please open another bug specific to your own issue.  Not all problems are the same...
Comment 15 Qu Bit 2012-10-31 17:47:15 UTC
problem still there

Samsung NP535U4C-S01DE
Ubuntu Precise Pangolin 12.04 x64
Linux XYZ 3.2.0-32-generic #51-Ubuntu SMP Wed Sep 26 21:33:09 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
Network controller: Atheros Communications Inc. AR9462 Wireless Network Adapter (rev 01)

anyone able to fix this/has a fix?
Comment 16 AceLan Kao 2012-12-17 07:15:20 UTC
I encountered the same problem with AR9462 chip.
It's hard to connect to the AP, and using nohwcrypt=1 option doesn't help.
What kind of information should I provide to help the developer to analyze the problem.
Comment 17 qbanin 2013-01-03 12:02:47 UTC
Same problem here @Debian Wheezy:

uname -a:

Linux COMPAL 3.7.1-ck1-qba2 #2 SMP PREEMPT Wed Jan 2 00:02:55 CET 2013 x86_64 GNU/Linux


lspci -vvv |grep Atheros:

0c:00.0 Network controller: Atheros Communications Inc. AR5418 Wireless Network Adapter [AR5008E 802.11(a)bgn] (PCI-Express) (rev 01)
Comment 18 Marco Gulino 2013-06-10 17:08:03 UTC
Exact same problem here, with two different cards: netgear wna1100 (usb, Atheros AR9271), and a PCI-e TL-WN881ND (Atheros AR9287).

If I can do anything to help solving this, just let me know (I am a software developer as well, although user-space only, so just tell me what can I do).
Comment 19 Mark Lee 2013-06-17 23:25:35 UTC
I had the same problem with my TPlink WN821N; I posted my issue with the ath9k mailing list and received this response (I only lost connection when using WPA2): 

>That kinda points at the rekey or the crypto handling in general.

>Please find and enable hostapd logging on your AP. I've seen and fixed
>bugs in freebsd recently where traffic would fill up buffers and cause
>the EAPOL rekey packets to get discarded by the driver. Thus a group
>rekey would fail, and the unit would be disconnected.
>
>
>
>adrian
Comment 20 qbanin 2013-06-20 12:11:54 UTC
(In reply to comment #19)
> I had the same problem with my TPlink WN821N; I posted my issue with the
> ath9k
> mailing list and received this response (I only lost connection when using
> WPA2): 
> 
> >That kinda points at the rekey or the crypto handling in general.
> 
> >Please find and enable hostapd logging on your AP. I've seen and fixed
> >bugs in freebsd recently where traffic would fill up buffers and cause
> >the EAPOL rekey packets to get discarded by the driver. Thus a group
> >rekey would fail, and the unit would be disconnected.
> >
> >
> >
> >adrian

I'm experiencing the same problem with Qualcomm Atheros AR9462 Wireless Network Adapter (rev 01) and TL-WR1042ND (Wireless N + WPA2 + AES). Downloading works fine, but as soon as I begin upload (trasmit) my connection speed drop down to 0b/s. The only way to fix this is switching AES to TKIP at cost of transmission speed (54Mb/s instead of 300).

This is a regression bug of 3.9.x kernels. The 3.8.13 works fine with this configuration.
Comment 21 agapito 2013-07-16 08:04:12 UTC
This bug is still present in 3.10.1. It's pretty annoying.
Comment 22 LeoManf 2013-08-16 14:03:54 UTC
I had the same issue with Atheros AR9285 in Asus eepc 1215B with only a few access points.


[root@hal9000 ~]# lspci -v

01:00.0 Network controller: Qualcomm Atheros AR9285 Wireless Network Adapter (PCI-Express) (rev 01)
	Subsystem: Foxconn International, Inc. Device e049
	Flags: bus master, fast devsel, latency 0, IRQ 16
	Memory at fea00000 (64-bit, non-prefetchable) [size=64K]
	Capabilities: [40] Power Management version 3
	Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit-
	Capabilities: [60] Express Legacy Endpoint, MSI 00
	Capabilities: [100] Advanced Error Reporting
	Capabilities: [140] Virtual Channel
	Capabilities: [160] Device Serial Number 00-00-11-ff-aa-24-11-00
	Capabilities: [170] Power Budgeting <?>
	Kernel driver in use: ath9k
Comment 23 conualfy 2013-08-16 14:25:39 UTC
In the last few weeks I've been using an older router with 802.11g connection and I did not see this bug. Cannot be sure, but I start thinking it is a bug with 802.11n
Comment 24 LeoManf 2013-08-16 14:37:17 UTC
Yes conualfy, my home router is very old. He has a 802.11g connection and my card Atheros AR9285 works fine!!
But i have some issues with newer APs or routers.
Comment 25 qbanin 2013-08-16 14:50:39 UTC
This issue is definitely "N" related.
Comment 26 conualfy 2013-08-16 14:52:30 UTC
@LeoManf - It seems we share the same card - Atheros Communications Inc. AR9285 and the same problem with newer routers, not the older ones. When it happens, I have to reset the router to make it work again, it seems to be the only thing that works (for a while).
Comment 27 Sujith 2013-09-09 02:20:07 UTC
(In reply to conualfy from comment #26)
> @LeoManf - It seems we share the same card - Atheros Communications Inc.
> AR9285 and the same problem with newer routers, not the older ones. When it
> happens, I have to reset the router to make it work again, it seems to be
> the only thing that works (for a while).

Using the latest backports release, do you still see the issue ?
http://www.kernel.org/pub/linux/kernel/projects/backports/2013/08/02/backports-20130802.tar.bz2
Comment 28 Christian Stadelmann 2013-09-09 19:14:20 UTC
I am on Fedora 19 x86_64 having the same problem with a TP-Link TL-WN821N v3 (Atheros AR7010+AR9287, USB Device ID: 0cf3:7015). This device is overheating every time I transfer much data over WLAN (>60°C) and then the connection drops or times out. Sometimes I even get system freezes or kernel panics I can't read. Seems like a power management issue to me. I don't know if this helps but I just got a kernel oops with the same device on suspend: https://bugzilla.redhat.com/show_bug.cgi?id=997608 

@Sujith: Are those included in standard 3.10 Kernels? I still see this issue using the latest 3.10 kernel on Fedora.
Comment 29 conualfy 2013-09-09 19:21:44 UTC
@Sujith - how should I install it? (standard process aka make, make install?)
Comment 30 qbanin 2013-09-09 19:50:01 UTC
This bug seems to be fixed in 3.11 (not problem so far).
Comment 31 Sujith 2013-09-10 07:52:02 UTC
(In reply to conualfy from comment #29)
> @Sujith - how should I install it? (standard process aka make, make install?)

https://backports.wiki.kernel.org/index.php/Documentation

These should do:

make defconfig-ath9k
make -j 4
sudo make install

Reboot.
Comment 32 Sujith 2013-09-10 07:57:06 UTC
(In reply to Christian Stadelmann from comment #28)
> I am on Fedora 19 x86_64 having the same problem with a TP-Link TL-WN821N v3
> (Atheros AR7010+AR9287, USB Device ID: 0cf3:7015). This device is
> overheating every time I transfer much data over WLAN (>60°C) and then the
> connection drops or times out. Sometimes I even get system freezes or kernel
> panics I can't read. Seems like a power management issue to me. I don't know
> if this helps but I just got a kernel oops with the same device on suspend:
> https://bugzilla.redhat.com/show_bug.cgi?id=997608 
> 
> @Sujith: Are those included in standard 3.10 Kernels? I still see this issue
> using the latest 3.10 kernel on Fedora.

The AR7010+AR9287 uses a different driver, ath9k_htc. This bugreport is related to ath9k.

There was a fix I sent a long time ago to address heating problems with UB94:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=69bdacc8fbac32e4dc804ab13cafe3c1bbdcba9d

But, maybe it wasn't sufficient - ath9k_htc hasn't had much love in a while. :)
Comment 33 conualfy 2013-09-10 08:25:44 UTC
I have run the commands you wrote here and it seems to have installed (did not get visible errors, just some notices). I will test it with 802.11N (802.11g  connection was working fine) during the following days (have to change back to the newer router).

Is there a way to know which driver version is running?


(In reply to Sujith from comment #31)
> (In reply to conualfy from comment #29)
> > @Sujith - how should I install it? (standard process aka make, make
> install?)
> 
> https://backports.wiki.kernel.org/index.php/Documentation
> 
> These should do:
> 
> make defconfig-ath9k
> make -j 4
> sudo make install
> 
> Reboot.
Comment 34 Christian Stadelmann 2013-09-10 09:16:46 UTC
@Sujith: Sorry. I reported a separate issue: https://bugzilla.kernel.org/show_bug.cgi?id=61111 .
#6 and #19 refer to the same chipset (AR7010+AR9287) so I think they belong to that bug too.
Comment 35 Sujith 2013-09-10 10:13:53 UTC
(In reply to conualfy from comment #33)
> I have run the commands you wrote here and it seems to have installed (did
> not get visible errors, just some notices). I will test it with 802.11N
> (802.11g  connection was working fine) during the following days (have to
> change back to the newer router).
> 
> Is there a way to know which driver version is running?

The driver from the "updates " folder should be used:

$ modinfo -n ath9k
/lib/modules/3.8.0-30-generic/updates/drivers/net/wireless/ath/ath9k/ath9k.ko

$ dmesg | grep -i backport
Loading modules backported from Linux version next-20130802-0-g466d32e
Backport generated by backports.git backports-20130802-0-gdb67a3f
Comment 36 neycho 2014-09-27 07:35:03 UTC
I can confirm that the bug exists at the latest Ubuntu / Mint LTS

uname -a : 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Comment 37 sworddragon2 2015-03-09 11:05:54 UTC
I'm seeing this issue too on Linux 3.19.0 with an AR9285 chip. On sniffing the network (WPA2 encrypted) with Wireshark:

- If the problem appears pinging another client (B) results that B successfully receives the request but the reply from B is not seen by A (client affected by this bug).
- Switching into monitor mode (sniffing all packages from any network) results that I'm not noticing any receiving issues.
- I was not able to reproduce this issue with an AR9485 chip.
Comment 38 Thorwars 2016-03-29 19:29:13 UTC
I appear to have this random bug also. It usually occurs when coming out of hibernation or waking up the Laptop after closing the lid. However I have experienced this bug anytime while browsing the Internet.
I attempted this fix which did not work in my case:
http://www.webupd8.org/2013/01/fix-wireless-or-wired-network-not.html
That actually makes it attempt to reconnect after disconnection and the reconnection always fails.

I do not know what backport is specifically. I have not attempted backport. I want my system to stay up to date.

In my case both network adapters are Atheros but I only use the WiFi. I am a road warrior and connect to many different Free WiFi places. I do not want to slow down my home router either to G when N is faster. If N is the problem please fix it already. It appears this issue has been around for decades.

Any assistance is appreciated. My information is copy/pasted below.

Acer Aspire ONE

lspci -nn | grep Network
02:00.0 Network controller [0280]: Qualcomm Atheros AR9285 Wireless Network Adapter (PCI-Express) [168c:002b] (rev 01)

uname -a
Linux 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:31:42 UTC 2014 i686 i686 i686 GNU/Linux

modinfo -n ath9k
/lib/modules/3.13.0-24-generic/kernel/drivers/net/wireless/ath/ath9k/ath9k.ko

dmesg | grep -i backport
Nothing listed

sudo lshw -C network

  *-network
       description: Wireless interface
       product: AR9285 Wireless Network Adapter (PCI-Express)
       vendor: Qualcomm Atheros
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: wlan0
       version: 01
       serial: ##:##:##:##:##:##
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=ath9k driverversion=3.13.0-24-generic firmware=N/A ip=192.168.0.4 latency=0 link=yes multicast=yes wireless=IEEE 802.11bgn
       resources: irq:17 memory:56000000-5600ffff

 *-network               
       description: Ethernet interface
       product: AR8132 Fast Ethernet
       vendor: Qualcomm Atheros
       physical id: 0
       bus info: pci@0000:01:00.0
       logical name: eth0
       version: c0
       serial: ##:##:##:##:##:##
       capacity: 100Mbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vpd bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=atl1c driverversion=1.0.1.1-NAPI latency=0 link=no multicast=yes port=twisted pair
       resources: irq:45 memory:57000000-5703ffff ioport:5000(size=128)

lsmod | grep ath
dm_multipath           22402  0 
scsi_dh                14458  1 dm_multipath
ath9k                 144602  0 
ath9k_common           13359  1 ath9k
ath9k_hw              438205  2 ath9k_common,ath9k
ath                    23922  3 ath9k_common,ath9k,ath9k_hw
mac80211              545990  1 ath9k
cfg80211              409394  3 ath,ath9k,mac80211

rfkill list
0: phy0: Wireless LAN
	Soft blocked: no
	Hard blocked: no
1: acer-wireless: Wireless LAN
	Soft blocked: no
	Hard blocked: no


inxi -Fx
System:    Host: ComputerName Kernel: 3.13.0-24-generic i686 (32 bit, gcc: 4.8.2) Desktop: Gnome Distro: Linux Mint 17 Qiana
Machine:   Mobo: Acer model: AO532h version: V1.21 Bios: Acer version: V1.21 date: 03/17/2010
CPU:       Single core Intel Atom CPU N450 (-HT-) cache: 512 KB flags: (lm nx sse sse2 sse3 ssse3) bmips: 3325.11 
           Clock Speeds: 1: 1333.00 MHz 2: 1000.00 MHz
Graphics:  Card: Intel Atom Processor D4xx/D5xx/N4xx/N5xx Integrated Graphics Controller bus-ID: 00:02.0 
           X.Org: 1.15.1 drivers: intel (unloaded: fbdev,vesa) Resolution: 1024x600@60.1hz 
           GLX Renderer: Mesa DRI Intel IGD x86/MMX/SSE2 GLX Version: 1.4 Mesa 10.1.0 Direct Rendering: Yes
Audio:     Card: Intel NM10/ICH7 Family High Definition Audio Controller driver: snd_hda_intel bus-ID: 00:1b.0
           Sound: Advanced Linux Sound Architecture ver: k3.13.0-24-generic
Network:   Card-1: Qualcomm Atheros AR9285 Wireless Network Adapter (PCI-Express) driver: ath9k bus-ID: 02:00.0
           IF: wlan0 state: up mac: ##:##:##:##:##:##
           Card-2: Qualcomm Atheros AR8132 Fast Ethernet driver: atl1c ver: 1.0.1.1-NAPI port: 5000 bus-ID: 01:00.0
           IF: eth0 state: down mac: ##:##:##:##:##:##
Drives:    HDD Total Size: 240.1GB (67.5% used) 1: id: /dev/sda model: Corsair_Force_LS size: 240.1GB 
Partition: ID: / size: 219G used: 151G (73%) fs: ext4 ID: swap-1 size: 1.06GB used: 0.00GB (0%) fs: swap 
RAID:      No RAID devices detected - /proc/mdstat and md_mod kernel raid module present
Sensors:   System Temperatures: cpu: 41.0C mobo: N/A 
           Fan Speeds (in rpm): cpu: N/A 
Info:      Processes: 144 Uptime: 2:23 Memory: 465.7/991.4MB Runlevel: 2 Gcc sys: 4.8.4 Client: Shell inxi: 1.8.4
Comment 39 Julius Henry Marx 2016-09-24 13:29:02 UTC
Hello:

I have what seems to be the same problem:

In my case the situation is more or less what has been posted here (since 2012!).

I can sum it up as what is posted at Comment 3:

"I get it once in a while (minutes/hours, depending on how much traffic I make); it disconnects the Wifi (WPA2) connection and I cannot connect back to it. Usually a restart either of the router, or of the ubuntu system makes it work again (until it disconnects again). I can't restart the computer each time I lose connection and but restarting the router is clearly faster."

First it drops the transmission/reception of the signal and then the connection to the WiFi router is lost.

I can recover it by disconnecting/connecting the USB adapter (unplugging the cable) and it does not ask for credentials to connect.

Unfortunately, I have not been able to reproduce the problem at will but it crops up after a good while when streaming a movie or large downloads.

At first I thought it was the D-Link DIR-600 router so I changed it for a Linksys E900: same problem.

I share the WiFi with a neighbour (his link is Ethernet 10/100) and when I get cut off, he does not have the problem, so it's not the router or the ISP.  

My system is up to date and the firmware Mint 18 is using is:

/lib/firmware/ath9k_htc/htc_7010-1.4.0.fw
/lib/firmware/ath9k_htc/htc_9271-1.4.0.fw

System data as follows:

code

groucho@groucho ~ $ lsusb
Bus 003 Device 003: ID 0cf3:7015 Atheros Communications, Inc. TP-Link TL-WN821N v3 / TL-WN822N v2 802.11n [Atheros AR7010+AR9287]

groucho@groucho ~ $ uname -a
Linux groucho 4.4.0-28-generic #47-Ubuntu SMP Fri Jun 24 10:09:13 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

groucho@groucho ~ $ sudo lshw -C network
*-network
description: Wireless interface
physical id: 1
bus info: usb@3:3
logical name: wlx647002073edd
serial: 00:00:00:00:0n:nn
capabilities: ethernet physical wireless
configuration: broadcast=yes
driver=ath9k_htc 
driverversion=4.4.0-28-generic 
firmware=1.4 ip=192.168.1.100 
link=yes multicast=yes 
wireless=IEEE 802.11bgn

groucho@groucho ~ $ lsmod | grep ath
ath9k_htc     77824  0
ath9k_common  36864  1 ath9k_htc
ath9k_hw      466944  2 ath9k_common,ath9k_htc
ath           32768  3 ath9k_common,ath9k_htc,ath9k_hw
mac80211      737280  1 ath9k_htc
cfg80211      565248  4 ath,ath9k_common,mac80211,ath9k_htc

groucho@groucho ~ $ rfkill list
1: phy1: Wireless LAN
	Soft blocked: no
	Hard blocked: no

/code

This is quite annoying.
Is there another driver that may be used?

Thanks in advance.
Comment 40 conualfy 2016-09-24 20:40:07 UTC
In my case, on the new laptop, I have a different wlan so it reacts a bit different: the wifi network dissapears from the list and I cannot connect it. I could find this command to force a wifi scan and it works flawlessly:

`sudo iwlist wlp13s0 scan`
(wlp13s0 is the wlan network name)

Doing that makes it connecting to the wifi automatically. I have no idea, but you should check to see if this helps.
Comment 41 Julius Henry Marx 2016-09-26 16:11:56 UTC
(In reply to conualfy from comment #40)

> I could find this command to force a wifi scan and it works flawlessly:
> `sudo iwlist wlp13s0 scan`
> (wlp13s0 is the wlan network name)
> Doing that makes it connecting to the wifi automatically. I have no idea,
> but you should check to see if this helps.

My problem is that 'after' some time without any problems, the connection drops.

Like I said, this usually happens while streaming a movie or during large downloads ie: chip working at 80 to 100% for a long time.

Otherwise it works well (logs in automatically, has good throughput,
etc.)

Betting on this being a temperature problem, I have added a small copper heatsink to the TL-WN822N v2 USB adapter's chip (the largest one inside, the AR9287?) and for the time being things seem to be working OK.

After an hour of so of just plain surfing, my IR thermometer measuring the outside of the plastic box tells me of a surface temperature of 34.5º C which to be sure translates to a much higher temperature at the chip's surface. 

How much higher? 
Have not measured it, but my guess is something between 5º and 8º C higher, at least. Could be more.

Would a surface temperature of ~ 40º C cause the AR9287 chip to hang? 

I don't know the chip's working parameters so I cannot say but I 'do' know that heat is electronic components very worst enemy and that with a heatsink and for the time being the adapter has not acted up again. 

Maybe it is a driver problem or bug which makes the chip work harder than it should?

No idea, I'm just a hardware guy.

Thanks for your input.
Comment 42 Julius Henry Marx 2016-09-28 18:47:29 UTC
(In reply to Julius Henry Marx from comment #41)
An update:

> Betting on this being a temperature problem, I have added a small copper
> heatsink to the TL-WN822N v2 USB adapter's chip (the largest one inside, the
> AR9287?) and for the time being things seem to be working OK.
Well ...
No.

This morning it happened again and I had not been too long on line.
All of a sudden my connection stalled, while the browser was stuck at "looking up ..." and the adapter's green light stayed on intead of blinking as it usually does when transmitting or receiving.

I reloaded all of the three pages I had open and it was the same.

So I unplugged the wifi adapter from it's cable, plugged it in again right away and presto! my pages reloaded and everything came back to normal.

So ...
Apparently it is not (as I thought) a heat problem, not does it happen 'only' when there's been large downloads or high load on the adapter.

Needless to say this is highly annoying, more so after seeing that it is something that dates back to quite a few years ago.

Assuming that it is (no idea, just a guess) a driver problem: is there an alternate, non-free driver to try out and see what happens?

Or is it a matter of buying yet another wifi card/adapter?

I'd appreciate any input.

Thanks in advance. 



























> 
> After an hour of so of just plain surfing, my IR thermometer measuring the
> outside of the plastic box tells me of a surface temperature of 34.5º C
> which to be sure translates to a much higher temperature at the chip's
> surface. 
> 
> How much higher? 
> Have not measured it, but my guess is something between 5º and 8º C higher,
> at least. Could be more.
> 
> Would a surface temperature of ~ 40º C cause the AR9287 chip to hang? 
> 
> I don't know the chip's working parameters so I cannot say but I 'do' know
> that heat is electronic components very worst enemy and that with a heatsink
> and for the time being the adapter has not acted up again. 
> 
> Maybe it is a driver problem or bug which makes the chip work harder than it
> should?
> 
> No idea, I'm just a hardware guy.
> 
> Thanks for your input.
Comment 43 Erwan Georget 2016-11-02 09:34:25 UTC
Hi

Got the same problem on OpenSUSE Tumbleweed.

Here is some more (useful?) info :

> dmesg

[  346.602547] ath: phy0: Failed to wakeup in 500us
[  346.811586] ath: phy0: RX failed to go idle in 10 ms RXSM=0xffffffff
[  346.822780] ath: phy0: DMA failed to stop in 10 ms AR_CR=0xffffffff AR_DIAG_SW=0xffffffff DMADBG_7=0xffffffff

> lshw -C network
  *-network                 
       description: Ethernet interface
       produit: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       fabriquant: Realtek Semiconductor Co., Ltd.
       [...]
  *-network
       description: Interface réseau sans fil
       produit: QCA9565 / AR9565 Wireless Network Adapter
       fabriquant: Qualcomm Atheros
       identifiant matériel: 0
       information bus: pci@0000:03:00.0
       nom logique: wlp3s0
       version: 01
       numéro de série: 54:27:1e:8d:33:a5
       bits: 64 bits
       horloge: 33MHz
       fonctionnalités: pm msi pciexpress bus_master cap_list rom ethernet physical wireless
       configuration: broadcast=yes driver=ath9k driverversion=4.7.5-1-default firmware=N/A ip=192.168.250.154 latency=0 link=yes multicast=yes wireless=IEEE 802.11
       ressources: irq:19 mémoire:f7800000-f787ffff mémoire:f7880000-f788ffff
  *-network
       description: Ethernet interface
       identifiant matériel: 1
       nom logique: docker0
       [...]

> lspci -v -s 03:00.0
03:00.0 Network controller: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter (rev 01)
	Subsystem: AzureWave Device 2130
	Flags: bus master, fast devsel, latency 0, IRQ 19
	Memory at f7800000 (64-bit, non-prefetchable) [size=512K]
	Expansion ROM at f7880000 [disabled] [size=64K]
	Capabilities: [40] Power Management version 2
	Capabilities: [50] MSI: Enable- Count=1/4 Maskable+ 64bit+
	Capabilities: [70] Express Endpoint, MSI 00
	Capabilities: [100] Advanced Error Reporting
	Capabilities: [140] Virtual Channel
	Capabilities: [160] Device Serial Number 00-00-00-00-00-00-00-00
	Kernel driver in use: ath9k
	Kernel modules: ath9k
Comment 44 alexander 2018-05-16 10:10:28 UTC
Some of the reports here are probably caused by PTK rekey races.
If you are affected by the bug you should check that your AP has unicast rekeying disabled to mitigate the problem. (Group rekeying is fine.)

You can verify if this is a PSK rekey problem by enabling enabling debug messages for wpa-supplicant and check if your connection freezes at the time a new PTK is installed.

Assuming you are using dbus here how you get debug information logged:
dbus-send --system --print-reply --dest=fi.w1.wpa_supplicant1 /fi/w1/wpa_supplicant1 org.freedesktop.DBus.Properties.Set string:fi.w1.wpa_supplicant1 string:DebugLevel variant:string:"msgdump"

You will get flooded with messages, but if you find "Installing PTK to the driver" at the time your connection freezes it's a safe bet that disabling psk (not group!) rekey will fix the issue for you. (Or mitigate the issue by setting it to very long intervals.)

If you don't see "Installing PTK to the driver" when initially connecting to an AP you don't get the debug messages for some reasons.

If you can link your problem to the PTK rekey race I would be interested which router you are using, if you are using WPA-PSK or WPA-EAP and if unicast rekeying was enabled by default or something you manually enabled.
Comment 45 SlayerProof32 2022-03-19 03:16:31 UTC
Still occurs on the latest Kernel 5.16.5 

See bug #215698 for more details.