Wake-On-Lan from hibernation in Fedora

Posted on 2007-07-28
Last Modified: 2013-12-06
I'm trying to setup a fileserver running Fedora 7 that uses Wake-On-Lan to remotely power up from S4 or S3 because these are the options that work according to the BIOS. I'm fairly certain that it's possible to make it work since the ethtool reports the NIC supports the pumbg options. And indeed, when I set the b option (broadcast) and then send a packet over the broadcast address the PC powers up from S4 and S3 even though the lights on the NIC are off.

However this is not ideal and I really need the magic packet option to work. Since the broadcast option is working it's safe to assume that there's no problem with the power supply or the WOL connection. (It's an onboard NIC anyways).

In short I need a way to enable the 'wake on lan with a magic packet option' Some options that I've tried already:

-adding a hook script to cd /etc/pm/sleep.d
-adding options to the halt script (which doesn't work because I'm using S3/S4?)
-using ethtool -s eth0 wol g right before hibernate/suspend
-using ethtool -s eth0 wol bg right before hibernate/suspend (when the PC wakes up after this sometimes only the b option is still enabled or the wol functions are completely disabled.)

I hope we can find a solution to this rather annoying problem.
Question by:KVoet
    LVL 8

    Expert Comment

    What kind of a NIC chip there is on your motherboard? Probably the easiest way (and cheapest when taking into account the cost of time) for you to make it work is to buy a "tried and tested" PCI NIC with WOL that has proper Linux drivers. That however implies that in spite of built in WOL, there's a WOL socket on the motherboard (seen this on several occasions and if you're lucky, this might be the case with yours).

    Author Comment

    I've looked it up and it's a Realtek 8139 chip if that's any help. I'm just about ready to give up and try installing Windows XP again to test the WOL options there.

    And I'm afraid there aren't any PCI slots left in the PC so that will be a problem for your suggested solution.
    LVL 8

    Accepted Solution

    Interesting, 8139too should be one of the most used kernel modules out there which in turn should make your embedded NIC one of the most common ones.

    do you have a 8139too specific line in your /etc/modules.conf ?
    try adding following:

          post-install 8139too ethtool -s eth0 wol umbg

    Author Comment

    Actually the /etc/modules.conf didn't exist on my Fedora 7 installation.
    I've created it and added the command as you suggested.

    There's another oddity I've just discovered. When manually setting the wol options
    using ethtool -s eth0 wol umbg and then hibernating using the pm-hibernate command
    (ethtool reports: "wake on: umbg")
    the PC wakes up (probably due to the broadcast) but when using the
    ethtool eth0 command reports "wake on: umb"

    So as you can see, the g option appears to have disappeared.

    Author Comment

    After reinstalling Windows XP on a small partition it appears the Magic Packet options works when hibernating from Windows XP. Is there any way how I can now make this work from Linux as I'm 100% sure it works under another operating system.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    This document is written for Red Hat Enterprise Linux AS release 4 and ORACLE 10g.  Earlier releases can be installed using this document as well however there are some additional steps for packages to be installed see Metalink. Disclaimer: I hav…
    If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now