View Full Version : [SOLVED] Network very slow to connect when resuming from sleep
x-shaney-x
May 8th 2012, 12:58 AM
Once the desktop is backup and running it takes another 12-15 seconds for the network to come back up.
I find this in pm-suspend.log
/usr/lib/pm-utils/sleep.d/75modules resume suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/60_wpa_supplicant resume suspend:
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
/usr/lib/pm-utils/sleep.d/60_wpa_supplicant resume suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/55NetworkManager resume suspend:
Having NetworkManager wake interfaces back up...Failed.
Which may or may not explain anything.
It is also very slow to reconnect in ubuntu also (though slightly quicker - 8-10 seconds)
For comparison, in Windows 7 it reconnects instantly, as soon as the desktop is back on.
According to lspci:
Network controller: Atheros Communications Inc. AR9287 Wireless Network Adapter (PCI-Express) (rev 01)
SteveRiley
May 8th 2012, 05:34 AM
There are several reports of Atheros wireless adapters not resuming from sleep well or at all. There is a workaround. In a console window, please type:
sudo sh -c "echo 'options ath9k nohwcrypt=1' >/etc/modprobe.d/ath9k.conf"
Reboot, do some stuff, then put the computer to sleep. Wake it up, and notice if there's an improvement.
ath9k is the driver module for your card. The setting above instructs the module to use the computer's CPU, rather than the card's own processor, to perform the cryptographic calcuations for wireless encryption. Curiously, this configuration change often fixes sleep/resume issues with Atheros cards.
x-shaney-x
May 8th 2012, 07:21 AM
Unfortunately, the above made no difference at all :(
I have also since noticed that it does actually take just as long on startup, not just resume (I normally turn the comp on then go and do something so wouldn't notice).
x-shaney-x
May 10th 2012, 07:02 PM
Actually, it turns out the nohwcrypt=1 workaround DOES improve the problem quite a lot in UBUNTU (after several reboots) but not in Kubuntu.
SteveRiley
May 11th 2012, 05:47 AM
Hm, that's odd. Let's verify which module your Kubuntu is loading. Please reply with the output of
sudo lspci -k
x-shaney-x
May 11th 2012, 09:07 AM
02:00.0 Network controller: Atheros Communications Inc. AR9287 Wireless Network Adapter (PCI-Express) (rev 01)
Subsystem: Foxconn International, Inc. Device e034
Kernel driver in use: ath9k
Kernel modules: ath9k
Which of course is the same module loaded in ubuntu.
I can only imagine it is something related to the KDE network manager?
SteveRiley
May 12th 2012, 03:35 AM
Possibly... I know many folks here at KFN prefer to replace Network Manager with Wicd. Perhaps you might try that? Search the forums for step-by-step instructions.
x-shaney-x
May 12th 2012, 10:37 AM
I have noticed that every so often (maybe 1 in 7 times it connects) it does connect much faster.
Normally when it connects, I see a little key symbol on the icon in the system tray but on this odd occasion it connects faster (about the same as ubuntu does now) the key symbol doesn't appear.
Does that suggest anything?
SteveRiley
May 12th 2012, 07:36 PM
Hm...are you storing wireless passphrases in a KWallet?
x-shaney-x
May 12th 2012, 09:28 PM
To be honest, I don't know. Is that normal behaviour?
I just click on the icon in the system tray, choose my wi-fi and enter the passphrase.
I can't remember whether or not Kwallet comes up but I would guess it does.
SteveRiley
May 13th 2012, 04:38 AM
Yes, normally it should.
I greped around the 'net a bit for the first error message that you listed -- "Failed to connect to WPA supplicant" -- and it appears you aren't alone. A three-page thread over on Ubuntu forums (http://ubuntuforums.org/showthread.php?t=1775514) disucsses it some, but there's no resolution.
You might experiment with unloading the module during the sleep phase, and then reloading the module during the resume phase.
x-shaney-x
May 17th 2012, 04:19 PM
I'm marking this problem as solved as it now seems to be, or at least it has been for the past day or two.
I went into the connection manager and looked at the settings for my current connection.
I noticed there was a checkbox labelled "System connection".
After checking that box, my wi-fi connects much faster both on startup and when resuming (still not as fast as it should be but as fast as on ubuntu, at least).
Not only that but the little key symbol no longer appears when connecting.
Powered by vBulletin® Version 4.2.1 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.