View previous topic :: View next topic |
Author |
Message |
klz n00b
Joined: 07 Jun 2011 Posts: 42
|
Posted: Fri Jun 17, 2011 5:00 pm Post subject: [SOLVED]3C910 -- WOL does not work after shutdown from linux |
|
|
Hello,
I am having difficulties enabling wake on lan after a shutdown from Linux.
When i shutdown from WindowsXP, and issue the following command from another pc on the network:
Code: | wakeonlan ${Hardware Adress} |
The computer wakes up/starts without a hitch. But when i shutdown from Linux after i turned on the magic-wol-option on the networkcard with: Code: | ethtool -s eth0 wol g |
The pc wont start. (ethtool eth0 : tells me the 'p' and 'g' options are both available)
Do i need to enable some kernel option maybe? Or change some setting somewhere?
**edit**
So I found acpitool, gave that a try. To get the list of possible devices to change the power state of:
I got a list of 10 devices, and i didn't know which one was my eth0 so i just enabled all the devices with 'S5'-option. (acpi state S5 = soft-off/power off)
Code: | for i in {1,2,3,4,5}; do acpitool -W $i; done |
Unfortunately still no Wake on Lan ;(
**/edit**
**edit**
Code: | RC_DOWN_INTERFACE="no" |
AND
**/edit**
p.s.
I have an albatron PX865PE PRO (v1) with onboard 3Com 3C910 lan.
Last edited by klz on Fri Jul 08, 2011 11:32 am; edited 3 times in total |
|
Back to top |
|
|
Lomaxx Tux's lil' helper
Joined: 11 Nov 2004 Posts: 112
|
Posted: Sat Jun 18, 2011 8:47 am Post subject: |
|
|
It's been a while that i tried wakeonlan. When i did, i noticed that with my old computer I must not completely remove the power from it. If i do, then the wakeonlan-flag of the onboard-NIC is reset to "off" and wakeonlan won't work. So shutting down the computer is ok. but switching of the PSU or unplugging the powercord does not work for me.
Also i don't think that a kernel-option is needed. When you are sending the magic packet to the computer, there is no kernel running. It's solely a BIOS-setting and/or a setting stored somewhere in the NIC itself(?). But as wakeonlan works from Windows, i do not see what you would need to change there. Still you could check your BIOS settings again for the wakeonlan-option just to be sure
So with the little knowledge i have, I can only think of the following reasons:
- When shutting down Linux the flag is set to "off" again although you manually set it "on". What does ethtool say about it, when you set the flag, verify that it has been set, then reboot directly into Linux again and check the flag with ethtool once again?
- Is at some point maybe the MAC-address changed while booting Linux? I never did that myself, but you can do so. Though i do not know how long this is being stored or would be changed when booting Windows again. It's just a shot in the dark, but maybe investigation into this might bring a clue.
- Some confusion with multiple NICs? Does your computer have more than one NIC? Are you maybe setting the wrong card?
Sorry if i mention things that you probably already tried, but that's all i can think of and sometimes things get stuck due to very simple problems. Here's the HowTo i used back when i tried it: http://en.gentoo-wiki.com/wiki/Wake_on_LAN |
|
Back to top |
|
|
klz n00b
Joined: 07 Jun 2011 Posts: 42
|
Posted: Sun Jun 19, 2011 1:45 am Post subject: |
|
|
Lomaxx wrote: | - When shutting down Linux the flag is set to "off" again although you manually set it "on". What does ethtool say about it, when you set the flag, verify that it has been set, then reboot directly into Linux again and check the flag with ethtool once again? |
I think this might be the problem indeed.. i added `ethtool -s eth0 wol g` to local.start, so after startup the setting seems to be correct (its on 'g'). However the acpitool -w says all disabled after a reboot..
How do i check settings just prior to shutdown, or how can i ensure that my eth0 settings are set to the correct settings at the moment the pc powers down?
- mac adress did not change
- i do not use multiple nics
- i do not remove the power cable, or hardware power switches; i give the `halt` command.../soft-power-off in console
- no need to apologize to reply!! |
|
Back to top |
|
|
javeree Guru
Joined: 29 Jan 2006 Posts: 455
|
Posted: Mon Jun 20, 2011 11:54 am Post subject: |
|
|
For WOL, I understand that while shut down the PC still must provide a little bit of power to the NIC inorder for the NIC to be able to listen for a WOL packet.
I am not ath my PC now, but I believe the setting is in /etc/conf.d/rc and should be:
RC_DOWN_INTERFACE="no" |
|
Back to top |
|
|
Lomaxx Tux's lil' helper
Joined: 11 Nov 2004 Posts: 112
|
Posted: Mon Jun 20, 2011 12:16 pm Post subject: |
|
|
I'd rather add "/usr/sbin/ethtool -s eth0 wol g" to "local.stop" then "local.start". Your Gentoo-system might be configured differently, but I still want to point out that for me the local-init-script (local.stop/local.start) is not being configured anymore in "/etc/conf.d/" but in "/etc/local.d/". If this directory exists, then see /etc/local.d/readme.txt for more details on how to configure it right. Maybe "echo" something to verify that the local.stop-script is run. You should see that on the tty-screen on logout then, if i am not mistaken.
Hm, beside that I don't have much of an idea. Maybe another manual run, where you first run "/etc/init.d/net.eth0 stop" (might not be named "eth0" for you), then "/usr/sbin/ethtool -s eth0 wol g" and the "halt/reboot". But i don't think that the net-init-script takes any influence in this. You could also try disabling X before: log out to the display-manager, press ctrl+alt+f1, log in as root on tty, run "/etc/init.d/xdm stop" and then set wakeonlan and finally "halt/reboot". Maybe there is some network-program running in the background of your desktop-environment that configures something on log-out.
Last but not least try searching the net for your motherboard-name, wakeonlan and linux (in general, not gentoo) might bring some help, but i guess you already did something like that. Good luck. |
|
Back to top |
|
|
Lomaxx Tux's lil' helper
Joined: 11 Nov 2004 Posts: 112
|
Posted: Mon Jun 20, 2011 1:11 pm Post subject: |
|
|
I found a german HowTo, which beside javeree's hint ("Probably a good idea to set RC_DOWN_INTERFACE="no" in /etc/conf.d/rc") mentions that in "/etc/conf.d/net" "ifdown_eth0="NO"" should be set.
Also it reads that on some card ethtools does not work and that the wakeonlan-flag can be set by some kernel-module-options for your card-module.
But first try javeree's hint and that ifdown-setting. Sounds like it might help.[/url] |
|
Back to top |
|
|
klz n00b
Joined: 07 Jun 2011 Posts: 42
|
Posted: Mon Jun 20, 2011 11:39 pm Post subject: |
|
|
Thanks for your replies.
I tried the 2 settings in conf.d/net and conf.d/rc. To no avail unfortunately.
From this site i also tried this Quote: | /etc/init.d/Wakeuponlan |
Code: |
#!/sbin/runscript
depend() {
need net
}
start() {
ebegin "Starting WakeUpOnLan..."
/usr/sbin/ethtool -s eth0 wol g
eend $? "Failed to start ethtool"
}
stop() {
ebegin "activate Wake Up On Lan"
/usr/sbin/ethtool -s eth0 wol g
eend $? "Failed to start ethtool"
}
|
Looks nice so I added it to rc-update:
Code: | rc-update add Wakeuponlan default | but still not working ;(
I also changed my local.start to local.stop, as you propose Lomaxx. Plus added some echo " !!! LOCAL.STOP GETS RUN !! " to it as well. Which i can see at shutdown So it does gets run. Maybe some program/script thats gets run after it still causes the settings to get reset tho? Unsure how to check this.
I am not running X to start with, only use console. So that can't be it either. I use dhcpcd to obtain an IP adress at boot, and thats it regarding automatic-eth0-programs (i think).
Next on my list to try: recompile my kernel and make the tulip (3com) driver a module. So i can maybe shout some options to its ass
And maybe add Wakeuponlan to all the runlevels. |
|
Back to top |
|
|
boerKrelis Apprentice
Joined: 01 Jul 2003 Posts: 241 Location: The Netherlands
|
Posted: Tue Jun 21, 2011 1:38 pm Post subject: |
|
|
klz wrote: |
Next on my list to try: recompile my kernel and make the tulip (3com) driver a module. So i can maybe shout some options to its ass ;)
|
I don't think it's necessary to compile stuff as modules just to be able to pass options. I'm under the impression one can do that with kernel parameters, too. For instance, I have "radeon.modeset=1" as a kernel argument in my grub config's "kernel" line.
Still, while testing, module loading/unloading beats rebooting. Plus you get to run 'modinfo'. |
|
Back to top |
|
|
klz n00b
Joined: 07 Jun 2011 Posts: 42
|
Posted: Fri Jul 08, 2011 11:30 am Post subject: |
|
|
update: I bought a new netword card (Intel Intel PRO/1000 GT) which uses the e1000 kernel module.
Plugged it in, and WOL works like a charm. Now i have gigabit-speed as well =)
Looks like linux-drivers for the 3c910 network chipset dont support wol.. |
|
Back to top |
|
|
|