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

Bug #324295 reported by Rune Evjen
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
sysvinit (Ubuntu)
Confirmed
Undecided
Unassigned

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

Revision history for this message
Rune Evjen (rune-evjen) wrote :
Revision history for this message
Rune Evjen (rune-evjen) wrote :
Revision history for this message
Rune Evjen (rune-evjen) wrote :
Revision history for this message
Rune Evjen (rune-evjen) wrote :
Revision history for this message
Rune Evjen (rune-evjen) wrote :

I suspect I have the same problem with my mythtv frontend computer,
after issuing "halt -p" I can wake the computer using WOL.

When using "shutdown -h now" or XFCE shutdown menu choice I am not able to wake up the computer using WOL.

I am unable to test S3 mode because suspend is broken on this computer.

Log files for the second computer are attached.

Rune

Revision history for this message
Rune Evjen (rune-evjen) wrote :
Revision history for this message
Rune Evjen (rune-evjen) wrote :
Revision history for this message
ClashTheBunny (spam-mason) wrote :

I used to have this problem only when shutting down from the command line (sudo halt or sudo shutdown -h now). It would work fine with the shutdown from the menu in 11.10 but, now that I've upgraded to 12.04, it isn't waking remotely.

I've never seen the -p variants of the commands, so I'm going to experiment with "sudo halt -p" and "sudo shutdown -hP now" when I get to work Monday. As of right now, my remote host isn't waking, so I have no way of testing different options until then. I'll also check the output of ethtool to make sure that the flag is set before shutdowns are issued.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in sysvinit (Ubuntu):
status: New → Confirmed
Revision history for this message
Bogdan (boghison) wrote :

Hi, seems I get the same bug in 14.04 Suspend works, but not after shutdown.

Ken Sharp (kennybobs)
tags: added: precise resume suspend trusty
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.