Skip to content

Instantly share code, notes, and snippets.

@gayanhewa
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gayanhewa/90593ba24d48252a87a3 to your computer and use it in GitHub Desktop.
Save gayanhewa/90593ba24d48252a87a3 to your computer and use it in GitHub Desktop.
WIFI disconnection restart script - Realtek drivers
#!/bin/bash
# Unload kernel module , replace rtl8821ae with your device module.
modprobe -r rtl8821ae
#reload kernel module
modprobe rtl8821ae
# set wireless interface to down , replace wlp3s0 with your wifi device name
ip link set wlp3s0 down
#restart wpa_supplicant
systemctl reenable wpa_supplicant
systemctl restart wpa_supplicant
#reenable netctl
systemctl reenable netctl
systemctl restart netctl
#reenable netctl profile , replace home with your netctl profile name
netctl reenable home
netctl restart home
## In some wired cases , the IP gets assigned and reassigned, dynamically updating the IP address.
#This was fixed by a simple dhcpcd restart
systemctl reenable dhcpcd
systemctl restart dhcpcd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment