← Back to team overview

touch-packages team mailing list archive

[Bug 324295] Re: WOL does not work when using shutdown, but works with suspend (S3) and "halt -p"

 

** Tags added: precise resume suspend trusty

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to sysvinit in Ubuntu.
https://bugs.launchpad.net/bugs/324295

Title:
  WOL does not work when using shutdown, but works with suspend (S3) and
  "halt -p"

Status in sysvinit package in Ubuntu:
  Confirmed

Bug description:
  Binary package hint: upstart

  I am not sure whether this is the fault of upstart, or some other
  package, but the problem is:

  Wake-on-LAN works in the following situations:

  1) when suspending the system to S3 (using pm-suspend)
  2) When issuing "sudo halt -p" from the command line.
  Note: I have not tested WOL from hibernate

  If I shut down the system from XFCE or by issuing "sudo shutdown -h
  now" I cannot wake up my system by sending a WOL packet from another
  computer.

  I really want to avoid using suspend as suspend support seems a bit
  unstable on my computer running as a mythbackend.

  I also understand that "halt -p" does not run the shutdown scripts in
  rc0, rc1 and rc6 which probably is not good for my system services.

  But it seems like that somewhere during the shutdown scripts WOL is
  disabled.

  I have tried setting NETDOWN=no in /etc/init.d/halt to prevent halt
  from bringing the network interfaces down.

  I enable WOL with a script in init.d, here is the script:
  #!/bin/sh
  ### BEGIN INIT INFO
  # Provides: wakeonlanconfig
  # Required-Start: $remote_fs $syslog
  # Required-Stop: $remote_fs $syslog
  # Default-Start: 2 3 4 5 S
  # Default-Stop: 1 6
  # Short-Description: Set up Wake On Lan
  ### END INIT INFO
   
  ETHTOOL="/usr/sbin/ethtool"
  DEV="eth1"
  case "$1" in
  start)
      echo -n "Setting $DEV to wakeonlan..."
      $ETHTOOL -s $DEV wol g;
      echo " done.";;
  stop)
      ;;
  esac
   
  exit 0

  The Wakeonlan script is run at the following runlevels:
  locate wakeonlan
  /etc/init.d/wakeonlanconfig
  /etc/rc0.d/K20wakeonlanconfig
  /etc/rc1.d/K20wakeonlanconfig
  /etc/rc2.d/S20wakeonlanconfig
  /etc/rc3.d/S20wakeonlanconfig
  /etc/rc4.d/S20wakeonlanconfig
  /etc/rc5.d/S20wakeonlanconfig
  /etc/rc6.d/K20wakeonlanconfig
  /etc/rcS.d/S20wakeonlanconfig

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/sysvinit/+bug/324295/+subscriptions