вторник, 4 септември 2018 г.

How to restart wifi after suspend

My laptop seems to have a problem with one particular router that after suspend, every now and then (though not always) it will not restore the connection. It freezes on "Authenticating" and after some time, it stops trying to reconnect.
I tried restarting the module for the network:
$sudo rmmod r8169 && sudo modprobe r8169
but it didn't help.
I also tried restarting everything related to the network with:
$sudo systemctl restart *network*
Also it didn't help.
What it finally helped was:
sudo nmcli con up id #name_of_the_network --ask
After inputting the key for the Wifi network, it reconnected! YAY!
Thank you Arch community for suggesting this on one of the pages I digged trough.