Atheros Wi-Fi card does not always work after suspend

Bug #341627 reported by Thomas Hood
10
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
New
Undecided
Unassigned

Bug Description

I have a ThinkPad X61 running Jaunty. After suspend and resume the Atheros card does not always work: sometimes it works, sometimes it doesn't. In the latter case, removing and reinserting ath5k does *not* help. Thus this bug seems to be other than bug #275692. When it happens again I will add more information about the exact circumstances and symptoms.

$ lspci |grep -i ath
03:00.0 Ethernet controller: Atheros Communications Inc. AR5212 802.11abg NIC (rev 01)
$ lsmod|grep ath
ath5k 107008 0
mac80211 217080 1 ath5k
led_class 12036 2 ath5k,thinkpad_acpi
cfg80211 38032 2 ath5k,mac80211
root@triffid:~# dmidecode -s system-manufacturer
LENOVO
root@triffid:~# dmidecode -s system-product-name
7673CTO
root@triffid:~# dmidecode -s system-version
ThinkPad X61

Revision history for this message
Chris Bainbridge (chris-bainbridge) wrote :

For what it's worth, I had this problem with ath_pci and Intrepid, but with Jaunty and ath5k suspend/resume works ok. Are you sure this is a driver problem and not wpa_supplicant / NetworkManager ?

Revision history for this message
Thomas Hood (jdthood) wrote :

There is a driver problem because the ath5k driver loses the ability to control the Atheros device.

<pre>
[ 569.672373] ath5k phy1: gain calibration timeout (2412MHz)
[ 569.672383] ath5k phy1: can't reset hardware (-11)
</pre>

I do use NetworkManager, however, and the flaw in the driver may be activated by NM.

I attach a long dmesg log covering several suspend-and-resume cycles.

Revision history for this message
Chris Moschini (g-admin-soopahman-com) wrote :

There's a lot of useful history and workarounds for this bug in 2 previous bugs:
https://bugs.launchpad.net/ubuntu/+source/linux-restricted-modules/+bug/272300/
https://bugs.launchpad.net/ubuntu/+source/linux-restricted-modules/+bug/275692

I'm using Ubuntu 8.10 Intrepid on a Thinkpad T400 (Atheros chipset) using madwifi - haven't otherwise messed with the default networking setup.

madwifi works flawlessly except for this suspend issue. Specifically, resuming from suspend results in a message saying I'm not connected. Checking the list of networks shows no wifi APs available. Eventually I'm prompted for a password, which is already correctly entered. Leaving it be and click OK or reentering it and click OK both cause it to fail.

Brian's workaround fixes the glitch for me:

In /usr/lib/pm-utils/sleep.d/10NetworkManager

        hibernate|suspend)
                suspend_nm
                ;;
        thaw|resume)
                ifconfig wifi0 up <-----
                resume_nm

Add the line with the arrow pointing at it.

Without having this workaround in place, I can instead work around this issue by running the following 3 commands at a Terminal:

sudo madwifi-unload
sudo /sbin/modprobe ath_pci
sudo ifconfig wifi0 up

Revision history for this message
Chris Moschini (g-admin-soopahman-com) wrote :

A workaround that does not work - adding this:

/etc/pm/config.d/madwifi

Containing this:

SUSPEND_MODULES=ath_pci

Does not improve the situation - the bug continues to be an issue. Adding double-quotes around ath_pci doesn't help either.

Revision history for this message
Thomas Hood (jdthood) wrote :

Thanks for the ideas; but neither of the suggested workarounds is relevant to the problem reported here. There is no wifi0 interface and no ath_pci module.

<pre>
$ lsmod|grep ath
ath5k 107008 0
mac80211 217080 1 ath5k
cfg80211 38032 2 ath5k,mac80211
led_class 12036 2 ath5k,thinkpad_acpi
$ sudo ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:1d:72:96:e4:31
          inet addr:192.168.1.35 Bcast:192.168.1.255 Mask:255.255.255.0
          inet6 addr: fe80::21d:72ff:fe96:e431/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:46152 errors:0 dropped:0 overruns:0 frame:0
          TX packets:51769 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:29586383 (29.5 MB) TX bytes:6669847 (6.6 MB)
          Memory:f8200000-f8220000

lo Link encap:Local Loopback
          inet addr:127.0.0.1 Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING MTU:16436 Metric:1
          RX packets:32 errors:0 dropped:0 overruns:0 frame:0
          TX packets:32 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2208 (2.2 KB) TX bytes:2208 (2.2 KB)

pan0 Link encap:Ethernet HWaddr 72:70:57:30:93:55
          BROADCAST MULTICAST MTU:1500 Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

wlan0 Link encap:Ethernet HWaddr 00:1f:e2:86:6a:ab
          inet addr:192.168.2.101 Bcast:192.168.2.255 Mask:255.255.255.0
          inet6 addr: fe80::21f:e2ff:fe86:6aab/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:138 errors:0 dropped:0 overruns:0 frame:0
          TX packets:99 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:8220 (8.2 KB) TX bytes:13010 (13.0 KB)

wmaster0 Link encap:UNSPEC HWaddr 00-1F-E2-86-6A-AB-61-61-00-00-00-00-00-00-00-00
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
</pre>

Revision history for this message
kdemarest (kdemarest) wrote :

I have a Toshiba U305-S7448 Laptop running Jaunty. I use ath5k. I have noticed from resumes from hibernate and suspend the wlan0 isn't even visible when I do an ifconfig. Sometimes disabling networking (via right-clicking icon in tray, and checking the checkbox) will wake it up again, but sometimes I have to restart.
I will see if:
modprobe ath5k
ifconfig wlan0 up

will work next time it won't work after a suspend/hibernate resume.

Revision history for this message
kdemarest (kdemarest) wrote :

Just a thought. Have you tried gconf-editor apps > gnome-power-manager > general > network sleep?

Revision history for this message
dispiste (dispiste) wrote :

Hello Kevin,

In my case, Network sleep option is UNCHECKED in
gconf-editor apps > gnome-power-manager > general > network sleep.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.