wireless does not resume after suspend

Hello,

I use KnetworkManager for wireless. Works great except that if laptop
goes into suspend the wireless does not work after resume anymore.

NetworkManager log

Apr 27 20:24:42 linux-nfii NetworkManager[1433]: <info> (wlan0): device state change: 7 -> 8 (reason 0)
Apr 27 20:24:42 linux-nfii NetworkManager[1433]: <info> Policy set ‘Morran’ (wlan0) as default for IPv4 routing and DNS.
Apr 27 20:24:42 linux-nfii NetworkManager[1433]: <info> Activation (wlan0) successful, device activated.
Apr 27 20:24:42 linux-nfii NetworkManager[1433]: <info> Activation (wlan0) Stage 5 of 5 (IP Configure Commit) complete.
Apr 27 20:24:42 linux-nfii nm-dispatcher.action: Script ‘/etc/NetworkManager/dispatcher.d/autofs’ exited with error status 1.
Apr 27 20:24:43 linux-nfii nm-dispatcher.action: Script ‘/etc/NetworkManager/dispatcher.d/nfs’ exited with error status 2.
Apr 27 20:29:43 linux-nfii NetworkManager[1433]: <info> (wlan0): supplicant connection state: completed -> group handshake
Apr 27 20:29:43 linux-nfii NetworkManager[1433]: <info> (wlan0): supplicant connection state: group handshake -> completed
Apr 27 20:39:43 linux-nfii NetworkManager[1433]: <info> (wlan0): supplicant connection state: completed -> group handshake
Apr 27 20:39:43 linux-nfii NetworkManager[1433]: <info> (wlan0): supplicant connection state: group handshake -> completed
Apr 27 20:47:10 linux-nfii NetworkManager[1433]: <info> sleep requested (sleeping: no enabled: yes)
Apr 27 20:47:10 linux-nfii NetworkManager[1433]: <info> sleeping or disabling…
Apr 27 20:47:10 linux-nfii NetworkManager[1433]: <info> (eth0): now unmanaged
Apr 27 20:47:10 linux-nfii NetworkManager[1433]: <info> (eth0): device state change: 2 -> 1 (reason 37)
Apr 27 20:47:10 linux-nfii NetworkManager[1433]: <info> (eth0): cleaning up…
Apr 27 20:47:10 linux-nfii NetworkManager[1433]: <info> (eth0): taking down device.
Apr 27 20:47:10 linux-nfii NetworkManager[1433]: <info> (wlan0): now unmanaged
Apr 27 20:47:10 linux-nfii NetworkManager[1433]: <info> (wlan0): device state change: 8 -> 1 (reason 37)
Apr 27 20:47:10 linux-nfii NetworkManager[1433]: <info> (wlan0): deactivating device (reason: 37).
Apr 27 20:47:10 linux-nfii NetworkManager[1433]: <info> (wlan0): canceled DHCP transaction, DHCP client pid 2525
Apr 27 20:47:10 linux-nfii NetworkManager[1433]: <info> (wlan0): cleaning up…
Apr 27 20:47:10 linux-nfii NetworkManager[1433]: <info> (wlan0): taking down device.
Apr 27 20:47:11 linux-nfii nm-dispatcher.action: Script ‘/etc/NetworkManager/dispatcher.d/autofs’ exited with error status 1.
Apr 27 20:49:00 linux-nfii NetworkManager[1433]: <info> wake requested (sleeping: yes enabled: yes)
Apr 27 20:49:00 linux-nfii NetworkManager[1433]: <info> waking up and re-enabling…
Apr 27 20:49:00 linux-nfii NetworkManager[1433]: <info> (eth0): now managed
Apr 27 20:49:00 linux-nfii NetworkManager[1433]: <info> (eth0): device state change: 1 -> 2 (reason 2)
Apr 27 20:49:00 linux-nfii NetworkManager[1433]: <info> (eth0): bringing up device.
Apr 27 20:49:00 linux-nfii NetworkManager[1433]: <info> (eth0): preparing device.
Apr 27 20:49:00 linux-nfii NetworkManager[1433]: <info> (eth0): deactivating device (reason: 2).
Apr 27 20:49:00 linux-nfii NetworkManager[1433]: <info> (wlan0): now managed
Apr 27 20:49:00 linux-nfii NetworkManager[1433]: <info> (wlan0): device state change: 1 -> 2 (reason 2)
Apr 27 20:49:00 linux-nfii NetworkManager[1433]: <info> (wlan0): bringing up device.
Apr 27 20:49:00 linux-nfii NetworkManager[1433]: <info> (wlan0): deactivating device (reason: 2).
Apr 27 20:49:00 linux-nfii NetworkManager[1433]: <info> (wlan0): supplicant interface state: starting -> ready
Apr 27 20:49:00 linux-nfii NetworkManager[1433]: <info> (wlan0): device state change: 2 -> 3 (reason 42

wpa_supplicant log

CTRL-EVENT-CONNECTED - Connection to 00:22:b0:76:fd:20 completed (auth) [id=0 id_str=]
WPA: Group rekeying completed with 00:22:b0:76:fd:20 [GTK=TKIP]
WPA: Group rekeying completed with 00:22:b0:76:fd:20 [GTK=TKIP]
WPA: Group rekeying completed with 00:22:b0:76:fd:20 [GTK=TKIP]
WPA: Group rekeying completed with 00:22:b0:76:fd:20 [GTK=TKIP]
WPA: Group rekeying completed with 00:22:b0:76:fd:20 [GTK=TKIP]
WPA: Group rekeying completed with 00:22:b0:76:fd:20 [GTK=TKIP]
WPA: Group rekeying completed with 00:22:b0:76:fd:20 [GTK=TKIP]
WPA: Group rekeying completed with 00:22:b0:76:fd:20 [GTK=TKIP]
WPA: Group rekeying completed with 00:22:b0:76:fd:20 [GTK=TKIP]
WPA: Group rekeying completed with 00:22:b0:76:fd:20 [GTK=TKIP]
WPA: Group rekeying completed with 00:22:b0:76:fd:20 [GTK=TKIP]
WPA: Group rekeying completed with 00:22:b0:76:fd:20 [GTK=TKIP]
WPA: Group rekeying completed with 00:22:b0:76:fd:20 [GTK=TKIP]
CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0
Failed to initiate AP scan.
Trying to associate with 00:22:b0:76:fd:20 (SSID=‘Morran’ freq=2412 MHz)
Associated with 00:22:b0:76:fd:20
WPA: Key negotiation completed with 00:22:b0:76:fd:20 [PTK=CCMP GTK=TKIP]
CTRL-EVENT-CONNECTED - Connection to 00:22:b0:76:fd:20 completed (auth) [id=0 id_str=]
WPA: Group rekeying completed with 00:22:b0:76:fd:20 [GTK=TKIP]
CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0
Failed to initiate AP scan.
Trying to associate with 00:22:b0:76:fd:20 (SSID=‘Morran’ freq=2412 MHz)
Associated with 00:22:b0:76:fd:20
WPA: Key negotiation completed with 00:22:b0:76:fd:20 [PTK=CCMP GTK=TKIP]
CTRL-EVENT-CONNECTED - Connection to 00:22:b0:76:fd:20 completed (auth) [id=0 id_str=]
CTRL-EVENT-DISCONNECTED bssid=00:22:b0:76:fd:20 reason=0
Trying to associate with 00:22:b0:76:fd:20 (SSID=‘Morran’ freq=2412 MHz)
Associated with 00:22:b0:76:fd:20
WPA: Key negotiation completed with 00:22:b0:76:fd:20 [PTK=CCMP GTK=TKIP]
CTRL-EVENT-CONNECTED - Connection to 00:22:b0:76:fd:20 completed (reauth) [id=0 id_str=]
WPA: Group rekeying completed with 00:22:b0:76:fd:20 [GTK=TKIP]
WPA: Group rekeying completed with 00:22:b0:76:fd:20 [GTK=TKIP]
WPA: Group rekeying completed with 00:22:b0:76:fd:20 [GTK=TKIP]
CTRL-EVENT-DISCONNECTED bssid=00:22:b0:76:fd:20 reason=0
Trying to associate with 00:22:b0:76:fd:20 (SSID=‘Morran’ freq=2412 MHz)
Associated with 00:22:b0:76:fd:20
WPA: Key negotiation completed with 00:22:b0:76:fd:20 [PTK=CCMP GTK=TKIP]
CTRL-EVENT-CONNECTED - Connection to 00:22:b0:76:fd:20 completed (reauth) [id=0 id_str=]
WPA: Group rekeying completed with 00:22:b0:76:fd:20 [GTK=TKIP]
CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0
Failed to initiate AP scan.
Trying to associate with 00:22:b0:76:fd:20 (SSID=‘Morran’ freq=2412 MHz)
Associated with 00:22:b0:76:fd:20
WPA: Key negotiation completed with 00:22:b0:76:fd:20 [PTK=CCMP GTK=TKIP]
CTRL-EVENT-CONNECTED - Connection to 00:22:b0:76:fd:20 completed (auth) [id=0 id_str=]
WPA: Group rekeying completed with 00:22:b0:76:fd:20 [GTK=TKIP]
WPA: Group rekeying completed with 00:22:b0:76:fd:20 [GTK=TKIP]
WPA: Group rekeying completed with 00:22:b0:76:fd:20 [GTK=TKIP]
CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0
Failed to initiate AP scan.
Trying to associate with 00:22:b0:76:fd:20 (SSID=‘Morran’ freq=2412 MHz)
Associated with 00:22:b0:76:fd:20
WPA: Key negotiation completed with 00:22:b0:76:fd:20 [PTK=CCMP GTK=TKIP]
CTRL-EVENT-CONNECTED - Connection to 00:22:b0:76:fd:20 completed (auth) [id=0 id_str=]
WPA: Group rekeying completed with 00:22:b0:76:fd:20 [GTK=TKIP]
WPA: Group rekeying completed with 00:22:b0:76:fd:20 [GTK=TKIP]
Failed to initiate AP scan.
Trying to associate with 00:22:b0:76:fd:20 (SSID=‘Morran’ freq=2412 MHz)
Associated with 00:22:b0:76:fd:20
WPA: Key negotiation completed with 00:22:b0:76:fd:20 [PTK=CCMP GTK=TKIP]
CTRL-EVENT-CONNECTED - Connection to 00:22:b0:76:fd:20 completed (auth) [id=0 id_str=]
WPA: Group rekeying completed with 00:22:b0:76:fd:20 [GTK=TKIP]
WPA: Group rekeying completed with 00:22:b0:76:fd:20 [GTK=TKIP]
WPA: Group rekeying completed with 00:22:b0:76:fd:20 [GTK=TKIP]
CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0
Failed to initiate AP scan.
Trying to associate with 00:22:b0:76:fd:20 (SSID=‘Morran’ freq=2412 MHz)
Associated with 00:22:b0:76:fd:20
WPA: Key negotiation completed with 00:22:b0:76:fd:20 [PTK=CCMP GTK=TKIP]
CTRL-EVENT-CONNECTED - Connection to 00:22:b0:76:fd:20 completed (auth) [id=0 id_str=]
WPA: Group rekeying completed with 00:22:b0:76:fd:20 [GTK=TKIP]
WPA: Group rekeying completed with 00:22:b0:76:fd:20 [GTK=TKIP]
CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0

dmesg log is quite long so i don’t post it yet here.

OSS 11.4 KDE 4.6.0

This is a driver problem. I think you should have reported what hardware you have.

If it is not already reported, you should post this as a bug. Alternatively, you
should install compat-wireless to see if it has already been fixed upstream. If
I knew what hardware you have, I could look it up in the kernel archives, but…

Hi,

thanks for reply. wireless card is atheros AR5008

Something like a numeric ID might be better.

I guess the probability that you will get real help from the experienced people
(or even from the kernel developer who did ask you for the hardware you have)
or someone with the same device could be increased if you would read the stickies above
like:
My wireless doesn’t work - a primer on what I should do next
and post your according results here
(best between [noparse]

and

[/noparse]).

Example given I guess you (and your potential helpers) could be more sure to identify your wireless device correctly with the (hexadecimal) numeric ID by opening a terminal emulator (konsole, GNOME terminal, …)


/sbin/lspci -nnk

and using your mouse to copy and paste the section according to your wireless device here. It shall contain a numeric ID that looks at least a bit like
[168c:0023]
or
[168c:0024].

Just my thoughts being not in charge here
nor being very experienced myself…

Regards
Martin
(pistazienfresser)

Thanks for great piece of advice.
I’ll post results as soon as i get back
to my laptop

Hi again,

/sbin/lspci -nnk

07:00.0 Network controller [0280]: Atheros Communications Inc. AR5008 Wireless Network Adapter [168c:0024] (rev 01)
        Subsystem: Atheros Communications Inc. Device [168c:3072]
        Kernel driver in use: ath9k

installing compat-wireless did not help

It would be good to set debug option to ath9k in /etc/modprobe.d , set debugging in wpa_supplicant [1], restart the system, retest and post the messages and wpa_supplicant.log. Truncate the log files before reset. It would be good to open a bug in the bugzilla.novell.com to post the files.

[1]
#!/bin/bash
SERVICE=/usr/share/dbus-1/system-services/fi.epitest.hostap.WPASupplicant.service
sed -i s/"wpa_supplicant "/"wpa_supplicant -dddt "/ $SERVICE

Ok, I’ll get back to you with the info later today

Did you ever solve this? I’ve been having to mess around with a script in /etc/pm/sleep.d that unloads the driver module on sleep or hibernate and reloads it on resume or thaw. That doesn’t always work, though. But I found that using wicd in lieu of NetworkManager seemed to work about 90 percent of the time.

As I’ve gotten sick enough of kubuntu, I’ve just transitioned to openSuse and was hoping to find a real solution rather than my workaround, which I haven’t set up yet.

No, I have not solved it yet. I set up power manager so that laptop would not suspend or hibernate, just witch the screen of. Would not recommend for anyone else, cause when battery finishes system powers-off immediately and might lead to disk damage. I will give it a try later when i have time. I have feeling it is solvable because i got it working back in OSS10.3, but many summers has passed since then and things changed in OSS. All I remember that modifying /etc/pm/sleep.d didn’t give me any “fruits” back then. It was rather state of Knetworkmanager that matter back those days.

Which kernel was in use in OSS10.3? You’re right about the script in /etc/pm/sleep.d not being the golden arrow. It only works for me maybe 1 out of 10 times.

I’ve found this bug report:
https://bugzilla.kernel.org/show_bug.cgi?id=16436

I’m not sure what info they think is needed. I’ve been able to reproduce the bug ever since about k/ubuntu 9.10 or possibly even 9.04.

I’ve gone ahead and installed wicd and wicd-kde (what a pain that was… required additional repositories, and I accidentally used the 1-click install for wicd-kde from the kde4.6 release repo, so kde update from 4.6.0 to 4.6.5) and then removed networkmanager. On resume, the wireless picks back up. So wicd is obviously doing something that Gnome’s and kde’s network manager is not doing. As I am but a simple user, I won’t even harbor a guess as to what that is. Note that I still use my script to unload and load the driver on suspend/resume. I do not use the hibernate mode.

Could you give wicd a try and see if that solves it for you? I’d hate for you to destroy your disk over something as silly as this.

Thanks for info.

I’ll check things around bit later. Though in that bug report that you pasted there’s
ath5k driver and OSS uses ath9k already some time.

Cheers

Sorry, I saw the AR5008 card and assumed it was the ath5k driver (makes sense, no?). :smiley:

Anyway, maybe this is your bug?
https://bugzilla.kernel.org/show_bug.cgi?id=17942

Here’s all open ath9k bugs:
https://bugzilla.kernel.org/buglist.cgi?query_format=specific&order=relevance+desc&bug_status=__open__&product=&content=ath9k

I know this thread is pretty old, but I accomplished a network restart on resume by placing " service network restart " in the 55Network script in /usr/lib/pm-utils/sleep.d/55Network. just placed in the bottom of resume_num() function. (without the quotoes)
This is probably the sloppy way to do it, but it works. Makes network manager reset on resume and brings back up all the Network Interfaces.