# [SOLVED] Wake-On-Lan fails with Gentoo

## gsoe

Did you notice the setting in /etc/conf.d/rc:

```
# RC_DOWN_INTERFACE allows you to specify if RC will bring the interface

# completely down when it stops. The default is yes, but there are some

# instances where you may not want this to happen such as using Wake On LAN.

RC_DOWN_INTERFACE="no"
```

----------

## midnite

Hi mate! First of all, i use the VIA pc2500 mainboard. http://www.via.com.tw/en/initiatives/empowered/pc2500_mainboard/index.jsp

i am quite sure WOL fails because of Gentoo. There are 3 cases:

Before loading Gentoo (the system is still counting the RAM, finding the bootloader, etc), i rudely press the power button for 4 seconds. The machine shuts down. In this case, WOL works fine. (i use a WOL software from another laptop within LAN)

After Gentoo has fully started up, i login and shut it down by poweroff or shutdown -h now. In this case, WOL fails.

After Gentoo has fully started up, i rudely press the power button for 4 seconds to shut down the machine. In this case, WOL fails too.

i have read the wiki page of WOL (for many times). Mentioned there: *wiki wrote:*   

> The computer to be woken is shut down (Sleeping, Hibernating or Soft Off, i.e. ACPI state G1 or G2), ...

 i don't really know what "ACPI state G1 or G2" mean. But i guess the cases 2 & 3 mentioned above cannot bring the system to "ACPI state G1 or G2".

In kernel config, i have compiled almost everything in ACPI Support with [*]. (Of course without "Battery" as it is a desktop)

And also, i said yes to all of the VIA drivers.

(Yet, i suppose WOL should be independent to the OS kernel... but Gentoo has the job to bring the system to "ACPI state G1 or G2"... i am not sure)

And also, i tried to dig into the dmesg. *dmesg wrote:*   

> ...
> 
> [    0.879063] via-rhine: Broken BIOS detected, avoid_D3 enabled.
> 
> [    0.879173] via-rhine.c:v1.10-LK1.4.3 2007-03-06 Written by Donald Becker
> ...

 Said there the LAN card BIOS is broken. But WOL works before loading Gentoo anyway (case 1).

i know it is hard to meet someone using the same mainboard here. i just want to ask if anyone has experienced a similar problem - WOL fails with Gentoo, and what was your way out? (begging, i am going to study overseas soon)

Any input is greatly appreciated!!!

----------

## midnite

oh yes! thanks a a lot!

For the time that i could not connect to Gentoo forums (this one) and the Gentoo wiki [http://en.gentoo-wiki.com/], i luckily came across the Gentoo Wiki Archives [http://www.gentoo-wiki.info/Wake_on_LAN]. i followed the settings there. Tried for hours on enabling and disabling the settings. i have now found my way out  :Laughing: 

i found that i only need to emerge -av ethtool and put ethtool -s eth0 wol g into /etc/conf.d/local.start. Now i have ACPI yes but APM no in kernel. Without enable_wol=1 in bootloader. For RC_DOWN_INTERFACE in /etc/conf.d/rc, WOL works fine with both yes or no. It is really not making sense huh! Is it because i have already enabled WOL in my BIOS, so the BIOS "keep interface on" setting speaks louder than the one in rc?

Anyway, my conclusion (it may not apply to your config) is: After enabling it in the BIOS, just emerge -av ethtool and put ethtool -s eth0 wol g into /etc/conf.d/local.start.

Obviously, Wake-on: attribute we find in ethtool eth0 was originally g, or other stuffs rather than the ugly d. Why Gentoo has to disable it when it boots?   :Sad: 

Anyway, i have it sorted!! Let's cerebrate!!

PS why the Gentoo forums and wiki down quite often lately?

----------

