Michael de Silva's Blog

Software Engineer. Rubyist and Roboticist.

Michael de Silva's Blog

Software Engineer. Rubyist and Roboticist.

Enabling WOL (Wake on Lan) in Ubuntu 16.10

To enable WOL support, first restart your system and enter the EFI firmware (also called the EFI "BIOS" as a misnomer!). I'm running Asus systems at home, and quite honestly, their new EFI UIs are pretty slick.

In any case, head over to Advanced > APM. In this view, Power On By PCI-E/PCI should be set to enabled. Couple examples of this view are shown below

Now restart your system once more and boot into Ubuntu.

In a terminal run sudo ethtool <interface> where you can find the correct interface via ifconfig -a — obviously pick the one showing the correct IP. At the bottom, you want this output to show Wake-on: g since this indicates wake on Magic Packet is enabled.

mdesilva@skylake:~ sudo ethtool enp0s31f6
[sudo] password for mdesilva:
Settings for enp0s31f6:
        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: on (auto)
        Supports Wake-on: pumbg
        Wake-on: g
        Current message level: 0x00000007 (7)
                               drv probe link
        Link detected: yes

Add NETDOWN=no in /etc/default/halt to prevent powering off the network card during shutdown. That's it!

Since my development box is a Mac, I did brew install wakeonlan and setup a ZSH alias for wakeonlan <MAC Address> where the MAC address is that of your network card; it will be the same MAC address as the one shown earlier via ifconfig.

You can also confirm this by running ping -c3 <Target IP> && arp -a and compare the MAC address just to be sure.

comments powered by Disqus