# wicd loses its mind after suspend to RAM [SOLVED]

## daddio

I was recently surprised to find that my laptop magically suspends to RAM now.

It happened with the mandatory upgrade to KDE4, which seems very nice( other than dolphin which crashes frequently)

Wonderful.

But I have discovered one fly in the ointment. When it comes back up, the wifi can't reconnect, and wicd can't even see that there are any wireless networks.

My suspicion is that its b43's fault (Its always been temperamental), but Its hard to know.

My first thought is maybe I should stop wicd, and unload the b43 module prior to suspend, and then bring them both back up after resume.

I suspect there is a script for this, but I don't know where to look for it.

Can anyone tell me where the shutdown scripts would be, or if there is a better option?Last edited by daddio on Fri Feb 12, 2010 5:44 am; edited 1 time in total

----------

## salmonix

This problem seems to come up with laptops and wicd: after some happening - disconnect or suspend - wicd fails to reconnect, only after reloading the wifi module. At least this was my case.

To do this, put an unload script into /etc/wicd/scripts/preconnect/ and perhaps into postdisconnect/

say:

```
#!/bin/sh

modprobe <module> -r

modprobe <module>
```

This will reset the wifi card and shuts it down on disconnect - some powersaving i hope, when interface is down thought module is loaded.

----------

## daddio

That did it!

Thanks.

I just added those lines to the pre- script directory, and my laptop connects automatically.

Emboldened by that little success, I'm on to bigger an d better things,

like automating the click-browse stupidity of the free wifi I use on the train every morning.

wireshark, netcat, and wicd postconnect. yay.

----------

