Network Resume Dance

I learned this little dance while Network Manager was having a problem with sleep and resume. Bringing my laptop out of sleep always had problems getting networking again. Network Manager would die upon resume so this is how I would get my wireless card (iwl3945) to return after resuming from sleep. I’m looking forward to not running this all the time…

[clarkbw@localhost ~]$ sudo /etc/init.d/NetworkManager restart
Stopping NetworkManager daemon:                            [FAILED]

Setting network parameters...

Starting NetworkManager daemon:                            [  OK  ]

[clarkbw@localhost ~]$ sudo /etc/init.d/NetworkManager stop

Stopping NetworkManager daemon:                            [  OK  ]

Now wait about 10 seconds…

[clarkbw@localhost ~]$ sudo /etc/init.d/NetworkManager start
Setting network parameters...

Starting NetworkManager daemon:                            [  OK  ]

[clarkbw@localhost ~]$

5 responses to “Network Resume Dance

  1. I also have an Intel wireless chipset and I found that whitelisting the module (in Ubuntu, see /etc/default/acpi-support) works well and NetworkManager only needs to be restarted when you resume as it doesn’t refresh the networks quick enough (none of this stop start stop wait start nonsense :) )

  2. Jeremy Katz

    You really shouldn’t need to be unloading the module or restarting NetworkManager. The only little quirk I’ve got right now with iwl3945 on resume is that (sometimes) wpa_supplicant is keeping its cached scan results around. But after 30 seconds or so, it realizes that I’ve gone home and finds the other network.

    And now that the brunt of F8 is out of the way, I might actually get around to prodding at wpa_supplicant to make it forget things too.

  3. Thanks for this, I was having the same problem with iwl3945 and thought I was running into a brick wall with restarting services, nothing seemed to get that wifi back up. Waiting 10 seconds was the key.

  4. Jay

    Bryan,
    I’ve been there too. I have a script in ~/bin/re_wifi (contents below… and yes it doesn’t work w/o the sleeps). I don’t need it as much as I used to but when I go from work (LEAP) to Home (WPA) it’s a requirement. I found I had to go back all the way to “network” so it would unload the wireless driver, but I did notice recently that the Dispatcher seems to do something similar.
    FWIW, this is on a RHEL5. system. I’m going to F8 as soon as I get a chance.

    sudo /etc/init.d/NetworkManagerDispatcher stop
    sleep 5
    sudo /etc/init.d/NetworkManager stop
    sleep 5
    sudo /etc/init.d/network stop
    sleep 5
    sudo /etc/init.d/ipw3945d stop
    sleep 45
    sudo /etc/init.d/ipw3945d start
    sleep 5
    sudo /etc/init.d/network start
    sleep 5
    sudo /etc/init.d/NetworkManager start
    sleep 5
    sudo /etc/init.d/NetworkManagerDispatcher start

  5. Pingback: Suspend/Resume with linux laptops « Keystone IT Tech

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 

aboot

This is the blog personality of Bryan Clark. I'm a designer in a world of open source. This blog reflects mostly writing about Design, Open Source, Economics, Beer, Wine, and Dogs. There's more information about me on this site or you can contact me directly at clarkbw@gmail.com.

scategories