# [solved] WOL, wake on lan, no way to get it working

## 30121963

Hello everybody!

I'm not a newbie, but this is the first time I have to deal with WOL (for a home project), with no success. my configuration:

1 Gentoo desktop (Qualcomm Atheros QCA8171 Gigabit Ethernet (rev 10))

3 old crap like

- HP mini 110 (RTL810xE pci fast ethernet), Gentoo

- Asus eeePC (Qualcomm Atheros AR8152 v2.0), Gentoo

- Asus T200TA, Ubuntu

1 POE smart switch 8 ports + 2 uplink

- all BIOSes wol options are set ok

I followed each and every tutorial, setting /etc/conf.d/net, /etc/local.d/wol.start, /etc/local.d/wol.stop and any combination of it  :Smile: 

problems:

HP is the only pc that is set to "g" after the above local.d settings, all the others rollback to "d" after restart,

if I wakeonlan from the desktop to any of the MAC addresses, nothing happens. btw, HP is the only pc whose network light keeps on after shutdown, and blinks if I send a wakeonlan from the desktop.

afaik , everything should work flawlessly just after enabling the bios. what's wrong then?

btw: I bought the switch from a chinese website, to manage my IP POE security cameras, and it works.

I also noted that the switch pings back (dynamic IP, the desktop is the dhcp server of the wired subnet)..i'm confused: unmanaged switches are L2 and it's specs don't mention it was managed but you know, chinese stuff is an endless surprise..

could be the switch, the issue here? i'm lost..

thanks..Last edited by 30121963 on Thu Oct 22, 2020 6:39 pm; edited 1 time in total

----------

## axl

As far as I can tell, most network cards advertise things that they wont do. For instance, I have a tone of cards that report (with ethtool) that they are capable to wake up on pumbg. G being the only one that works. I never had a card to have "a". And even though some say they will wake up on phy or broadcast or unicast, they dont. The only way to wake it up is to set network wol into G mode, and with the magick packet generated by wakeonlan. But first, make sure you have the right settings in kernel, the init system, and that you are actually sleeping and are not hibernating.

----------

## 30121963

thanks axl.

"g" is the only flag I care about, yes. but even when set, I can't wake the machine. shutdown or suspend-to-ram, no difference.

----------

## axl

well, as long as you can wake up your computer using the button, it should be able to wake up with wol. add the ethernet address to /etc/ethers. 

$arp $hostname

1 per line. it should work. using elogind or systemd?

----------

## Tony0945

Sometimes "energy saving" features on the ethernet card stop WOL. Not having the light is suspicious.

----------

## 30121963

elogind (desktop)

all the others are just command line

even after the ethers file being created, no success.

anyway, shouldn't it work just after proper BIOS setting +ethtools + wakeonlan? just to clear my mind..

----------

## axl

kernel too. and again, make sure you are suspending to ram. I didn't try with elogind, but with systemd, this was about it.

----------

## 30121963

 *Tony0945 wrote:*   

> Sometimes "energy saving" features on the ethernet card stop WOL. Not having the light is suspicious.

 

hi Tony,

the pcs have no GUI, and I managed to compile the kernel with the proper energy management setting..btw, the pcs are 4 Ubuntu and gentoo..the common denominator must be somwhere else, imho. if I can't find a solution here, I'll try to buy a standard unmanaged switch and see.

I'm not sure I am able (reliably) to sniff the magic packets - unless somebody here will help me.

----------

## szatox

I have a few machines that I used to power on with magic packets.

net-misc/wakeonlan sends magic packets.

BIOS options make sure the ethernet (wired) device is waiting for them.

It actually initiates boot sequence, so shutting down or hibernating is perfectly fine. I've never tried it with suspend  to ram. And it has nothing to do with kernel, since the machine is actually powered off.

What are you, guys, trying to do with all those wol services? Manage settings in bios?

30121963, have you tried connecting endpoints directly with a wire? Like in by-passing the switch completely, to rule it out?

----------

## Anon-E-moose

wake on lan may need bios settings (as previously mentioned) but also depends on the sleep state (if the bios allows S1-6) to adjust power settings on the lan.

All of the above is for built in ethernet devices, for add on cards, it'd be different.

----------

## 30121963

 *szatox wrote:*   

> 
> 
> 30121963, have you tried connecting endpoints directly with a wire?
> 
> Like in by-passing the switch completely, to rule it out?

 

yes, no joy.

btw, tried to netcat and it works, both direct and switched.

I will buy and try an ethernet card, just to cut all the hardware and bios variables. 4 defective cards or OSs  is very unlikely but i'm short of ideas.

thanks..

----------

## Tony0945

I'm really thinking that WOL is shut off to save a fraction of a watt. The light not being on the card is a clue.

What hardware is it? R8169? Try the out of kernel R8168 module. Which brand and preferably model mobo? Realtek is really a design spec and the OEM programs it with a custom pin grid array or something like that. I once worked on a printer project like that, control was by way of reads and writes to fixed addresses in the memory mapped array.  

You may prefer the performance (and stability) on an Intel PCIe card. Budgets vary but you can also buy used on e-bay.

I just looked at one of my favorite vendors and they have a raft of Intel 10/100/1000 NIC's for the cost of lunch for two at a mass market restaurant.

----------

## Tony0945

Try this: https://askubuntu.com/questions/1226192/how-can-i-disable-the-ethernet-card-power-saving

Although I have no idea why it would have to run every five seconds. Maybe a kernel patch would shut it off permanently.

Another link: https://unix.stackexchange.com/questions/255810/turn-down-the-energy-efficient-ethernet-eee-aka-green-ethernet

Rgis one in Microsoft but discusses the problem https://techcommunity.microsoft.com/t5/exchange-team-blog/do-you-have-a-sleepy-nic/ba-p/590996

----------

## Tony0945

What:		/sys/devices/.../power/control

Date:		January 2009

Contact:	Rafael J. Wysocki <rjw@rjwysocki.net>

Description:

		The /sys/devices/.../power/control attribute allows the user

		space to control the run-time power management of the device.

		All devices have one of the following two values for the

		power/control file:

		+ "auto\n" to allow the device to be power managed at run time;

		+ "on\n" to prevent the device from being power managed;

		The default for all devices is "auto", which means that they may

		be subject to automatic power management, depending on their

		drivers.  Changing this attribute to "on" prevents the driver

		from power managing the device at run time.  Doing that while

		the device is suspended causes it to be woken up.

----------

## 30121963

update:

the ASUS eeepc can't WOL, despite the "g" in ethtool and any BIOS setting. no time to go deeper so I guess something weird with the ethernet card.

2 other PCs are working now, only if I use:

$ wakeonlan -i [its subnet address] [its MAC address]

I thought the wakonlan command was made to broadcast the MAC address but it seems, the switch blocks the packets if the subnet is not specified..

anyway, stay away from old cheap laptops  :Smile: 

btw, yes: if the switch and/or the PC net card have no ethernet led on + pc off, it likely won't work.

thanks everybody!

----------

