Announcement

Collapse
No announcement yet.

Network very slow to connect when resuming from sleep

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Network very slow to connect when resuming from sleep

    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
    Code:
    /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:
    Code:
    Network controller: Atheros Communications Inc. AR9287 Wireless Network Adapter (PCI-Express) (rev 01)

    #2
    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:
    Code:
    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.

    Comment


      #3
      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).

      Comment


        #4
        Actually, it turns out the nohwcrypt=1 workaround DOES improve the problem quite a lot in UBUNTU (after several reboots) but not in Kubuntu.

        Comment


          #5
          Hm, that's odd. Let's verify which module your Kubuntu is loading. Please reply with the output of
          Code:
          sudo lspci -k

          Comment


            #6
            Code:
            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?

            Comment


              #7
              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.

              Comment


                #8
                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?

                Comment


                  #9
                  Hm...are you storing wireless passphrases in a KWallet?

                  Comment


                    #10
                    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.

                    Comment


                      #11
                      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 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.

                      Comment


                        #12
                        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.

                        Comment

                        Working...
                        X