Total Hit Counter

Wednesday, August 17, 2016

Wifi not getting up after suspend in ubuntu 16.04

Hi Friends,

Before couple of days I have upgraded my laptop from Ubuntu 14.04 to Ubuntu 16.04. After upgrade I was facing some misbehavior issues.

One of them was when I wake my laptop after suspend, it was unable to connect to any of wifi devices.

Here, I am going to give solution for the same. I figured it out that after suspend it was not able to start wifi again.


You just follow below steps and it will be done.

Step 1: To verify before applying this solution by executing below command after wake up from suspend, you check whether it will work for you or not.
$ sudo systemctl restart network-manager.service
Now if it works then further you apply below is permanent solution.

Step2: Create a file with name wifi-reset.service in /etc/systemd/system/ directory with below content:

[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
Step3: Now enable service at boot time, wakeup time and hibernet time using following command: 
systemctl enable wifi-resume.service
That's it, you are done now.
Please check after suspend again....................