LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   getting system to wake up with WoL (https://www.linuxquestions.org/questions/slackware-14/getting-system-to-wake-up-with-wol-4175651560/)

dimm0k 04-05-2019 02:00 PM

getting system to wake up with WoL
 
Currently running Slackware 14.2 with a custom built kernel 4.4.162 and the following NICs

Intel Corporation Ethernet Connection (2) I218-V
Intel Corporation I211 Gigabit Network Connection (rev 03)

I've turned on WoL on my ASUS X99 Deluxe-II motherboard and am able to get WoL working while dual booted into Windows 10 so I know the hardware is working and ready for WoL. after switching back to Linux however, I can get the system to suspend, but it won't wake up without physical interaction (pressing power or key). I've used 'ethtool' to check the status and turn on WoL

Code:

Supports Wake-on: pumbag
Wake-on: g

but no go... any idea what I might be missing?

upnort 04-05-2019 02:22 PM

Quote:

I can get the system to suspend
Is this a laptop? The lid can't be closed and the laptop has to be connected by Ethernet for WoL to succeed. :)

Also consider adding the following to rc.local:

Code:

# Do not set wol to all supported options. Just 'g'.
/usr/sbin/ethtool -s eth0 wol g


dimm0k 04-05-2019 02:24 PM

Quote:

Originally Posted by upnort (Post 5981584)
Is this a laptop? The lid can't be closed and the laptop has to be connected by Ethernet for WoL to succeed. :)

Also consider adding the following to rc.local:

Code:

# Do not set wol to all supported options. Just 'g'.
/usr/sbin/ethtool -s eth0 wol g


this is actually a desktop, my main workstation. I've added that to the rc.local and rebooted, however still no waking up!

upnort 04-05-2019 02:50 PM

Quote:

still no waking up!
If WOL is working when booted into Windows then the BIOS is set correctly.

Is the system that sends the WOL magic packet on the same subnet as the Slackware system? That is, does the Slackware system have the correct IP address assigned? WOL is UDP and will only work on the same subnet.

Also, there once was (and might still be) a quirk with some NICs on Linux systems that the magic packet has to be sent to the reversed MAC address. For example:

Code:

MAC address=AA:BB:CC:DD:EE:FF
Reversed address=FF:EE:DD:CC:BB:AA

Try sending the magic packet to both MAC addresses.

camorri 04-05-2019 06:20 PM

WOL is an SBo package. Do you have it istalled?

dimm0k 04-05-2019 08:37 PM

Quote:

Originally Posted by upnort (Post 5981591)
If WOL is working when booted into Windows then the BIOS is set correctly.

Is the system that sends the WOL magic packet on the same subnet as the Slackware system? That is, does the Slackware system have the correct IP address assigned? WOL is UDP and will only work on the same subnet.

Also, there once was (and might still be) a quirk with some NICs on Linux systems that the magic packet has to be sent to the reversed MAC address. For example:

Code:

MAC address=AA:BB:CC:DD:EE:FF
Reversed address=FF:EE:DD:CC:BB:AA

Try sending the magic packet to both MAC addresses.

just tried, however no go on this as well! I should be able to use WoL right out of the box without any extra software packages or kernel changes correct? and yes, the machine is given the same IP address when I'm in Linux or in Windows with only one subnet here since it's a home network.




Quote:

Originally Posted by camorri (Post 5981657)
WOL is an SBo package. Do you have it istalled?

as I understand, the WOL SBo package is to allow one to wake up other devices correct? not to allow the machine it's installed on to work?

camorri 04-06-2019 06:01 AM

Quote:

as I understand, the WOL SBo package is to allow one to wake up other devices correct? not to allow the machine it's installed on to work?
Yes, that is correct.

What do you see on the target machine if you run the command as root, /usr/bin/ethtool eth0 ?

This is the output from a machine that works for me.

Quote:

/usr/sbin/ethtool eth0
Settings for eth0:
Supported ports: [ MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 1
Transceiver: external
Auto-negotiation: on
Supports Wake-on: g
Wake-on: g
Link detected: yes

dimm0k 04-06-2019 07:51 AM

Quote:

Originally Posted by camorri (Post 5981784)
Yes, that is correct.

What do you see on the target machine if you run the command as root, /usr/bin/ethtool eth0 ?

This is the output from a machine that works for me.

here's the output from my machine... looks similar to yours!

Code:

ettings for eth1:
        Supported ports: [ TP ]
        Supported link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Supported pause frame use: No
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Advertised pause frame use: No
        Advertised auto-negotiation: Yes
        Speed: 1000Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: on
        MDI-X: off (auto)
        Supports Wake-on: pumbg
        Wake-on: g
        Current message level: 0x00000007 (7)
                              drv probe link
        Link detected: yes


camorri 04-06-2019 08:15 AM

The only thing I see, is a speed difference between our set ups.

This is just me guessing now. Either there is something wrong with your ethernet card that is not obvious, or the power supply is not responding to the signal the ethernet card to turn on.

Have you had a look through your BIOS/UEFI settings for any possible problem?

Is it possible to try another ethernet card?

camorri 04-06-2019 09:39 AM

This is from the Arch wiki on WOL.

Quote:

Hardware settings
The target computer's motherboard and Network Interface Controller have to support Wake-on-LAN. The target computer has to be physically connected (with a cable) to a router or to the source computer, wireless cards do not support WoL.

The Wake-on-LAN feature also has to be enabled in the computer's BIOS. Different motherboard manufacturers use slightly different language for this feature. Look for terminology such as "PCI Power up", "Allow PCI wake up event" or "Boot from PCI/PCI-E".

Note that some motherboards are affected by a bug that can cause immediate or random #Wake-up after shutdown whenever the BIOS WoL feature is enabled.
Something you could check out.

The entire article. -->https://wiki.archlinux.org/index.php/Wake-on-LAN

dimm0k 04-06-2019 11:13 AM

Quote:

Originally Posted by camorri (Post 5981809)
The only thing I see, is a speed difference between our set ups.

This is just me guessing now. Either there is something wrong with your ethernet card that is not obvious, or the power supply is not responding to the signal the ethernet card to turn on.

Have you had a look through your BIOS/UEFI settings for any possible problem?

Is it possible to try another ethernet card?

Well, as mentioned in my original post, this is working well when I'm in Windows so hardware wise I think things are set up for it to work. the interesting thing is when I use

Code:

tcpdump -v -i eth1 ether proto 0x0842
I can see that there are no packets hitting my machine UNTIL I put the system into suspend. Then for a short time frame tcpdump actually captures some packets coming from a WoL packet before the system total suspends everything. I've also tried it on the second NIC that this PC has, different Intel chipset and also no go!

Quote:

Originally Posted by camorri (Post 5981843)
This is from the Arch wiki on WOL.



Something you could check out.

The entire article. -->https://wiki.archlinux.org/index.php/Wake-on-LAN

using netcat as "nc -u -l -p 9" I can see that the magic packet is definitely being received on this machine! reading over the rest of that wiki, I'm still at a loss as to why my machine is not waking up despite the packet being received!

upnort 04-06-2019 01:20 PM

As this is a desktop rather than a laptop, try a different approach. Do not suspend. Instead power down and then attempt awaken the system.

If the system awakens then start looking into ACPI configs.

dimm0k 04-06-2019 02:20 PM

Quote:

Originally Posted by upnort (Post 5981912)
As this is a desktop rather than a laptop, try a different approach. Do not suspend. Instead power down and then attempt awaken the system.

If the system awakens then start looking into ACPI configs.

if I power down the system then WoL solely depends on the BIOS of the machine to boot up correct? just wondering if Linux and Windows would operate on different ACPI configs, because as mentioned it's working fine in Windows. I am curious to see if it'll boot up from cold so I'll give that a try later.

upnort 04-06-2019 04:48 PM

The NIC must have standby power to receive and see the magic packet.

I am guessing your testing with Windows was with that OS in suspend mode rather than powered down. As your testing with suspend mode succeeds, power down from the Windows side. Send the WOL magic packet. If the system fails to awaken, then check the BIOS power management (ACPI) options. If the system awakens then you must already have standby power configured in the BIOS.

Many modern motherboards have a single LED to indicate when the system is using standby power. If you have your systems connected through a switch, the respective LED on the switch will remain on when a connected system is powered down but using standby power.

nivieru 04-07-2019 03:07 PM

I remember once I had to add
Code:

/usr/sbin/ethtool -s eth0 wol g
(or some similar command) also to an rc script that run during shutdown, because for some reason it got changed somewhere during the shutdown process. Perhaps something similar is going on when suspending?


All times are GMT -5. The time now is 09:15 PM.