LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware 13.0 Wake on lan WOL (http://www.linuxquestions.org/questions/slackware-14/slackware-13-0-wake-on-lan-wol-796931/)

1998chevy1500 03-21-2010 05:45 PM

Slackware 13.0 Wake on lan WOL
 
Hello everyone,

I have been trying on an off for the past few weeks to get wake on lan working on my computer, and thus far I have been unsuccessful.

First the hardware.

The motherboard is a DFI Lanparty NF4 SLI-DR with a Nforce4 chipset. The ethernet port that I am using is the integrated Nvidia ethernet port. It is connected via cat5e cable to a gigabit switch. I am using the opensource forcedeth driver. Per the file /usr/src/linux-2.6.29.6/net/forcedeth.c the version of the driver is 0.62. Per the config file "CONFIG_FORCEDETH=m" so it is built as a module.

I have been using "ethtool -s eth0 wol g" to set the wol bit to on. I am able to verify that it does in fact set the bit to on by running "ethtool eth0" and it tells me that option g is set to on.


Below is what I have tried and what has worked and what hasn't.

Windows:
Booting into Windows XP, verifying under the control panel that WOL is set to on, then powering down the computer allows wol to work just fine.
When powered down, all of the lights on the ethernet port are turned off. (this is different than when it is powered down by any other method) I am able to use the wol program from slackbuilds.org running on another computer to wake up the computer by running "wol xx:xx:xx:xx:xx:xx" The only hiccup I have run into is that it only responds to the packet once. What I mean by that is that if the computer is off, but has not been given any time to settle out, and I issue a wol command, the power light flashes, but the computer does not turn on, and re-sending wol does nothing. If I allow the computer to sit for approximately 10-15seconds after it has turned off so that it can settle out (for whatever reason), wol works every time. The power light flashes as if I had physically pressed the power button, then it computer begins booting.
The above suggests to me that the hardware is capable of performing wol.


Now for the linux attempts:

I have created a script called rc.wol located in /etc/rc.d that contains the following lines.
Code:

#!/bin/sh
/usr/sbin/ethtool -s eth0 wol g

I have called that script to be run twice on shutdown (rc.0/rc.6), once right before rc.init1 is shutdown, and a second time right before reboot/poweroff are called. The rc.wol script is called with
Code:

. /etc/rc.d/rc.wol
I have tried sending the wol packet to both the normal MAC address as well as the reversed one, although I thought that that bug had been fixed by the 0.61 driver version. (IE wol 01:02:03:04:05:06 and wol 06:05:04:02:03:01)


I have read that when the BIOS is booting up, to power off the computer with the power button, then send a wol packet to the computer and it will wake up, for me this does not work. However, as stated earlier, it does wol when powered down from windows, so I do not know how conclusive this test is.

Also, when powered down by either linux or by powering it off during bootup, the amber LED (guessing it is the link LED) remains illuminated solid. Whereas when powered down from Windows XP all of the LEDs turn off.

Does anyone have any suggestions or ideas to try? I am up for anything.
Thanks

Woodsman 03-22-2010 12:36 PM

Quote:

Does anyone have any suggestions or ideas to try? I am up for anything.
Possibly.

Consider not using the 2.6.29.x series of kernels, which is what comes with 13.0. The forcedeth driver in the 2.6.29.x series is broken.

With my Asus motherboards, the forcedeth driver with the 2.6.29.9 kernel latches the NIC during a reboot. If you read the linked thread you'll learn that I had no problems with other kernels --- only 2.6.29.x. That same effect could be one reason your motherboard will not awaken.

Another reason might be the BIOS settings.

I have two computers both using on-board NICs (Nvidia chip sets) that use the forcedeth driver. In my office machine I continue using Slackware 12.2 and 2.6.27.7. In my HTPC I use 12.2 with the 2.6.30.5 kernel.

With my office system I also have to send the wol packet using a reversed MAC address.

I have a simple wake-on-lan shell script available at my web site.

1998chevy1500 03-23-2010 11:07 AM

Very interesting. I did not know that the 2.6.29.x series kernels had problems w the forcedeth drivers. Do you, or anyone else, have a kernel you recommend? Perhaps 2.6.30.5?

Now the dumb question. I have only done a minor amount of kernel building. Do I just use my 2.6.29.x kernel confg file to build the 2.6.30.5 kernel? I guess I am going to start by trying that and go from there.

Thanks

dive 03-23-2010 06:08 PM

Ick. Sorry just reread first post ;)

lazardo 03-24-2010 07:18 PM

Forcedeth had a well known [?] MAC addr issue where WOL would work only if the bits are reversed. For example, if the MAC is 00:30:1b:80:04:ba you would use ba:04:80:1b:30:00.

I have an AMD/Nforce shuttle box that needs the inverted MAC and this in /etc/rc.d/rc.6:

Code:

...
# Now halt (poweroff with APM or ACPI enabled kernels) or reboot.
if [ "$command" = "reboot" ]; then
  echo "Rebooting."
  /sbin/reboot
else
        /sbin/ifconfig eth0 up &&\
        /sbin/ethtool -s eth0 wol g
  /sbin/poweroff
fi


Woodsman 03-24-2010 07:34 PM

Quote:

Perhaps 2.6.30.5?
Sure, why not. Might as well go for the latest in that branch: 2.6.30.10.

Quote:

Do I just use my 2.6.29.x kernel confg file to build the 2.6.30.5 kernel? I guess I am going to start by trying that and go from there.
That is all I have done through the years. Some people will recommend running make oldconfig, but if you don't then the new options get absorbed into the configuration with the default values.

Quote:

Forcedeth had a well known [?] MAC addr issue where WOL would work only if the bits are reversed.
Yup. My shell script sends magic packets to both MAC addresses, just to be sure.

1998chevy1500 03-27-2010 05:09 PM

Well, I got it to work. Sort of.

I couldn't get the nvidia ethernet port to work with WOL no matter what I tried. I used kernel 2.6.29.6, 2.6.30.10, 3.6.32.10 and none of them worked. Finally I gave up and tried a second approach. The DFI Lanparty NF4 SLI-DR motherboard has a second ethernet port, a Marvell 88E8001. I had tried earlier to use the Marvell ethernet port and didn't have much luck, however I decided to try it again and for whatever reason I was able to get it working this time. The Marvell 88E8001 uses the skge driver, which has remained the same version number from kernel 2.6.29.6 thru 2.6.32.10.

So, to walk through what I had to do to get WOL working for me.

Enable WOL in the BIOS.
Set the BIOS to only power down to S3 mode (not S1 or AUTO).
Enable the Marvell ethernet port in the BIOS.
Using ethtool, set the g WOL bit to on from linux.
When the computer is powered down, wait approximatly 2-3 minutes after the computer is off before sending the magicpacket for wol, otherwise the power light will flash, but the computer will not boot. I am not sure what the reason for this is, but it really isn't much of a problem.

Thank you for all the help everyone, even though I did not get WOL working with the nvidia ethernet port, I did get WOL working,and that is all I really needed.

Linux.tar.gz 03-29-2010 08:55 AM

Just saw this option :
man halt
-i Shut down all network interfaces just before halt or reboot.
Maybe you can play with it.


All times are GMT -5. The time now is 06:31 AM.