Skip to content

Instantly share code, notes, and snippets.

@debaraj-barua
Last active October 30, 2019 00:33
Show Gist options
  • Save debaraj-barua/99f1f7ddb9eea0fbfc9d096d3eb7b54a to your computer and use it in GitHub Desktop.
Save debaraj-barua/99f1f7ddb9eea0fbfc9d096d3eb7b54a to your computer and use it in GitHub Desktop.
After waking up from suspend, the `network-manager` stops showing Wi-Fi networks, (although the Wi-Fi connection may still be active).

Issue:

After waking up from suspend, the network-manager stops showing Wi-Fi networks, (although the Wi-Fi connection may still be active).

Attached screenshot

Solution

Temporary workaround:

sudo service network-manager restart

More permanent workaround

Source: https://askubuntu.com/a/761220/669558

sudo vim /etc/systemd/system/wifi-resume.service 

Now paste the below script in that file.

#/etc/systemd/system/wifi-resume.service
#sudo systemctl enable wifi-resume.service
[Unit]
Description=Restart networkmanager at resume
After=suspend.target
After=hibernate.target
After=hybrid-sleep.target

[Service]
Type=oneshot
ExecStart=/bin/systemctl restart network-manager.service

[Install]
WantedBy=suspend.target
WantedBy=hibernate.target
WantedBy=hybrid-sleep.target

Now to activate it:

sudo systemctl enable wifi-resume.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment