Author Topic: [SOLVED] wifi sometimes does not work after resuming from suspend  (Read 1150 times)

Offline gilado

  • Hero Member
  • *****
  • Posts: 524
For the record this is an Intel PRO/Wireless 2915ABG Calexico2 although I don't think the problem is hardware/driver specific.

Most of the time after I suspend, resume the machine, and especially if still at the same location, the net applet network icon at the panel momentarily shows network down, then comes back and shows the green signal strength icon (and the network is connected and works.)

Sometimes the network disconnected remains, and indeed the wifi is not connected. If at that point I run drakroam (right click network icon, select wireless networks, click manage network wireless networks), it show the available networks and _shows_ my network as connected.  

So there's a discrepancy somewhere between net applet and drakroam. I tried to click disconnect, then reconnect, however, it does not help.

The only remedy is restarting the machine. Upon restart it immediately connects with any further action.

I think there probably is some service or process that needs to be stopped on suspend, started on resume to fix this problem.  The question is why does it sometimes work?

One possibility is DHCP.  My hypothesis is that if the DHCP lease still is valid upon resume then it works. Otherwise it fails to renew it.  Does that make sense, and if so, how would I fix it?
« Last Edit: November 11, 2010, 07:11:00 AM by gilado »

Offline wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2436
  • Any Bugs in site?
Re: wifi sometimes does not work after resuming from suspend
« Reply #1 on: October 03, 2010, 12:03:28 AM »
gilado
You could try when drop out occurs or for that matter as a routine coming out of suspend.

It is a guess, Konsole

Code: [Select]
[root@localhost gert]$ service -f network
Shutting down interface eth0:                                                                       [  OK  ]
Shutting down interface wlan0:                                                                      [  OK  ]
Shutting down loopback interface:                                                                   [  OK  ]
Bringing up loopback interface:  127.0.0.1
squid (pid  3881) is running...
Reloading Squid
                                                                                                    [  OK  ]
Configuring wireless regulatory domain                                                              [  OK  ]
Bringing up interface eth0:                                                                         [  OK  ]
Bringing up interface wlan0:                                                                        [  OK  ]

32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen

Offline gilado

  • Hero Member
  • *****
  • Posts: 524
Re: wifi sometimes does not work after resuming from suspend
« Reply #2 on: October 03, 2010, 07:15:30 AM »
Thanks, I'll try that.

I ran the command as root to see that it works on my machine, and it does, however, I get an error message
Quote
# service -f network
Shutting down interface eth0:                                 [  OK  ]
Shutting down interface eth1:                                 [  OK  ]
Shutting down loopback interface:                           [  OK  ]
Bringing up loopback interface:  127.0.0.1
squid (pid  4618) is running...
Reloading Squid
                                                                        [  OK  ]
Configuring wireless regulatory domain  nl80211 not found.
                                                                        [FAILED]
Bringing up interface eth0:                                     [  OK  ]
Bringing up interface eth1:                                     [  OK  ]

Offline sammy2fish

  • Hero Member
  • *****
  • Posts: 3287
  • from the Prairies... Canadian MLU
Re: wifi sometimes does not work after resuming from suspend
« Reply #3 on: October 03, 2010, 07:20:55 AM »
gilado, it is funny as to the timing of this thread.

This morning for the first time, I opened the lid to my laptop, typed in my password, and saw the wifi was down.

I run folding@home on both cpu's on my dual-core.  It had tried 14 times to connect and gave up.  But for me, I double-clicked on the icon, picked the wireless option, and then on connect, and it connected.  Then I had to kill both consoles with folding@home on pause, and restart them again.

I was thinking it was just a single incident, hopefully nothing more.  This laptop has always had wifi on bootup.  So I'm hoping it was a one-time-only thing...
One of the few things I've learnt as growing older.  Is to choose your battles.. but never loose sight of the war..!

Offline wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2436
  • Any Bugs in site?
Re: wifi sometimes does not work after resuming from suspend
« Reply #4 on: October 03, 2010, 09:27:16 AM »
gilado
I have seen this message before in another thread but not found out yet what it is or from where it comes.  Have Googled a bit.

In the link here:
http://www.redhatconfig.com/list/32/432765.html

you can find a bit about what it is supposed to be doing.  I have found a few more on the internet and it seems to be more of nuisance. I do not know how to test if it is needed. In the link you will find it can be suppressed by commenting out in;

Code: [Select]
[root@localhost gert]$ cat /etc/sysconfig/network
HOSTNAME=localhost.localdomain
NETWORKING=yes
CRDA_DOMAIN=US      <--------------------------------- # placed in front of this line will fix nl80211
[root@localhost gert]$
 

Seems it may be unimportant in latest kernels.

Have you seen it before perhaps after a reboot?
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen

Offline gilado

  • Hero Member
  • *****
  • Posts: 524
Re: wifi sometimes does not work after resuming from suspend
« Reply #5 on: October 03, 2010, 02:46:38 PM »

Code: [Select]
[root@localhost gert]$ cat /etc/sysconfig/network
HOSTNAME=localhost.localdomain
NETWORKING=yes
CRDA_DOMAIN=US      <--------------------------------- # placed in front of this line will fix nl80211
[root@localhost gert]$
 

Seems it may be unimportant in latest kernels.

Have you seen it before perhaps after a reboot?


It does not happen during reboot
« Last Edit: October 04, 2010, 09:40:35 PM by gilado »

Offline gilado

  • Hero Member
  • *****
  • Posts: 524
Re: wifi sometimes does not work after resuming from suspend
« Reply #6 on: October 04, 2010, 09:46:41 PM »
wifi refused to connect after resume so I had the opportunity to try
Quote
# service -f network

It did not help.  It brought down both eth0, eth1 [OK] then reloaded squid and brought them up. However, net_applet displayed network is down notification and refused to connect. I also noticed the nl80211 error message did not show up this time.

Rebooting caused the network to startup properly and it immediately connected.


Offline wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2436
  • Any Bugs in site?
Re: wifi sometimes does not work after resuming from suspend
« Reply #7 on: October 04, 2010, 10:35:41 PM »
gilado
Yes that is the correct response to your command.

Forgot about the wlan0 may not come up. If you issue the command in su

Code: [Select]
iwconfig wlan0 essid xxxx
where xxxx is your network name it may connect but you may as well do that via PCC but is should not be necessary to reboot.

You could try this command only next time you come out of hibernation.

You can also try Synaptic and install killswitch-manager which may connect to your system and if it does may be able to turn wifi on and off.  Don't know I have only had one success so far suggesting the use of of that and not sure if it really does work.  It is a beta program but simple and worth the try.

« Last Edit: October 04, 2010, 10:41:17 PM by wedgeling »
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen

Offline gilado

  • Hero Member
  • *****
  • Posts: 524
Re: wifi sometimes does not work after resuming from suspend
« Reply #8 on: November 11, 2010, 07:10:24 AM »
Found a workaround!

As root, run
Code: [Select]
# rmmod ipw2200

After a few seconds wifi comes alive and automatically connects to the network.

I'll add this to my resume script