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
Touch seeded packages, which is subscribed to network-manager in Ubuntu.
https://bugs.launchpad.net/bugs/1585886

Title:
  WiFi indicator icon disappears in Ubuntu 16.04

Status in indicator-applet package in Ubuntu:
  Confirmed
Status in network-manager package in Ubuntu:
  Confirmed

Bug description:
  Dear all,

  Can someone confirm an occasionally missing WiFi indicator tray icon?

  Sometimes it happens that the icon is not displayed although the WiFi
  connection is working.

  Please see also the attached screenshot.

  Warmly,

  ~Robert

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/indicator-applet/+bug/1585886/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to