Needing to restart network.service after coming out of Suspend

Hello!

I’ve recently installed LEAP 42.2 on my mid-2015 MacBook Pro Retina and I was blown away how everything (even keyboard illumination) worked out of the box! The only minor annoyance is having to run

sudo systemctl restart network.service

every time I open the lid on the laptop to get the Wi-Fi working again. I’m sure I should be able to potentially script this upon waking up? I’m still familiarizing myself with systemd (my main box is Slackware). Any insight would be awesome while I continue to troubleshoot.

Thanks!

https://wiki.archlinux.org/index.php/Power_management#Sleep_hooks

AK

This worked perfect! Forgot to respond with a thank you.

Am Tue, 10 Jan 2017 15:06:02 GMT
schrieb grumpy drew <grumpy_drew@no-mx.forums.microfocus.com>:

>
> This worked perfect! Forgot to respond with a thank you.
>
>

Well, to be honest, personally, I don’t care about a “Thank you” in the end,
but I do care about well documented solutions.

So it would be decent behavior to shortly describe what exactly you did
to solve your problem (including posting your fie/script and where exactly you
put it) to help others reading this thread later.

AK


Never attribute to malice that which can be adequately explained by stupidity.
(R.J. Hanlon)

As root, I created the file root-resume.service under the /etc/systemd/system folder.

The contents of my root-resume.service

[Unit]
Description=Restart W-Fi
After=suspend.target

[Service]
Type=simple
ExecStart=/usr/bin/systemctl restart network.service

[Install]
WantedBy=suspend.target

You then, still as root, type systemctl enable root-resume.service. you should see the creation of symlinks for this.

This seems to have resolved for me. I’m curious where I can actually see that this is running or has been called via log files? I’ve looked in journalctl to no avail.