参考:https://letsfoss.com/fix-wifi-not-working-after-suspend-in-ubuntu/
Recently I faced this issue in my laptop.
Wifi not working after sleep in ubuntu 20.04
If the laptop wakes from sleep mode the WiFi wont't work or won't connect back to the previously connected network.
Here is the Simple way to fix that.
Open terminal and run the following command
sudo nano /lib/systemd/system-sleep/wififix
After entering the the Password, It will open the nano editor.
Now Paste the Below Code
!/bin/sh
set -e
if [ "$2" = "suspend" ] || [ "$2" = "hybrid-sleep" ]; then
case "$1" in
pre) true ;;
post) sleep 1 && service network-manager restart ;;
esac
fi
Press Ctrl+O and Enter to save it
Press Ctrl+X to close the file
Now, make this a executable using this command.
sudo chmod +x /lib/systemd/system-sleep/wififix
That's it.
This Wifi not working issue fix tested on Ubuntu 20.04 Focal Fossa
It work's for other Mint and Elementary versions as well.
标签:睡眠,working,fix,wifi,sleep,ubuntu,laptop From: https://www.cnblogs.com/kuangke/p/16882171.html