madvinegar
Mon Aug 20, 2012 7:36:22 am
Some wireless cards (pci, pcmci or USB) have to use the ndiswrapper module in order to get the wifi working.
However, sometimes the ndiswrapper module does not reload its operation after suspend. (i.e. when closing the lid of the laptop). And you usually have to unplug and re-plug the USB or PCMCIA card to get it working or open terminal to remove/reload the module.
I found a nice way (after searching through google and experimenting in one of my laptops that uses a Netgear PCMCI wireless card) to make the ndiswrapper module reload automatically after suspend.
Create a new file named "0000wireless" in /usr/lib/pm-utils/sleep.d, i.e.
A blank document will open. Copy and paste inside it the following code:
Save the file, close it and then make it executable. Open terminal and write:
That's it. Now, everytime your laptop/PC goes on suspend, the ndiswrapper module will be reloaded automatically when it wakes up from suspend!
Hope this helps!
However, sometimes the ndiswrapper module does not reload its operation after suspend. (i.e. when closing the lid of the laptop). And you usually have to unplug and re-plug the USB or PCMCIA card to get it working or open terminal to remove/reload the module.
I found a nice way (after searching through google and experimenting in one of my laptops that uses a Netgear PCMCI wireless card) to make the ndiswrapper module reload automatically after suspend.
Create a new file named "0000wireless" in /usr/lib/pm-utils/sleep.d, i.e.
- Code:
sudo gedit /usr/lib/pm-utils/sleep.d/0000wireless
A blank document will open. Copy and paste inside it the following code:
#!/bin/sh
# reload ndiswrapper to get wireless to recover properly
case "$1" in
resume|thaw)
rmmod ndiswrapper
modprobe ndiswrapper
;;
esac
Save the file, close it and then make it executable. Open terminal and write:
- Code:
sudo chmod a+x /usr/lib/pm-utils/sleep.d/0000wireless
That's it. Now, everytime your laptop/PC goes on suspend, the ndiswrapper module will be reloaded automatically when it wakes up from suspend!
Hope this helps!