Skip to content

Instantly share code, notes, and snippets.

@warewolf
Created March 8, 2018 20:35
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 warewolf/cbb884161ece02f0f6b6ae5addfbfae4 to your computer and use it in GitHub Desktop.
Save warewolf/cbb884161ece02f0f6b6ae5addfbfae4 to your computer and use it in GitHub Desktop.
I present to you, fucking_wifi.sh - what I use to fix my trackpoint and wifi card when it shits the bed
#!/bin/bash
ifdown wlan0
while grep -E iwlwifi\|iwlmvm /proc/modules; do
rmmod iwlwifi iwlmvm
sleep 1
done
echo -n 1 | tee /sys/bus/pci/devices/0000:03:00.0/remove
sleep 1;
echo -n 1 | tee /sys/bus/pci/devices/0000:03:00.0/remove
sleep 1;
echo -n "reconnect" > /sys/bus/serio/devices/serio1/drvctl
modprobe iwlwifi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment