Returning wifi and dhclient after suspend
One of the problems I got with all of the Linux distro's was network manager software in them. Sometimes network manager just can't get you connected to the same wifi after you suspended your laptop and all you can see is a turning circle. So I wrote a shell script which I tried and is very successful in getting things done on wifi. If you're experiencing similar problem, reading through that can give you a hint how to solve your problem as well.
First of all I do everything manually because I'm tired of Network Managers at the time. So I developed a shell script for creating new wifi connections: Code:
#!/bin/bash Next I created below script to reconnect wifi after a suspend. This is after hours of hiting my head to the wall for why the wifi is not getting connected. The idea is to shutdown everything about wifi and then returning them back up. Even kernel module of wifi driver will be removed from the kernel (in my case brcmsmac) and then returned back! If you are experiencing the same problem of wifi not getting connected after suspend, then trust me. This is the necessary step network manager applets lack! So here you are the script: Code:
echo "Shutting down previous wifi stuff..." Things you should modify in above script are: brcmsmac which is the driver kernel module of my wifi card. Yours might be different. wlp2s0b1 which is the ugly name my linux gave to my wifi card (I don't get it what was the problem with easier names like wlan0?). Again yours might be different. This should work 100 of time and you may now start a happy life. But remember: If in future even this script faced problem, check if if these two processes are running frozen in background and kill them with -9 signal: pkill -9 dhclient pkill -9 wpa_supplicant Sometimes you may also restart your access point. Access points are also computers after all. |
All times are GMT -5. The time now is 10:23 PM. |