No network after Ubuntu resumes from sleep/suspense

I use Ubuntu on my desktop and I really have a stupid annoying issue..

“No network after I resume from sleep/suspense”

I know that if I restart the network-manager, it will solve the issue. I actually created an alias in .bashrc file to make my life little easier – “sudo restart network-manager”.

But today, I’ve decided to make it even better. So I searched for “ubuntu script after resume” in Google and the first hit was exactly what I needed.

You can follow the link or just rely on my steps down below.

Tested on Ubuntu 14.04 LTS

Run the following commands in Terminal (I used 99 priority, as the script name, nano as the editor.. you can use your preferences if you’re a good Linux user)

sudo touch /etc/pm/sleep.d/
sudo chmod +x /etc/pm/sleep.d/
sudo nano /etc/pm/sleep.d/

Paste the following, save (Ctrl-O and then Enter) then exist (Ctrl-X):

case "$1" in
 restart network-manager
exit $?

Comment if it helped or suggest a modification for alternative Linux favors or Ubuntu versions


Leave a Reply