First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 113880
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Roy Marples (RETIRED) <uberlord@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Ryan Phillips (RETIRED) <rphillips@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
wol.patch Wake On LAN patch patch Roy Marples (RETIRED) 2005-11-29 14:34 0000 2.87 KB Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 113880 depends on: Show dependency tree
Bug 113880 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2005-11-29 00:38 0000
I figured out how to get WOL support working nicely with Gentoo, but it
requires
a  change to the net.ethX script to _not_ bring down the driver and network
card.  A configuration option would be useful to designate which NIC not to
bring down and also run: 

ethtool -s ethX wol g
(g being a magic packet, but it could be configurable, "pumbagsd" are all valid
options to ethtool)

Another requirement is that /etc/init.d/shutdown.sh needs the 'i' removed from
the a halt command to prevent the network cards from automatically being
shutdown by halt.

Comments?

------- Comment #1 From SpanKY 2005-11-29 06:45:15 0000 -------
lets get wol into the netscripts before we worry about using -i ;)

------- Comment #2 From Roy Marples (RETIRED) 2005-11-29 07:23:34 0000 -------
I'm not too sure about integrating ethtool myself - all it's commands would be
very system specific, so you might as well do this in /etc/conf.d/net

down_eth0="no" # unimplented, but trivial if required
postdown() {
   # Enable WOL for eth0
   if [[ ${IFACE} == "eth0" ]]; then
      ethtool -s "${IFACE}" wol g
   fi
}

We could always document that in /etc/conf.d/net.example

OR we could do this

down_eth0="no" # unimplented, but trivial if required
ethtool_eth0="wol g"

Easier to configure perhaps, but with the added weight of another module

Thoughts?

------- Comment #3 From Ryan Phillips (RETIRED) 2005-11-29 11:01:30 0000 -------
I think the postdown() and down_ethX is much cleaner, and could be more useful.
 All that is really required by the net scripts is not bringing down the
interface.  Add a comment in the postdown() method regarding WOL and we should
be done.

------- Comment #4 From Roy Marples (RETIRED) 2005-11-29 14:34:15 0000 -------
Created an attachment (id=73811) [details]
Wake On LAN patch

This patch adds an example in the postdown function for WOL and adds the
RC_DOWN_INTERFACE variable to /etc/conf.d/rc which is used by net.lo and
shutdown.sh

Wanna test it against baselayout-1.12.0_pre11-r3 ?

------- Comment #5 From Roy Marples (RETIRED) 2005-12-14 01:48:47 0000 -------
Right, 2 people have added themselves to this bug - could either they or the 
reporter please give some indication whether this patch enables a working WOL 
or not. 

------- Comment #6 From Ryan Phillips (RETIRED) 2005-12-20 15:33:53 0000 -------
I shall try it out

------- Comment #7 From Ryan Phillips (RETIRED) 2005-12-20 15:58:22 0000 -------
It worked fine for me.  I tested with the AMD magic packet tool for windows.

------- Comment #8 From Roy Marples (RETIRED) 2005-12-21 03:09:28 0000 -------
Applied to our SVN repo - will be in baselayout-1.12.0_pre13

------- Comment #9 From Roy Marples (RETIRED) 2005-12-21 03:10:05 0000 -------
.

------- Comment #10 From Stolz 2005-12-21 20:17:52 0000 -------
It worked for me too :), thanks.

But instead of using postdown() suggested on the patch, I've used the one from
comment #2, because ethtool complains if you try to activate WOL for "lo" ;)

BTW,for enabling WoL I used to add the "ethtool -s ethX wol g" at
/etc/conf.d/local.stop but it stopped working. Does anyone knowns the reason?

------- Comment #11 From Roy Marples (RETIRED) 2005-12-22 04:59:17 0000 -------
(In reply to comment #10)
> It worked for me too :), thanks.
> 
> But instead of using postdown() suggested on the patch, I've used the one from
> comment #2, because ethtool complains if you try to activate WOL for "lo" ;)

OK, example updated to this

[[ ${IFACE} != "lo" ]] && ethtool -s "${IFACE}" wol g

------- Comment #12 From Roy Marples (RETIRED) 2005-12-22 05:00:25 0000 -------
(In reply to comment #10)
> BTW,for enabling WoL I used to add the "ethtool -s ethX wol g" at
> /etc/conf.d/local.stop but it stopped working. Does anyone knowns the reason?

local gets stopped before net.eth0 - so WOL gets applied by local and then
forgotten as net.eth0 takes the interface down.

Just a guess .....

------- Comment #13 From Roy Marples (RETIRED) 2006-01-04 00:24:08 0000 -------
Fixed in pre13

------- Comment #14 From Martin d'Anjou 2006-02-01 14:02:14 0000 -------
Please consider the following comment:

3c59x cards don't appear to work well with ethtool:
# ethtool -s eth0 wol g
Cannot get current wake-on-lan settings: Operation not supported
  not setting wol

On the other hand, when I use ifconfig eth0 down, I am able to put the adapter
in D3 mode (the mode where I can wake up from lan). See this:

BEFORE:
00:0f.0 Ethernet controller: 3Com Corporation 3c905C-TX/TX-M [Tornado] (rev 78)
  ...
  Status: D0 PME-Enable- DSel=0 DScale=2 PME-

# ifconfig eth0 down

00:0f.0 Ethernet controller: 3Com Corporation 3c905C-TX/TX-M [Tornado] (rev 78)
  ...
  Status: D3 PME-Enable- DSel=0 DScale=2 PME-

Please make sure we can pick either ethtool or ifconfig to put the ethernet
card in WOL mode. Thanks.

------- Comment #15 From Hubert Mercier (RETIRED) 2006-05-05 07:18:00 0000 -------
Great !

This new baselayout release allowed me to make wol work. ASUS A8NSLI / skge
module. Just had to add ethtool -s eth0 wol g to /etc/conf.d/local.stop

Thanks !

------- Comment #16 From SpanKY 2006-08-12 17:25:16 0000 -------
*** Bug 143695 has been marked as a duplicate of this bug. ***

First Last Prev Next    No search results available      Search page      Enter new bug