Systemd allows for actions to happen when a condition is met. So, all we have to do is tell systemd to restart Network Manager when the system comes back up. We can call this nm-sleep.service.
[Unit] Description=Restore Network after sleep After=suspend.target After=hibernate.target After=hybrid-sleep.target [Service] User=root ExecStart=systemctl restart NetworkManager StandardOutput=syslog [Install] WantedBy=suspend.target WantedBy=hibernate.target WantedBy=hybrid-sleep.target
Store the file as
/etc/systemd/system/nm-sleep.servicethen all you have to do is inform systemd about it with
sudo systemctl enable nm-sleep
Every time your system comes back to life the systemd will restart networking as if you booted your computer. This makes sense, especially with a laptop because your connection could easily change between sessions. You might boot your laptop at a coffee shop and then suspend it to go home, plug in your ethernet and it would pop up instantly (or nearly so). The actual fix should probably be in Network Manager itself but this works just fine. I've been using it since I installed a beta back in February and had completely forgot about the problem until my favorite show brought it up.