I created script in /lib/systemd/system-sleep/ and give it chmod +x, and
every wakeup it is run.
#!/bin/sh
# NAME: /lib/systemd/system-sleep/iwlwifi-reset
# DESC: Resets Intel WiFi after a long suspend.
# DATE: Apr 1, 2017. Modified April 8, 2017.
# NOTE: Per AU comment restart network.
MYNAME=$0
restart_wifi() {
/usr/bin/logger $MYNAME 'restart_wifi BEGIN'
# /sbin/modprobe -v -r iwldvm # This removes iwlwifi too
# /sbin/modprobe -v iwlwifi # This starts iwldvm too
systemctl restart NetworkManager.service
nohup nm-applet &
/usr/bin/logger $MYNAME 'restart_wifi END'
}
/usr/bin/logger $MYNAME 'case=[' ${1}' ]'
case "${1}/${2}" in
hibernate|suspend|pre*)
;;
resume|thaw|post*)
restart_wifi;;
esac
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1585886
Title:
WiFi indicator icon disappears in Ubuntu 16.04
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/indicator-applet/+bug/1585886/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs