View previous topic :: View next topic |
Author |
Message |
sinanqapudan Apprentice
Joined: 26 Oct 2004 Posts: 234 Location: Milan
|
Posted: Fri Nov 29, 2013 8:21 am Post subject: [SOLVED] WOL Not Working |
|
|
Hi there,
I'm having some trouble in getting wake on lan to work. I followed the advice I've foud around in the forums, but still no progress. I'm trying to wol a machine based on a Asrock P4i945GC with a Realtek RTL8111DL onboard LAN and a nic also based on Realtek.
I've followed the advice in the following howtos
http://www.gentoo-wiki.info/Wake_on_LAN
https://forums.gentoo.org/viewtopic-t-460044-start-0.html
http://linux-bsd-sharing.blogspot.it/2012/06/howto-enable-wake-on-lan-on-gentoo.html
as far as possible, since they were written for older time and some configuration file have changed.
This is the output of
Code: | linux # ethtool enp1s0
Settings for enp1s0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: Yes
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Link partner advertised pause frame use: Symmetric
Link partner advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: MII
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbg
Wake-on: d
Current message level: 0x00000033 (51)
drv probe ifdown ifup
Link detected: yes
|
and
Code: | linux # ethtool enp4s1
Settings for enp4s1:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: Yes
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Link partner advertised pause frame use: Symmetric
Link partner advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: MII
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbg
Wake-on: g
Current message level: 0x00000033 (51)
drv probe ifdown ifup
Link detected: yes
|
before I issue the ethtool commands:
Code: | ethtool -s enp1s0 wol g | .
I then added the following:
Code: | ethtool -s enp1s0 wol g
ethtool -s enp4s1 wol g
|
to both /etc/conf.d/local.start and /etc/conf.d/local.stop, halted the system with the halt commanda but it didn't work, both nics were powered off at shutdown.
I then tried to edit the file /etc/init.d/shutdown.sh and changed it from
Code: | # Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
opts="-d"
[ "${INIT_HALT}" != "HALT" ] && opts="${opts}p"
[ "${RC_DOWN_INTERFACE}" = "yes" ] && opts="${opts}i"
[ "${RC_DOWN_HARDDISK}" = "yes" ] && opts="${opts}h"
/sbin/halt "${opts}"
# hmm, if the above failed, that's kind of odd ...
# so let's force a halt
/sbin/halt -f
|
Code: | # Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
opts="-d"
[ "${INIT_HALT}" != "HALT" ] && opts="${opts}p"
[ "${RC_DOWN_INTERFACE}" = "no" ] && opts="${opts}i"
[ "${RC_DOWN_HARDDISK}" = "yes" ] && opts="${opts}h"
ifconfig enp1s0 192.168.2.2 up
/usr/sbin/ethtool -s enp1s0 wol g
ifconfig enp4s1 192.168.2.3 up
/usr/sbin/ethtool -s enp4s1 wol g
/sbin/halt "${opts}"
# hmm, if the above failed, that's kind of odd ...
# so let's force a halt
/sbin/halt -f
|
but still the nics were powered off at shutdown.
Now I'm pretty clueless.
If anyone could help, would be greatly appreciated.
Thanks
Last edited by sinanqapudan on Wed Dec 11, 2013 4:35 pm; edited 1 time in total |
|
Back to top |
|
|
Logicien Veteran
Joined: 16 Sep 2005 Posts: 1555 Location: Montréal
|
Posted: Fri Nov 29, 2013 7:57 pm Post subject: |
|
|
Are you sure that the state of your Ethernet cards after poweroff the computer prevent wakeonlan work when sending magic packets to them?
Did you try to wakeonlan them by sending them magic packets?
Could it be a BIOS setup that disallow WOL?
If the BIOS allow WOL, it should work without more configuration. Even when a network card is poweroff, the light of activity can stay on and the card can receive data and WOL on magic packets. Your enp4s1 card is already set to WOL.
With the wakeonlan package install, the wakeonlan command can send magic packets from a Linux machine to the network card of an other computer of the network for WOL. _________________ Paul |
|
Back to top |
|
|
sinanqapudan Apprentice
Joined: 26 Oct 2004 Posts: 234 Location: Milan
|
Posted: Fri Nov 29, 2013 9:25 pm Post subject: |
|
|
Quote: | Are you sure that the state of your Ethernet cards after poweroff the computer prevent wakeonlan work when sending magic packets to them? |
Yes I'm pretty sure about that. I manage to get wol working after a CMOS. But it only works once and then it stops working.
Quote: | Could it be a BIOS setup that disallow WOL? |
Nope. See previous answer
Quote: | If the BIOS allow WOL, it should work without more configuration. Even when a network card is poweroff, the light of activity can stay on and the card can receive data and WOL on magic packets. Your enp4s1 card is already set to WOL. |
Not if peripheral are powered off at shutdown. See linked howtos.
Quote: | With the wakeonlan package install, the wakeonlan command can send magic packets from a Linux machine to the network card of an other computer of the network for WOL. |
I have several programs for wakeonlan, on linux and on android OS. I send magic packets but nothing happens.
Btw I have an old Toshiba tecra s1 notebook whose nic is not powered off at shutdown (green light always on) and that wakes on lan like a breeze.
The issue is not in the bios set-up, nor in the fact that I don't send magick packets to the PCs. I've come to the conclusion that it is the fact that the cards are powered off at shutdown.
Thanks anyway |
|
Back to top |
|
|
sinanqapudan Apprentice
Joined: 26 Oct 2004 Posts: 234 Location: Milan
|
Posted: Mon Dec 02, 2013 8:40 pm Post subject: |
|
|
Anyone out there willing to lend a hand?
Could someone suggest some configuration such that nic cards are not powered off at shutdown?
Thanks |
|
Back to top |
|
|
wjb l33t
Joined: 10 Jul 2005 Posts: 605 Location: Fife, Scotland
|
Posted: Tue Dec 03, 2013 9:30 am Post subject: |
|
|
The bios is really the most likely place. Sometimes there's an option in the power management which controls whether the cards are fully powered off when the PC shuts down - usually defaulted to being selected. Words like green, low power, power up on pci, .... |
|
Back to top |
|
|
sinanqapudan Apprentice
Joined: 26 Oct 2004 Posts: 234 Location: Milan
|
Posted: Tue Dec 03, 2013 9:49 am Post subject: |
|
|
wjb wrote: | The bios is really the most likely place. Sometimes there's an option in the power management which controls whether the cards are fully powered off when the PC shuts down - usually defaulted to being selected. Words like green, low power, power up on pci, .... |
I believe this does not apply to my case. First of all, when I clear the CMOS and set the bios foe WOL, it works but it only works once and then it stops working. This happens after I halt the system.
So the BIOS settings are correct at least for the first wol and then become corrupted after halting the system? Unlikely, imho.
I also have other PCs for which wol works. Apart from the old toshiba tecra 1 I already mentioned, I also have a new i7 one based on a Gigabyte mobo with an Atheros Qualcomm network controller which required me to add the line
Code: | rc_down_interface="NO" |
to /etc/rc.conf in order not to power off the controller at shutdown. Just to be sure, I checked the lights at the RJ45 socket before and after adding that line and lo and behold! Before no blink, after it started blinking after system halt!
That said, I think incorrect bios settings can be safely ruled out from the list of possible causes. Just to make sure, I will clear the CMOS one more time and check whether the status lights of the network card blink before the first wol.
Thanks anyway |
|
Back to top |
|
|
2bbionic Apprentice
Joined: 24 Mar 2005 Posts: 150
|
Posted: Sat Dec 07, 2013 12:10 pm Post subject: |
|
|
Hello,
i also have som trouble with WOL
After updating my gentoo, a package called "netifrc" occurs on my system - an the RC_DOWN_INTERFACE was missing in rc.conf.
As told in den README, i added "ifdown_eth0="no"" in /etc/onf.d/net - the first test seems promising !!
Her is my net - for comparing purpose:
Code: |
config_eth0="dhcp"
ifdown_eth0="no"
ethtool_change_eth0="wol g"
ifdown="no"
postdown() {
[ "${IFACE}" != "lo" ] && ethtool -s "${IFACE}" wol g
return 0
}
# The network scripts are now part of net-misc/netifrc
# In order to avoid sys-apps/openrc-0.12.4 from removing this file, this comment was
# added; you can safely remove this comment. Please see
# /usr/share/doc/netifrc*/README* for more information.
|
|
|
Back to top |
|
|
sinanqapudan Apprentice
Joined: 26 Oct 2004 Posts: 234 Location: Milan
|
Posted: Wed Dec 11, 2013 4:24 pm Post subject: |
|
|
Solved, at least partially (wol now works with 1 nic out of 2).
The solution in my case came by a change in the kernel.
Over the years I developed a sort of fixation with monolithic kernels, and that led me to build the drivers for the nic directly in the kernel instead of building them as modules.
After having noticed that for my nics the kernel help suggested building them as modules, I switched the configuration and made a clean build. After that (and a manual power on of the system), wol started working perfectly for the onboard nic, but is still not working for the PCI nic.
As far as nic blinking after shutdown is concerned, the peculiar situation my PC is in doesn't allow me to be definite about it: the nic that does'n work of course doesn't blink whilst the nic that works has no leds!
Thanks |
|
Back to top |
|
|
sinanqapudan Apprentice
Joined: 26 Oct 2004 Posts: 234 Location: Milan
|
Posted: Wed Dec 11, 2013 4:30 pm Post subject: |
|
|
2bbionic,
2bbionic wrote: | Hello,
i also have som trouble with WOL
After updating my gentoo, a package called "netifrc" occurs on my system - an the RC_DOWN_INTERFACE was missing in rc.conf.
As told in den README, i added "ifdown_eth0="no"" in /etc/onf.d/net - the first test seems promising !!
Her is my net - for comparing purpose:
Code: |
config_eth0="dhcp"
ifdown_eth0="no"
ethtool_change_eth0="wol g"
ifdown="no"
postdown() {
[ "${IFACE}" != "lo" ] && ethtool -s "${IFACE}" wol g
return 0
}
# The network scripts are now part of net-misc/netifrc
# In order to avoid sys-apps/openrc-0.12.4 from removing this file, this comment was
# added; you can safely remove this comment. Please see
# /usr/share/doc/netifrc*/README* for more information.
|
|
try adding the line
Code: |
rc_down_interface="NO" |
to /etc/rc.conf. Even if in the current rc.conf there's no such instruction to unremark, it works (at least worked for me, in at least two PCs). I added it as the last line in the file.
Give it a try and let us know the results.
Regards,
Sinanqapudan |
|
Back to top |
|
|
2bbionic Apprentice
Joined: 24 Mar 2005 Posts: 150
|
Posted: Wed Dec 11, 2013 5:12 pm Post subject: |
|
|
I also added the statement to my rc.conf, but i can't say if this is the point to get it working.
I'll try this in two weeks - now am just happy to have a working backup server - not running all over the day... |
|
Back to top |
|
|
|