[SOLVED] Wireless fails to connect after resuming from sleep

Questions about WIFI networks and devices
Forum rules
Before you post please read how to get help

[SOLVED] Wireless fails to connect after resuming from sleep

Postby andrewbootlegger on Thu Jan 03, 2013 11:55 pm

Just installed Mint 14 on my laptop and having some issues with wifi when I resume from sleep. I've spent the last few days searching for people with similar issues, reading logs, but haven't had much luck on my own. I should mention that I've tried this on two different access points, one 802.11G the other .11N and the fore with WPA-PSK, the latter network is open. Here's my mintwifi output:

Code: Select all
-------------------------
* I. scanning WIFI PCI devices...
  -- Intel Corporation Centrino Wireless-N + WiMAX 6150 (rev 67)
      ==> PCI ID = 8086:0886 (rev 67)
-------------------------
* II. querying ndiswrapper...
-------------------------
* III. querying iwconfig...
eth0      no wireless extensions.

lo        no wireless extensions.

wlan0     IEEE 802.11bgn  ESSID:"TDSWIFI" 
          Mode:Managed  Frequency:2.437 GHz  Access Point: 40:8B:07:F1:CD:87   
          Bit Rate=65 Mb/s   Tx-Power=15 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:on
          Link Quality=40/70  Signal level=-70 dBm 
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:930  Invalid misc:99   Missed beacon:0

-------------------------
* IV. querying ifconfig...
eth0      Link encap:Ethernet  HWaddr 08:2e:5f:8c:77:4b 
          UP 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:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

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:267 errors:0 dropped:0 overruns:0 frame:0
          TX packets:267 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:46821 (46.8 KB)  TX bytes:46821 (46.8 KB)

wlan0     Link encap:Ethernet  HWaddr 40:25:c2:de:aa:74 
          inet addr:192.168.0.27  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::4225:c2ff:fede:aa74/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5631 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4498 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:6454678 (6.4 MB)  TX bytes:743006 (743.0 KB)

-------------------------
* V. querying DHCP...
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service smbd reload

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the reload(8) utility, e.g. reload smbd
RTNETLINK answers: File exists
-------------------------
* VI. querying nslookup google.com...
Server:      192.168.0.1
Address:   192.168.0.1#53

Non-authoritative answer:
Name:   google.com
Address: 74.125.139.100
Name:   google.com
Address: 74.125.139.101
Name:   google.com
Address: 74.125.139.102
Name:   google.com
Address: 74.125.139.113
Name:   google.com
Address: 74.125.139.138
Name:   google.com
Address: 74.125.139.139


Here are some solutions I've tried and they've failed:

  • Turning off wifi with the keyboard on/off key before suspending.
  • Turning wifi on/off with the key after suspending and while it won't connect
  • Manually reloading the module.
  • Adding a script to reload the module to /etc/pm/sleep.d
  • sudo service network-manager restart

The only real fix is to reboot the machine. Oddly enough, I can turn the wifi on and off with the toggle key and it comes back up and reconnects.

Looking through logs have revealed only these suspicious looking entries:

/var/log/syslog
Code: Select all
Jan  3 21:07:16 aanya kernel: [  169.236542] iwlwifi 0000:07:00.0: >fail to flush all tx fifo queues
Jan  3 21:07:16 aanya kernel: [  169.236990] iwlwifi 0000:07:00.0: >Request scan called when driver not ready.
Jan  3 21:07:16 aanya kernel: [  169.237096] iwlwifi 0000:07:00.0: >L1 Enabled; Disabling L0S


/var/log/pm-suspend.log
Code: Select all
/etc/pm/sleep.d/10_unattended-upgrades-hibernate suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/55NetworkManager suspend suspend:
Having NetworkManager put all interaces to sleep...Failed.

/usr/lib/pm-utils/sleep.d/55NetworkManager suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/60_wpa_supplicant suspend suspend:
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory


Seems to be it would be something to do with the system waking up from sleep, but I'm not sure where to start. Any suggestions would be greatly appreciated. Thanks in advance.
Last edited by andrewbootlegger on Mon Apr 29, 2013 3:30 am, edited 2 times in total.
andrewbootlegger
Level 1
Level 1
 
Posts: 6
Joined: Thu Jan 03, 2013 11:06 pm

Linux Mint is funded by ads and donations.
 

Re: Wireless fails to connect after resuming from sleep

Postby andrewbootlegger on Sat Jan 05, 2013 2:13 pm

Ran /usr/lib/pm-utils/sleep.d/55NetworkManager resume suspend and got:

Code: Select all
andy@aanya ~ $ /usr/lib/pm-utils/sleep.d/55NetworkManager resume suspend
/usr/lib/pm-utils/sleep.d/55NetworkManager: 9: .: : not found
andy@aanya ~ $


Perhaps a bug?
andrewbootlegger
Level 1
Level 1
 
Posts: 6
Joined: Thu Jan 03, 2013 11:06 pm

Re: Wireless fails to connect after resuming from sleep

Postby andrewbootlegger on Thu Jan 10, 2013 11:14 pm

Back at it again. On my WPA wireless lan, it just asks for the password over and over. Here's a log entry on successful connection:

Code: Select all
Jan 10 21:12:54 aanya wpa_supplicant[925]: wlan0: SME: Trying to authenticate with 00:10:18:90:20:db (SSID='Purgatory' freq=2462 MHz)
Jan 10 21:12:54 aanya wpa_supplicant[925]: wlan0: Trying to associate with 00:10:18:90:20:db (SSID='Purgatory' freq=2462 MHz)
Jan 10 21:12:54 aanya wpa_supplicant[925]: wlan0: Associated with 00:10:18:90:20:db
Jan 10 21:12:54 aanya wpa_supplicant[925]: wlan0: WPA: Key negotiation completed with 00:10:18:90:20:db [PTK=CCMP GTK=CCMP]
Jan 10 21:12:54 aanya wpa_supplicant[925]: wlan0: CTRL-EVENT-CONNECTED - Connection to 00:10:18:90:20:db completed (auth) [id=0 id_str=]


...and a log entry when I'm having problems.

Code: Select all
Jan 10 21:10:52 aanya wpa_supplicant[872]: wlan0: SME: Trying to authenticate with 00:10:18:90:20:db (SSID='Purgatory' freq=2462 MHz)
Jan 10 21:10:54 aanya wpa_supplicant[872]: wlan0: Failed to initiate AP scan
andrewbootlegger
Level 1
Level 1
 
Posts: 6
Joined: Thu Jan 03, 2013 11:06 pm

Re: Wireless fails to connect after resuming from sleep

Postby laconic on Wed Feb 13, 2013 8:12 pm

I have this same problem. Any fixes?
laconic
Level 1
Level 1
 
Posts: 10
Joined: Tue Feb 12, 2013 10:40 am

Re: Wireless fails to connect after resuming from sleep

Postby laconic on Wed Feb 20, 2013 10:42 am

Hey I think I might have found a fix. Did you try editing (create if not there)
Code: Select all
sudo gedit /etc/pm/config.d/unload_modules


and add the line:

Code: Select all
SUSPEND_MODULES="$SUSPEND_MODULES module_name"


module_name is the name of your wireless device driver. use lshw and lsmod to get the name of the driver.

I found this over in ubuntu forums. The limited testing I have done looks like it fixed it.
laconic
Level 1
Level 1
 
Posts: 10
Joined: Tue Feb 12, 2013 10:40 am

Re: Wireless fails to connect after resuming from sleep

Postby andrewbootlegger on Mon Mar 18, 2013 6:04 am

Appreciate the suggestion. Sadly, it didn't work. I had found a very similar idea on an Ubuntu forum that didn't work either.
andrewbootlegger
Level 1
Level 1
 
Posts: 6
Joined: Thu Jan 03, 2013 11:06 pm

Re: Wireless fails to connect after resuming from sleep

Postby austin.texas on Mon Mar 18, 2013 8:10 am

here is one person's solution:

The suspend key on my keyboard worked properly and my netbook went into suspend. Unfortunately when I resumed the system, my wifi Internet connection was not longer working. It ended up taking a reboot to fix it. Luckily, this issue is easy to fix. One simple command in the terminal was all it took to fix the issue.
sudo touch /etc/pm/power.d/wireless

After using that command, my netbook now properly suspends and resumes.

http://tuxtweaks.com/2012/05/distro-review-linux-mint-13-maya-cinnamon-edition/
Mint 17 v2 Cinnamon (64 bit), Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Microsoft-free environment since 1996

To help Linux Mint with a donation, please visit http://www.linuxmint.com/donors.php
User avatar
austin.texas
Level 11
Level 11
 
Posts: 3786
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: Wireless fails to connect after resuming from sleep

Postby andrewbootlegger on Wed Mar 27, 2013 6:17 pm

Thanks for the link, but still can't get things working. I keep seeing this in the log and wondering if the culprit lies here.

/var/log/pm-suspend.log
Code: Select all
/etc/pm/sleep.d/10_unattended-upgrades-hibernate suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/55NetworkManager suspend suspend:
Having NetworkManager put all interaces to sleep...Failed.

/usr/lib/pm-utils/sleep.d/55NetworkManager suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/60_wpa_supplicant suspend suspend:
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory


I'm going to dig a little more and find out why wpa_ctrl_open doesn't work with PM.
andrewbootlegger
Level 1
Level 1
 
Posts: 6
Joined: Thu Jan 03, 2013 11:06 pm

Re: Wireless fails to connect after resuming from sleep

Postby andrewbootlegger on Mon Apr 29, 2013 3:26 am

Finally found a fix.

Created a script: /etc/pm/sleep.d/resume_iwlwifi

Code: Select all
#! /bin/sh

rmmod iwldvm && rmmod iwlwifi && modprobe iwlwifi bt_coex_active=0


Works great. Credit: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/614954
andrewbootlegger
Level 1
Level 1
 
Posts: 6
Joined: Thu Jan 03, 2013 11:06 pm

Linux Mint is funded by ads and donations.
 

Return to Wireless

Who is online

Users browsing this forum: sbouchet and 9 guests