[Bug 324295] Re: WOL does not work when using shutdown, but works with suspend (S3) and "halt -p"
ClashTheBunny
324295 at bugs.launchpad.net
Sat May 5 07:22:40 UTC 2012
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.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, 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:
New
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
More information about the foundations-bugs
mailing list