How to enable Wake On Lan

Dear Volumio users (of which I am one: recently my ancient Squeezebox gave up the ghost, and I chose Volumio as its replacement): perhaps this may be useful to you.
It has probably been posted by someone else in the past, but you never know.
(Note: my solution worked for an x86-64 Volumio box. I did not test it on other platforms.)

What is Wake On Lan (WOL)?
WOL is a feature of many mainboards that allows the machine to be turned on remotely by sending a so-called “magic packet” to its network card via the Ethernet port.

Why do I need WOL?
Because it lets you power up your Volumio box from another device (connected to the same network) without even having to move from your sofa (or armchair, or chair, or bed, or whatever).
So: because of laziness and because it’s nice to be able to do this kind of pseudo-magic things :slight_smile:

What are the preconditions for WOL?
You need to have Volumio installed on a system that supports WOL (mosts motherboards do), and some time to spare.
Also, you need to turn on SSH access to your Volumio box, so you can tinker with system files (you will need to, a little bit).

How do I enable WOL?
This is the (mildly) tricky part. My starting point has been this link
In a nutshell, to enable WOL you need to do two things:

  1. enable WOL via BIOS (not always it’s on by default);
  2. fiddle with the software of the operating system

Unfortunately, the solution proposed by the document I linked above worked, but only until the machine was restarted. Then my WOL disappeared. In a word, it was not persistent.
However, I had enough information to look further into the issue. Annnd… I found a persistent, and pleasantly simple, solution.
In short: to get persistent activation of the WOL functionality you have to modify system file /etc/network/interfaces so that its contents are as follows. (Make a backup copy of the original first, so if you are not happy you can revert to that version.)

auto wlan0
auto lo
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet manual
post-up /sbin/ethtool -s eth0 wol g

allow-hotplug wlan0
iface wlan0 inet manual

Er, that’s it. On my Volumio box, after this change WOL works flawlessly.
Happy lazying!

Addendum: in your Volumio system the names of network interfaces may be different from wlan0 and eth0. You have to adapt the above file to your specific Volumio box by using the correct names, that you find in the original version of /etc/network/interfaces.

I’ve never used WOL before. Once this is set up, how do you trigger the wake up?

I (like me) you use Linux, you can use the command-line utility wakeonlan or the graphical interface GWakeonlan. Both should be easily available.
For other operating systems I suppose there are equivalent, free and simple programs.

What you must tell the program to identify what device you want to send the WOL “magic packet” to is the MAC address (physical address) of the network interface of the device. You can get the MAC in many ways: for instance, on Linux and (I think also MacOS) you simply use command ifconfig from the command line. I seem to remember that Windows provides a similar command, only needing an option like /all or something similar to provide full information on a network card.

1 Like

It works.
Good work!
Peter

Thanks! :smiley:

Perfect, thank you.

Happy to have helped!