WiFi Problem with Lenovo Laptop

WiFi Problem with Lenovo Laptop

16 Mar 2018, 12:00am TZ +00:00
linux
Software

This problem specifically occurs with Lenovo laptops and more pounced in *Ubuntu 17.x" onwards.

The problem happens when the laptop goes to any type of standby , sleep or hybrid-sleep.

It causes the WiFi the not function again after wakeup.

This problem was reported and solutions were offered :

https://askubuntu.com/questions/761180/wifi-doesnt-work-after-suspend-after-16-04-upgrade

Here is the Working Solution:

https://askubuntu.com/a/761220

This problem was seen on 17.10 version in Jan'2018 and Mar'2018.

It may be fixed in the future updates.

Solution using a Command #

1
sudo systemctl restart network-manager.service

16.04 and above runs on systemd, so this should work.

Creating a Resume Service #

1. Create the Services File in nano editor #

1
sudo nano /etc/systemd/system/wifi-resume.service

2. Service File Contents #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
#/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

3. Activate the Service #

1
sudo systemctl enable wifi-resume.service