How to enable Wake On Lan (WOL) in Ubuntu 16.04Ubuntu suspend turns off NICwake on lan not working if i turn of with ubuntuHow do I enable Wake on LAN with Ubuntu?How can I enable wol on Ubuntu server 16.04?How to enable WOL on Ubuntu 16.10?Wake On Lan not working on HPZ600remote boot option selectHow can I enable wake-on-lan permanently?Wake on demand (WOD, WOL)Wake On Lan (WOL) for Realtek RTL8101E/RTL8102EHow can I Wake-on-LAN mulitple (WoL) clients at once?Wake-On-LAN for ASROCK H81M-ITXHow to enable WOL on Ubuntu 16.10?

Caesar cipher implementation in c++

What is the last point where one can throw away fruits if one has indicated "not bringing any fruit" on the US customs form when flying to the US?

What would be the price of Adamantine Plate armor?

When does "The Mandalorian" take place?

A novel about "helpful" woodlice aliens who eventually end up destroying every civilization they try to help

Size Does Matter (at least referring to bottles)

Ideal Firearms for time travel or low tech universe exploration

Did any astronauts on a mission complain about waking up?

SQL Server - Snapshot is useful in production environments?

:wq command not found

Is 忍者/忍び also used for women?

Phrase/Word-pair for a variant of master-slave relationship

How to respond to requests to retest, in hope that the bug is gone?

Area of diagonal-folded regular polygon

Questions about go around safety

Does Global Entry require agreeing to a higher standard of behavior?

How to understand quality of Google Maps transport info in advance?

What is the relationship between taxes and annual liquidation of the markets?

Why do the Rebels probe the section of the shield within the gate?

How can a person Insulate copper wire in a medieval world?

Having trouble with TikZ -- For Loop and Conditionals

What does Darth Vader think Obi-Wan's referring to when Obi says "If you strike me down..."

C: Can't pass '#' as command-line argument

How do HK restaurants keep wok-fried scallops white, with no visible sear marks?



How to enable Wake On Lan (WOL) in Ubuntu 16.04


Ubuntu suspend turns off NICwake on lan not working if i turn of with ubuntuHow do I enable Wake on LAN with Ubuntu?How can I enable wol on Ubuntu server 16.04?How to enable WOL on Ubuntu 16.10?Wake On Lan not working on HPZ600remote boot option selectHow can I enable wake-on-lan permanently?Wake on demand (WOD, WOL)Wake On Lan (WOL) for Realtek RTL8101E/RTL8102EHow can I Wake-on-LAN mulitple (WoL) clients at once?Wake-On-LAN for ASROCK H81M-ITXHow to enable WOL on Ubuntu 16.10?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









26

















How to enable Wake On Lan (WOL) in Ubuntu 16.04 LTS?










share|improve this question
































    26

















    How to enable Wake On Lan (WOL) in Ubuntu 16.04 LTS?










    share|improve this question




























      26












      26








      26


      20






      How to enable Wake On Lan (WOL) in Ubuntu 16.04 LTS?










      share|improve this question















      How to enable Wake On Lan (WOL) in Ubuntu 16.04 LTS?







      16.04 wakeonlan






      share|improve this question














      share|improve this question











      share|improve this question




      share|improve this question










      asked Apr 28 '16 at 7:09









      nkefnkef

      9111 gold badge8 silver badges14 bronze badges




      9111 gold badge8 silver badges14 bronze badges























          7 Answers
          7






          active

          oldest

          votes


















          21


















          I've found a better way that worked for me. At least a cleaner way. Apparently Ubuntu changed upstart for systemd, in Ubuntu 15.04, Ubuntu 16.04 and presumably next versions too. I'm new to both systems but this worked for me.



          I'm posting this because while googling Ubuntu 16 wol and other similar searches I came across with this post several times. This could help somebody else.



          To keep WOL working, I had to re-enable it every time the system booted. To avoid doing this manually I used systemd for this purpose. This is what I did:




          1. First, create the file /etc/systemd/system/wol@.service (keep the @ symbol). Put this in it:



            [Unit]
            Description=Wake-on-LAN for %i
            Requires=network.target
            After=network.target

            [Service]
            ExecStart=/sbin/ethtool -s %i wol g
            Type=oneshot

            [Install]
            WantedBy=multi-user.target



          2. Enable this for the interface on boot, run the following command (change eth3 with your interface):



            systemctl enable wol@eth3


            You should see something like this:



            Created symlink from /etc/systemd/system/multi-user.target.wants/wol@eth3.service to /etc/systemd/system/wol@.service.



          3. To check if it's enabled, run the following command (change eth3 with your interface) and it should return enabled:



            systemctl is-enabled wol@eth3



          4. To test this, reboot and run (change eth3 with your interface):



            ethtool eth3


            You should see a line with the following:



            Wake-on: g



          Sources:



          • SystemdForUpstartUsers - Ubuntu Wiki

          • Wake-on-LAN - ArchWiki

          • systemd - ArchWiki


          • upstart:




            Upstart is an event-based replacement for the /sbin/init daemon which
            handles starting of tasks and services during boot, stopping them
            during shutdown and supervising them while the system is running.

            - upstart - event-based init daemon





          • systemd:




            systemd is a suite of basic building blocks for a Linux system. It provides a system and service manager that runs as PID 1 and starts the rest of the system. (...)
            - systemd








          share|improve this answer























          • 2





            +1 this is way better. should be the accepted one.

            – Stefanos Kalantzis
            Nov 29 '17 at 20:27


















          19


















          In Ubuntu 16.04 set WOL_DISABLE=N in /etc/default/tlp to avoid getting WOL disabled by TLP power management.



          http://linrunner.de/en/tlp/docs/tlp-configuration.html



          Add NETDOWN=no in /etc/default/halt to prevent powering off the network card during shutdown



          Enable Wake on LAN in /etc/network/interfaces when static network configuration is used.



          # This file describes the network interfaces available on your system
          # and how to activate them. For more information, see interfaces(5).
          # The loopback network interface

          auto lo
          iface lo inet loopback
          # The primary network interface

          auto eth0
          iface eth0 inet static
          address 192.168.0.10
          netmask 255.255.255.0
          gateway 192.168.0.1
          dns-nameservers 192.168.0.1
          up ethtool -s eth0 wol g


          Enable wake on lan in BIOS, enter the BIOS setup and look for something called "Wake up on PCI event", "Wake up on LAN" or similar. Change it so that it is enabled. Save your settings and reboot.



          https://help.ubuntu.com/community/WakeOnLan



          Warning some motherboards / network controllers don't support WOL from the cold boot (S5 state, where the power to the system is physically turned off and back on again). In that case, at least one power cycle (power up, shutdown) has to be performed. To mitigate to the problem, the BIOS can be configured to power up when AC is restored and schedule a shutdown inside Ubuntu afterwards. Refer to the motherboard's manual for further details.






          share|improve this answer




























          • This worked for me on 14.04 LTS. Thank you!

            – TenLeftFingers
            May 22 '16 at 16:56











          • those two comments about WOL_DISABLE=N and NETDOWN=no should be part of help.ubuntu.com/community/WakeOnLan

            – Alecz
            Apr 5 '18 at 1:25


















          3


















          In order for WOL to work, make sure your ethernet interface is properly being shut down by your system when you poweroff.



          Try the following:




          1. Create a bash script called wol_poweroff.sh on the /etc/rc6.d/ directory:



            sudo nano /etc/rc6.d/wol_poweroff.sh



          2. Put this code in it:



            #!/bin/bash
            ifconfig eth0 down
            poweroff



          3. Copy it to the /etc/rc0.d directory (so it also works with halt):



            sudo cp /etc/rc6.d/wol_poweroff.sh /etc/rc0.d/wol_poweroff.sh



          4. Make them both executable:



            sudo chmod 755 /etc/rc6.d/wol_poweroff.sh
            sudo chmod 755 /etc/rc0.d/wol_poweroff.sh


          Now test to see if it works by powering down your machine with sudo shutdown now or sudo poweroff and using a WOL tool to send a magic packet to it.




          That was the only thing that worked for me. I found those steps at a bug report at launchpad.net.



          According to the author, Robbie Williamson, this works because of the following:




          To get WOL to work the ethernet interface must be properly brought down as part of the system shutdown. This should be performed as part of run levels rc0 and rc6, noting that Linux typically has 7 different run levels (or operating modes):



          rc0.d - System Halted



          rc1.d - Single User Mode



          rc2.d - Single User Mode with Networking



          rc3.d - Multi-User Mode - boot up in text mode



          rc4.d - Not yet Defined



          rc5.d - Multi-User Mode - boot up in X Windows



          rc6.d - Shutdown & Reboot





          Source: https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/981461






          share|improve this answer



































            2


















            Run the following in the terminal:



            sudo ethtool -s your network interface wol g 
            sudo ethtool your network interface


            you should see a g next to wake on lan after writing the second command



            source






            share|improve this answer



































              2


















              If you use NetworkManager, then you can enable WOL via nmcli:



              nmcli connection show


              Remember NAME of the connection of "802-3-ehternet" TYPE for DEVICE of interest. Say it name is "Wired connection 1". Then modify it properly:



              nmcli connection modify "Wired connection 1" 802-3-ethernet.wake-on-lan magic


              To get its MAC address:



              nmcli connection show "Wired connection 1" | grep 802-3-ethernet.mac-address


              From now you can turn it off and turn it on from another machine on the same LAN by wakeonlan 1a:2b:3c:4d:5e:6f command, where 1a:2b:3c:4d:5e:6f is MAC address of the LAN card from previous step.






              share|improve this answer

































                1


















                Besides parameters suggested by @nkef you can set the following in /etc/network/interfaces if you use DHCP instead of static IP settings for the LAN adapter (here named eth0):



                auto lo
                iface lo inet loopback

                auto eth0
                iface eth0 inet dhcp
                ethernet-wol g


                (tested on Ubuntu 16.04 LTS).






                share|improve this answer

































                  1


















                  This just bit me too under Ubuntu 18.04 (headless / minimal install), unfortunately the answers already listed here although they may seem to work at times are not going to provide a reliable solution as they create race conditions or fight with the likes of systemd, netplan and udev.



                  I had tried this approach too at first and it seemed to work, I am scheduling a system to boot each evening via WakeOnLan to run backups as the system BIOS does not provide a scheduled AC on option.



                  It would work for a few days and then refuse to wake, powering it on manually and running ethtool revealed that WoL had been disabled :



                   Wake-on: d


                  So I figured something else had to be turning it back off and having had many such issues in the last few years with systemd taking over parts of the system I decided to start here, lo and behold:



                  WakeOnLan=
                  ..
                  ..
                  Defaults to off.



                  https://www.freedesktop.org/software/systemd/man/systemd.link.html



                  Examples online show something along the lines of :



                  /etc/systemd/network/50-wired.link



                  [Match]
                  MACAddress=<MAC ADDRESS>

                  [Link]
                  WakeOnLan=magic


                  How ever this was still not working. Then I came across this :



                  udevadm test-builtin net_setup_link /etc/systemd/network/50-wired.link


                  which resulted in :



                  Load module index
                  Parsed configuration file /lib/systemd/network/99-default.link
                  Parsed configuration file /etc/systemd/network/50-wired.link
                  Parsed configuration file /run/systemd/network/10-netplan-eno1.link


                  And what do I find in /run/systemd/network/10-netplan-eno1.link ?



                  [Match]
                  MACAddress=<MAC ADDRESS>

                  [Link]
                  Name=eno1
                  WakeOnLan=off


                  Solution Either:



                  1. remove netplan,

                  2. setup networking via a netplan configuration,

                  3. or set the systemd .link file to have a higher priority.

                  As I already had the systemd .link file I simply renamed it to 00-wired.link, rebooted
                  and now ethtool eno1 reports:



                   Wake-on: g


                  Without any extra services solely for the purpose of trying to enable WoL.






                  share|improve this answer





























                    Your Answer








                    StackExchange.ready(function()
                    var channelOptions =
                    tags: "".split(" "),
                    id: "89"
                    ;
                    initTagRenderer("".split(" "), "".split(" "), channelOptions);

                    StackExchange.using("externalEditor", function()
                    // Have to fire editor after snippets, if snippets enabled
                    if (StackExchange.settings.snippets.snippetsEnabled)
                    StackExchange.using("snippets", function()
                    createEditor();
                    );

                    else
                    createEditor();

                    );

                    function createEditor()
                    StackExchange.prepareEditor(
                    heartbeatType: 'answer',
                    autoActivateHeartbeat: false,
                    convertImagesToLinks: true,
                    noModals: true,
                    showLowRepImageUploadWarning: true,
                    reputationToPostImages: 10,
                    bindNavPrevention: true,
                    postfix: "",
                    imageUploader:
                    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                    allowUrls: true
                    ,
                    onDemand: true,
                    discardSelector: ".discard-answer"
                    ,immediatelyShowMarkdownHelp:true
                    );



                    );














                    draft saved

                    draft discarded
















                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f764158%2fhow-to-enable-wake-on-lan-wol-in-ubuntu-16-04%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown


























                    7 Answers
                    7






                    active

                    oldest

                    votes








                    7 Answers
                    7






                    active

                    oldest

                    votes









                    active

                    oldest

                    votes






                    active

                    oldest

                    votes









                    21


















                    I've found a better way that worked for me. At least a cleaner way. Apparently Ubuntu changed upstart for systemd, in Ubuntu 15.04, Ubuntu 16.04 and presumably next versions too. I'm new to both systems but this worked for me.



                    I'm posting this because while googling Ubuntu 16 wol and other similar searches I came across with this post several times. This could help somebody else.



                    To keep WOL working, I had to re-enable it every time the system booted. To avoid doing this manually I used systemd for this purpose. This is what I did:




                    1. First, create the file /etc/systemd/system/wol@.service (keep the @ symbol). Put this in it:



                      [Unit]
                      Description=Wake-on-LAN for %i
                      Requires=network.target
                      After=network.target

                      [Service]
                      ExecStart=/sbin/ethtool -s %i wol g
                      Type=oneshot

                      [Install]
                      WantedBy=multi-user.target



                    2. Enable this for the interface on boot, run the following command (change eth3 with your interface):



                      systemctl enable wol@eth3


                      You should see something like this:



                      Created symlink from /etc/systemd/system/multi-user.target.wants/wol@eth3.service to /etc/systemd/system/wol@.service.



                    3. To check if it's enabled, run the following command (change eth3 with your interface) and it should return enabled:



                      systemctl is-enabled wol@eth3



                    4. To test this, reboot and run (change eth3 with your interface):



                      ethtool eth3


                      You should see a line with the following:



                      Wake-on: g



                    Sources:



                    • SystemdForUpstartUsers - Ubuntu Wiki

                    • Wake-on-LAN - ArchWiki

                    • systemd - ArchWiki


                    • upstart:




                      Upstart is an event-based replacement for the /sbin/init daemon which
                      handles starting of tasks and services during boot, stopping them
                      during shutdown and supervising them while the system is running.

                      - upstart - event-based init daemon





                    • systemd:




                      systemd is a suite of basic building blocks for a Linux system. It provides a system and service manager that runs as PID 1 and starts the rest of the system. (...)
                      - systemd








                    share|improve this answer























                    • 2





                      +1 this is way better. should be the accepted one.

                      – Stefanos Kalantzis
                      Nov 29 '17 at 20:27















                    21


















                    I've found a better way that worked for me. At least a cleaner way. Apparently Ubuntu changed upstart for systemd, in Ubuntu 15.04, Ubuntu 16.04 and presumably next versions too. I'm new to both systems but this worked for me.



                    I'm posting this because while googling Ubuntu 16 wol and other similar searches I came across with this post several times. This could help somebody else.



                    To keep WOL working, I had to re-enable it every time the system booted. To avoid doing this manually I used systemd for this purpose. This is what I did:




                    1. First, create the file /etc/systemd/system/wol@.service (keep the @ symbol). Put this in it:



                      [Unit]
                      Description=Wake-on-LAN for %i
                      Requires=network.target
                      After=network.target

                      [Service]
                      ExecStart=/sbin/ethtool -s %i wol g
                      Type=oneshot

                      [Install]
                      WantedBy=multi-user.target



                    2. Enable this for the interface on boot, run the following command (change eth3 with your interface):



                      systemctl enable wol@eth3


                      You should see something like this:



                      Created symlink from /etc/systemd/system/multi-user.target.wants/wol@eth3.service to /etc/systemd/system/wol@.service.



                    3. To check if it's enabled, run the following command (change eth3 with your interface) and it should return enabled:



                      systemctl is-enabled wol@eth3



                    4. To test this, reboot and run (change eth3 with your interface):



                      ethtool eth3


                      You should see a line with the following:



                      Wake-on: g



                    Sources:



                    • SystemdForUpstartUsers - Ubuntu Wiki

                    • Wake-on-LAN - ArchWiki

                    • systemd - ArchWiki


                    • upstart:




                      Upstart is an event-based replacement for the /sbin/init daemon which
                      handles starting of tasks and services during boot, stopping them
                      during shutdown and supervising them while the system is running.

                      - upstart - event-based init daemon





                    • systemd:




                      systemd is a suite of basic building blocks for a Linux system. It provides a system and service manager that runs as PID 1 and starts the rest of the system. (...)
                      - systemd








                    share|improve this answer























                    • 2





                      +1 this is way better. should be the accepted one.

                      – Stefanos Kalantzis
                      Nov 29 '17 at 20:27













                    21














                    21










                    21









                    I've found a better way that worked for me. At least a cleaner way. Apparently Ubuntu changed upstart for systemd, in Ubuntu 15.04, Ubuntu 16.04 and presumably next versions too. I'm new to both systems but this worked for me.



                    I'm posting this because while googling Ubuntu 16 wol and other similar searches I came across with this post several times. This could help somebody else.



                    To keep WOL working, I had to re-enable it every time the system booted. To avoid doing this manually I used systemd for this purpose. This is what I did:




                    1. First, create the file /etc/systemd/system/wol@.service (keep the @ symbol). Put this in it:



                      [Unit]
                      Description=Wake-on-LAN for %i
                      Requires=network.target
                      After=network.target

                      [Service]
                      ExecStart=/sbin/ethtool -s %i wol g
                      Type=oneshot

                      [Install]
                      WantedBy=multi-user.target



                    2. Enable this for the interface on boot, run the following command (change eth3 with your interface):



                      systemctl enable wol@eth3


                      You should see something like this:



                      Created symlink from /etc/systemd/system/multi-user.target.wants/wol@eth3.service to /etc/systemd/system/wol@.service.



                    3. To check if it's enabled, run the following command (change eth3 with your interface) and it should return enabled:



                      systemctl is-enabled wol@eth3



                    4. To test this, reboot and run (change eth3 with your interface):



                      ethtool eth3


                      You should see a line with the following:



                      Wake-on: g



                    Sources:



                    • SystemdForUpstartUsers - Ubuntu Wiki

                    • Wake-on-LAN - ArchWiki

                    • systemd - ArchWiki


                    • upstart:




                      Upstart is an event-based replacement for the /sbin/init daemon which
                      handles starting of tasks and services during boot, stopping them
                      during shutdown and supervising them while the system is running.

                      - upstart - event-based init daemon





                    • systemd:




                      systemd is a suite of basic building blocks for a Linux system. It provides a system and service manager that runs as PID 1 and starts the rest of the system. (...)
                      - systemd








                    share|improve this answer
















                    I've found a better way that worked for me. At least a cleaner way. Apparently Ubuntu changed upstart for systemd, in Ubuntu 15.04, Ubuntu 16.04 and presumably next versions too. I'm new to both systems but this worked for me.



                    I'm posting this because while googling Ubuntu 16 wol and other similar searches I came across with this post several times. This could help somebody else.



                    To keep WOL working, I had to re-enable it every time the system booted. To avoid doing this manually I used systemd for this purpose. This is what I did:




                    1. First, create the file /etc/systemd/system/wol@.service (keep the @ symbol). Put this in it:



                      [Unit]
                      Description=Wake-on-LAN for %i
                      Requires=network.target
                      After=network.target

                      [Service]
                      ExecStart=/sbin/ethtool -s %i wol g
                      Type=oneshot

                      [Install]
                      WantedBy=multi-user.target



                    2. Enable this for the interface on boot, run the following command (change eth3 with your interface):



                      systemctl enable wol@eth3


                      You should see something like this:



                      Created symlink from /etc/systemd/system/multi-user.target.wants/wol@eth3.service to /etc/systemd/system/wol@.service.



                    3. To check if it's enabled, run the following command (change eth3 with your interface) and it should return enabled:



                      systemctl is-enabled wol@eth3



                    4. To test this, reboot and run (change eth3 with your interface):



                      ethtool eth3


                      You should see a line with the following:



                      Wake-on: g



                    Sources:



                    • SystemdForUpstartUsers - Ubuntu Wiki

                    • Wake-on-LAN - ArchWiki

                    • systemd - ArchWiki


                    • upstart:




                      Upstart is an event-based replacement for the /sbin/init daemon which
                      handles starting of tasks and services during boot, stopping them
                      during shutdown and supervising them while the system is running.

                      - upstart - event-based init daemon





                    • systemd:




                      systemd is a suite of basic building blocks for a Linux system. It provides a system and service manager that runs as PID 1 and starts the rest of the system. (...)
                      - systemd









                    share|improve this answer















                    share|improve this answer




                    share|improve this answer








                    edited Oct 29 at 20:36

























                    answered Mar 11 '17 at 19:33









                    loco.looploco.loop

                    3192 silver badges6 bronze badges




                    3192 silver badges6 bronze badges










                    • 2





                      +1 this is way better. should be the accepted one.

                      – Stefanos Kalantzis
                      Nov 29 '17 at 20:27












                    • 2





                      +1 this is way better. should be the accepted one.

                      – Stefanos Kalantzis
                      Nov 29 '17 at 20:27







                    2




                    2





                    +1 this is way better. should be the accepted one.

                    – Stefanos Kalantzis
                    Nov 29 '17 at 20:27





                    +1 this is way better. should be the accepted one.

                    – Stefanos Kalantzis
                    Nov 29 '17 at 20:27













                    19


















                    In Ubuntu 16.04 set WOL_DISABLE=N in /etc/default/tlp to avoid getting WOL disabled by TLP power management.



                    http://linrunner.de/en/tlp/docs/tlp-configuration.html



                    Add NETDOWN=no in /etc/default/halt to prevent powering off the network card during shutdown



                    Enable Wake on LAN in /etc/network/interfaces when static network configuration is used.



                    # This file describes the network interfaces available on your system
                    # and how to activate them. For more information, see interfaces(5).
                    # The loopback network interface

                    auto lo
                    iface lo inet loopback
                    # The primary network interface

                    auto eth0
                    iface eth0 inet static
                    address 192.168.0.10
                    netmask 255.255.255.0
                    gateway 192.168.0.1
                    dns-nameservers 192.168.0.1
                    up ethtool -s eth0 wol g


                    Enable wake on lan in BIOS, enter the BIOS setup and look for something called "Wake up on PCI event", "Wake up on LAN" or similar. Change it so that it is enabled. Save your settings and reboot.



                    https://help.ubuntu.com/community/WakeOnLan



                    Warning some motherboards / network controllers don't support WOL from the cold boot (S5 state, where the power to the system is physically turned off and back on again). In that case, at least one power cycle (power up, shutdown) has to be performed. To mitigate to the problem, the BIOS can be configured to power up when AC is restored and schedule a shutdown inside Ubuntu afterwards. Refer to the motherboard's manual for further details.






                    share|improve this answer




























                    • This worked for me on 14.04 LTS. Thank you!

                      – TenLeftFingers
                      May 22 '16 at 16:56











                    • those two comments about WOL_DISABLE=N and NETDOWN=no should be part of help.ubuntu.com/community/WakeOnLan

                      – Alecz
                      Apr 5 '18 at 1:25















                    19


















                    In Ubuntu 16.04 set WOL_DISABLE=N in /etc/default/tlp to avoid getting WOL disabled by TLP power management.



                    http://linrunner.de/en/tlp/docs/tlp-configuration.html



                    Add NETDOWN=no in /etc/default/halt to prevent powering off the network card during shutdown



                    Enable Wake on LAN in /etc/network/interfaces when static network configuration is used.



                    # This file describes the network interfaces available on your system
                    # and how to activate them. For more information, see interfaces(5).
                    # The loopback network interface

                    auto lo
                    iface lo inet loopback
                    # The primary network interface

                    auto eth0
                    iface eth0 inet static
                    address 192.168.0.10
                    netmask 255.255.255.0
                    gateway 192.168.0.1
                    dns-nameservers 192.168.0.1
                    up ethtool -s eth0 wol g


                    Enable wake on lan in BIOS, enter the BIOS setup and look for something called "Wake up on PCI event", "Wake up on LAN" or similar. Change it so that it is enabled. Save your settings and reboot.



                    https://help.ubuntu.com/community/WakeOnLan



                    Warning some motherboards / network controllers don't support WOL from the cold boot (S5 state, where the power to the system is physically turned off and back on again). In that case, at least one power cycle (power up, shutdown) has to be performed. To mitigate to the problem, the BIOS can be configured to power up when AC is restored and schedule a shutdown inside Ubuntu afterwards. Refer to the motherboard's manual for further details.






                    share|improve this answer




























                    • This worked for me on 14.04 LTS. Thank you!

                      – TenLeftFingers
                      May 22 '16 at 16:56











                    • those two comments about WOL_DISABLE=N and NETDOWN=no should be part of help.ubuntu.com/community/WakeOnLan

                      – Alecz
                      Apr 5 '18 at 1:25













                    19














                    19










                    19









                    In Ubuntu 16.04 set WOL_DISABLE=N in /etc/default/tlp to avoid getting WOL disabled by TLP power management.



                    http://linrunner.de/en/tlp/docs/tlp-configuration.html



                    Add NETDOWN=no in /etc/default/halt to prevent powering off the network card during shutdown



                    Enable Wake on LAN in /etc/network/interfaces when static network configuration is used.



                    # This file describes the network interfaces available on your system
                    # and how to activate them. For more information, see interfaces(5).
                    # The loopback network interface

                    auto lo
                    iface lo inet loopback
                    # The primary network interface

                    auto eth0
                    iface eth0 inet static
                    address 192.168.0.10
                    netmask 255.255.255.0
                    gateway 192.168.0.1
                    dns-nameservers 192.168.0.1
                    up ethtool -s eth0 wol g


                    Enable wake on lan in BIOS, enter the BIOS setup and look for something called "Wake up on PCI event", "Wake up on LAN" or similar. Change it so that it is enabled. Save your settings and reboot.



                    https://help.ubuntu.com/community/WakeOnLan



                    Warning some motherboards / network controllers don't support WOL from the cold boot (S5 state, where the power to the system is physically turned off and back on again). In that case, at least one power cycle (power up, shutdown) has to be performed. To mitigate to the problem, the BIOS can be configured to power up when AC is restored and schedule a shutdown inside Ubuntu afterwards. Refer to the motherboard's manual for further details.






                    share|improve this answer
















                    In Ubuntu 16.04 set WOL_DISABLE=N in /etc/default/tlp to avoid getting WOL disabled by TLP power management.



                    http://linrunner.de/en/tlp/docs/tlp-configuration.html



                    Add NETDOWN=no in /etc/default/halt to prevent powering off the network card during shutdown



                    Enable Wake on LAN in /etc/network/interfaces when static network configuration is used.



                    # This file describes the network interfaces available on your system
                    # and how to activate them. For more information, see interfaces(5).
                    # The loopback network interface

                    auto lo
                    iface lo inet loopback
                    # The primary network interface

                    auto eth0
                    iface eth0 inet static
                    address 192.168.0.10
                    netmask 255.255.255.0
                    gateway 192.168.0.1
                    dns-nameservers 192.168.0.1
                    up ethtool -s eth0 wol g


                    Enable wake on lan in BIOS, enter the BIOS setup and look for something called "Wake up on PCI event", "Wake up on LAN" or similar. Change it so that it is enabled. Save your settings and reboot.



                    https://help.ubuntu.com/community/WakeOnLan



                    Warning some motherboards / network controllers don't support WOL from the cold boot (S5 state, where the power to the system is physically turned off and back on again). In that case, at least one power cycle (power up, shutdown) has to be performed. To mitigate to the problem, the BIOS can be configured to power up when AC is restored and schedule a shutdown inside Ubuntu afterwards. Refer to the motherboard's manual for further details.







                    share|improve this answer















                    share|improve this answer




                    share|improve this answer








                    edited Jun 15 '17 at 17:36

























                    answered Apr 28 '16 at 7:09









                    nkefnkef

                    9111 gold badge8 silver badges14 bronze badges




                    9111 gold badge8 silver badges14 bronze badges















                    • This worked for me on 14.04 LTS. Thank you!

                      – TenLeftFingers
                      May 22 '16 at 16:56











                    • those two comments about WOL_DISABLE=N and NETDOWN=no should be part of help.ubuntu.com/community/WakeOnLan

                      – Alecz
                      Apr 5 '18 at 1:25

















                    • This worked for me on 14.04 LTS. Thank you!

                      – TenLeftFingers
                      May 22 '16 at 16:56











                    • those two comments about WOL_DISABLE=N and NETDOWN=no should be part of help.ubuntu.com/community/WakeOnLan

                      – Alecz
                      Apr 5 '18 at 1:25
















                    This worked for me on 14.04 LTS. Thank you!

                    – TenLeftFingers
                    May 22 '16 at 16:56





                    This worked for me on 14.04 LTS. Thank you!

                    – TenLeftFingers
                    May 22 '16 at 16:56













                    those two comments about WOL_DISABLE=N and NETDOWN=no should be part of help.ubuntu.com/community/WakeOnLan

                    – Alecz
                    Apr 5 '18 at 1:25





                    those two comments about WOL_DISABLE=N and NETDOWN=no should be part of help.ubuntu.com/community/WakeOnLan

                    – Alecz
                    Apr 5 '18 at 1:25











                    3


















                    In order for WOL to work, make sure your ethernet interface is properly being shut down by your system when you poweroff.



                    Try the following:




                    1. Create a bash script called wol_poweroff.sh on the /etc/rc6.d/ directory:



                      sudo nano /etc/rc6.d/wol_poweroff.sh



                    2. Put this code in it:



                      #!/bin/bash
                      ifconfig eth0 down
                      poweroff



                    3. Copy it to the /etc/rc0.d directory (so it also works with halt):



                      sudo cp /etc/rc6.d/wol_poweroff.sh /etc/rc0.d/wol_poweroff.sh



                    4. Make them both executable:



                      sudo chmod 755 /etc/rc6.d/wol_poweroff.sh
                      sudo chmod 755 /etc/rc0.d/wol_poweroff.sh


                    Now test to see if it works by powering down your machine with sudo shutdown now or sudo poweroff and using a WOL tool to send a magic packet to it.




                    That was the only thing that worked for me. I found those steps at a bug report at launchpad.net.



                    According to the author, Robbie Williamson, this works because of the following:




                    To get WOL to work the ethernet interface must be properly brought down as part of the system shutdown. This should be performed as part of run levels rc0 and rc6, noting that Linux typically has 7 different run levels (or operating modes):



                    rc0.d - System Halted



                    rc1.d - Single User Mode



                    rc2.d - Single User Mode with Networking



                    rc3.d - Multi-User Mode - boot up in text mode



                    rc4.d - Not yet Defined



                    rc5.d - Multi-User Mode - boot up in X Windows



                    rc6.d - Shutdown & Reboot





                    Source: https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/981461






                    share|improve this answer
































                      3


















                      In order for WOL to work, make sure your ethernet interface is properly being shut down by your system when you poweroff.



                      Try the following:




                      1. Create a bash script called wol_poweroff.sh on the /etc/rc6.d/ directory:



                        sudo nano /etc/rc6.d/wol_poweroff.sh



                      2. Put this code in it:



                        #!/bin/bash
                        ifconfig eth0 down
                        poweroff



                      3. Copy it to the /etc/rc0.d directory (so it also works with halt):



                        sudo cp /etc/rc6.d/wol_poweroff.sh /etc/rc0.d/wol_poweroff.sh



                      4. Make them both executable:



                        sudo chmod 755 /etc/rc6.d/wol_poweroff.sh
                        sudo chmod 755 /etc/rc0.d/wol_poweroff.sh


                      Now test to see if it works by powering down your machine with sudo shutdown now or sudo poweroff and using a WOL tool to send a magic packet to it.




                      That was the only thing that worked for me. I found those steps at a bug report at launchpad.net.



                      According to the author, Robbie Williamson, this works because of the following:




                      To get WOL to work the ethernet interface must be properly brought down as part of the system shutdown. This should be performed as part of run levels rc0 and rc6, noting that Linux typically has 7 different run levels (or operating modes):



                      rc0.d - System Halted



                      rc1.d - Single User Mode



                      rc2.d - Single User Mode with Networking



                      rc3.d - Multi-User Mode - boot up in text mode



                      rc4.d - Not yet Defined



                      rc5.d - Multi-User Mode - boot up in X Windows



                      rc6.d - Shutdown & Reboot





                      Source: https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/981461






                      share|improve this answer






























                        3














                        3










                        3









                        In order for WOL to work, make sure your ethernet interface is properly being shut down by your system when you poweroff.



                        Try the following:




                        1. Create a bash script called wol_poweroff.sh on the /etc/rc6.d/ directory:



                          sudo nano /etc/rc6.d/wol_poweroff.sh



                        2. Put this code in it:



                          #!/bin/bash
                          ifconfig eth0 down
                          poweroff



                        3. Copy it to the /etc/rc0.d directory (so it also works with halt):



                          sudo cp /etc/rc6.d/wol_poweroff.sh /etc/rc0.d/wol_poweroff.sh



                        4. Make them both executable:



                          sudo chmod 755 /etc/rc6.d/wol_poweroff.sh
                          sudo chmod 755 /etc/rc0.d/wol_poweroff.sh


                        Now test to see if it works by powering down your machine with sudo shutdown now or sudo poweroff and using a WOL tool to send a magic packet to it.




                        That was the only thing that worked for me. I found those steps at a bug report at launchpad.net.



                        According to the author, Robbie Williamson, this works because of the following:




                        To get WOL to work the ethernet interface must be properly brought down as part of the system shutdown. This should be performed as part of run levels rc0 and rc6, noting that Linux typically has 7 different run levels (or operating modes):



                        rc0.d - System Halted



                        rc1.d - Single User Mode



                        rc2.d - Single User Mode with Networking



                        rc3.d - Multi-User Mode - boot up in text mode



                        rc4.d - Not yet Defined



                        rc5.d - Multi-User Mode - boot up in X Windows



                        rc6.d - Shutdown & Reboot





                        Source: https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/981461






                        share|improve this answer
















                        In order for WOL to work, make sure your ethernet interface is properly being shut down by your system when you poweroff.



                        Try the following:




                        1. Create a bash script called wol_poweroff.sh on the /etc/rc6.d/ directory:



                          sudo nano /etc/rc6.d/wol_poweroff.sh



                        2. Put this code in it:



                          #!/bin/bash
                          ifconfig eth0 down
                          poweroff



                        3. Copy it to the /etc/rc0.d directory (so it also works with halt):



                          sudo cp /etc/rc6.d/wol_poweroff.sh /etc/rc0.d/wol_poweroff.sh



                        4. Make them both executable:



                          sudo chmod 755 /etc/rc6.d/wol_poweroff.sh
                          sudo chmod 755 /etc/rc0.d/wol_poweroff.sh


                        Now test to see if it works by powering down your machine with sudo shutdown now or sudo poweroff and using a WOL tool to send a magic packet to it.




                        That was the only thing that worked for me. I found those steps at a bug report at launchpad.net.



                        According to the author, Robbie Williamson, this works because of the following:




                        To get WOL to work the ethernet interface must be properly brought down as part of the system shutdown. This should be performed as part of run levels rc0 and rc6, noting that Linux typically has 7 different run levels (or operating modes):



                        rc0.d - System Halted



                        rc1.d - Single User Mode



                        rc2.d - Single User Mode with Networking



                        rc3.d - Multi-User Mode - boot up in text mode



                        rc4.d - Not yet Defined



                        rc5.d - Multi-User Mode - boot up in X Windows



                        rc6.d - Shutdown & Reboot





                        Source: https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/981461







                        share|improve this answer















                        share|improve this answer




                        share|improve this answer








                        edited Oct 5 '17 at 22:51

























                        answered Oct 5 '17 at 22:44









                        Edson Jr.Edson Jr.

                        313 bronze badges




                        313 bronze badges
























                            2


















                            Run the following in the terminal:



                            sudo ethtool -s your network interface wol g 
                            sudo ethtool your network interface


                            you should see a g next to wake on lan after writing the second command



                            source






                            share|improve this answer
































                              2


















                              Run the following in the terminal:



                              sudo ethtool -s your network interface wol g 
                              sudo ethtool your network interface


                              you should see a g next to wake on lan after writing the second command



                              source






                              share|improve this answer






























                                2














                                2










                                2









                                Run the following in the terminal:



                                sudo ethtool -s your network interface wol g 
                                sudo ethtool your network interface


                                you should see a g next to wake on lan after writing the second command



                                source






                                share|improve this answer
















                                Run the following in the terminal:



                                sudo ethtool -s your network interface wol g 
                                sudo ethtool your network interface


                                you should see a g next to wake on lan after writing the second command



                                source







                                share|improve this answer















                                share|improve this answer




                                share|improve this answer








                                edited Aug 22 '17 at 6:34









                                Community

                                1




                                1










                                answered Mar 4 '17 at 21:23









                                Marwan NabilMarwan Nabil

                                998 bronze badges




                                998 bronze badges
























                                    2


















                                    If you use NetworkManager, then you can enable WOL via nmcli:



                                    nmcli connection show


                                    Remember NAME of the connection of "802-3-ehternet" TYPE for DEVICE of interest. Say it name is "Wired connection 1". Then modify it properly:



                                    nmcli connection modify "Wired connection 1" 802-3-ethernet.wake-on-lan magic


                                    To get its MAC address:



                                    nmcli connection show "Wired connection 1" | grep 802-3-ethernet.mac-address


                                    From now you can turn it off and turn it on from another machine on the same LAN by wakeonlan 1a:2b:3c:4d:5e:6f command, where 1a:2b:3c:4d:5e:6f is MAC address of the LAN card from previous step.






                                    share|improve this answer






























                                      2


















                                      If you use NetworkManager, then you can enable WOL via nmcli:



                                      nmcli connection show


                                      Remember NAME of the connection of "802-3-ehternet" TYPE for DEVICE of interest. Say it name is "Wired connection 1". Then modify it properly:



                                      nmcli connection modify "Wired connection 1" 802-3-ethernet.wake-on-lan magic


                                      To get its MAC address:



                                      nmcli connection show "Wired connection 1" | grep 802-3-ethernet.mac-address


                                      From now you can turn it off and turn it on from another machine on the same LAN by wakeonlan 1a:2b:3c:4d:5e:6f command, where 1a:2b:3c:4d:5e:6f is MAC address of the LAN card from previous step.






                                      share|improve this answer




























                                        2














                                        2










                                        2









                                        If you use NetworkManager, then you can enable WOL via nmcli:



                                        nmcli connection show


                                        Remember NAME of the connection of "802-3-ehternet" TYPE for DEVICE of interest. Say it name is "Wired connection 1". Then modify it properly:



                                        nmcli connection modify "Wired connection 1" 802-3-ethernet.wake-on-lan magic


                                        To get its MAC address:



                                        nmcli connection show "Wired connection 1" | grep 802-3-ethernet.mac-address


                                        From now you can turn it off and turn it on from another machine on the same LAN by wakeonlan 1a:2b:3c:4d:5e:6f command, where 1a:2b:3c:4d:5e:6f is MAC address of the LAN card from previous step.






                                        share|improve this answer














                                        If you use NetworkManager, then you can enable WOL via nmcli:



                                        nmcli connection show


                                        Remember NAME of the connection of "802-3-ehternet" TYPE for DEVICE of interest. Say it name is "Wired connection 1". Then modify it properly:



                                        nmcli connection modify "Wired connection 1" 802-3-ethernet.wake-on-lan magic


                                        To get its MAC address:



                                        nmcli connection show "Wired connection 1" | grep 802-3-ethernet.mac-address


                                        From now you can turn it off and turn it on from another machine on the same LAN by wakeonlan 1a:2b:3c:4d:5e:6f command, where 1a:2b:3c:4d:5e:6f is MAC address of the LAN card from previous step.







                                        share|improve this answer













                                        share|improve this answer




                                        share|improve this answer










                                        answered Feb 14 '18 at 10:12









                                        OrientOrient

                                        4097 silver badges14 bronze badges




                                        4097 silver badges14 bronze badges
























                                            1


















                                            Besides parameters suggested by @nkef you can set the following in /etc/network/interfaces if you use DHCP instead of static IP settings for the LAN adapter (here named eth0):



                                            auto lo
                                            iface lo inet loopback

                                            auto eth0
                                            iface eth0 inet dhcp
                                            ethernet-wol g


                                            (tested on Ubuntu 16.04 LTS).






                                            share|improve this answer






























                                              1


















                                              Besides parameters suggested by @nkef you can set the following in /etc/network/interfaces if you use DHCP instead of static IP settings for the LAN adapter (here named eth0):



                                              auto lo
                                              iface lo inet loopback

                                              auto eth0
                                              iface eth0 inet dhcp
                                              ethernet-wol g


                                              (tested on Ubuntu 16.04 LTS).






                                              share|improve this answer




























                                                1














                                                1










                                                1









                                                Besides parameters suggested by @nkef you can set the following in /etc/network/interfaces if you use DHCP instead of static IP settings for the LAN adapter (here named eth0):



                                                auto lo
                                                iface lo inet loopback

                                                auto eth0
                                                iface eth0 inet dhcp
                                                ethernet-wol g


                                                (tested on Ubuntu 16.04 LTS).






                                                share|improve this answer














                                                Besides parameters suggested by @nkef you can set the following in /etc/network/interfaces if you use DHCP instead of static IP settings for the LAN adapter (here named eth0):



                                                auto lo
                                                iface lo inet loopback

                                                auto eth0
                                                iface eth0 inet dhcp
                                                ethernet-wol g


                                                (tested on Ubuntu 16.04 LTS).







                                                share|improve this answer













                                                share|improve this answer




                                                share|improve this answer










                                                answered Jan 25 '18 at 11:01









                                                rprrpr

                                                1816 bronze badges




                                                1816 bronze badges
























                                                    1


















                                                    This just bit me too under Ubuntu 18.04 (headless / minimal install), unfortunately the answers already listed here although they may seem to work at times are not going to provide a reliable solution as they create race conditions or fight with the likes of systemd, netplan and udev.



                                                    I had tried this approach too at first and it seemed to work, I am scheduling a system to boot each evening via WakeOnLan to run backups as the system BIOS does not provide a scheduled AC on option.



                                                    It would work for a few days and then refuse to wake, powering it on manually and running ethtool revealed that WoL had been disabled :



                                                     Wake-on: d


                                                    So I figured something else had to be turning it back off and having had many such issues in the last few years with systemd taking over parts of the system I decided to start here, lo and behold:



                                                    WakeOnLan=
                                                    ..
                                                    ..
                                                    Defaults to off.



                                                    https://www.freedesktop.org/software/systemd/man/systemd.link.html



                                                    Examples online show something along the lines of :



                                                    /etc/systemd/network/50-wired.link



                                                    [Match]
                                                    MACAddress=<MAC ADDRESS>

                                                    [Link]
                                                    WakeOnLan=magic


                                                    How ever this was still not working. Then I came across this :



                                                    udevadm test-builtin net_setup_link /etc/systemd/network/50-wired.link


                                                    which resulted in :



                                                    Load module index
                                                    Parsed configuration file /lib/systemd/network/99-default.link
                                                    Parsed configuration file /etc/systemd/network/50-wired.link
                                                    Parsed configuration file /run/systemd/network/10-netplan-eno1.link


                                                    And what do I find in /run/systemd/network/10-netplan-eno1.link ?



                                                    [Match]
                                                    MACAddress=<MAC ADDRESS>

                                                    [Link]
                                                    Name=eno1
                                                    WakeOnLan=off


                                                    Solution Either:



                                                    1. remove netplan,

                                                    2. setup networking via a netplan configuration,

                                                    3. or set the systemd .link file to have a higher priority.

                                                    As I already had the systemd .link file I simply renamed it to 00-wired.link, rebooted
                                                    and now ethtool eno1 reports:



                                                     Wake-on: g


                                                    Without any extra services solely for the purpose of trying to enable WoL.






                                                    share|improve this answer
































                                                      1


















                                                      This just bit me too under Ubuntu 18.04 (headless / minimal install), unfortunately the answers already listed here although they may seem to work at times are not going to provide a reliable solution as they create race conditions or fight with the likes of systemd, netplan and udev.



                                                      I had tried this approach too at first and it seemed to work, I am scheduling a system to boot each evening via WakeOnLan to run backups as the system BIOS does not provide a scheduled AC on option.



                                                      It would work for a few days and then refuse to wake, powering it on manually and running ethtool revealed that WoL had been disabled :



                                                       Wake-on: d


                                                      So I figured something else had to be turning it back off and having had many such issues in the last few years with systemd taking over parts of the system I decided to start here, lo and behold:



                                                      WakeOnLan=
                                                      ..
                                                      ..
                                                      Defaults to off.



                                                      https://www.freedesktop.org/software/systemd/man/systemd.link.html



                                                      Examples online show something along the lines of :



                                                      /etc/systemd/network/50-wired.link



                                                      [Match]
                                                      MACAddress=<MAC ADDRESS>

                                                      [Link]
                                                      WakeOnLan=magic


                                                      How ever this was still not working. Then I came across this :



                                                      udevadm test-builtin net_setup_link /etc/systemd/network/50-wired.link


                                                      which resulted in :



                                                      Load module index
                                                      Parsed configuration file /lib/systemd/network/99-default.link
                                                      Parsed configuration file /etc/systemd/network/50-wired.link
                                                      Parsed configuration file /run/systemd/network/10-netplan-eno1.link


                                                      And what do I find in /run/systemd/network/10-netplan-eno1.link ?



                                                      [Match]
                                                      MACAddress=<MAC ADDRESS>

                                                      [Link]
                                                      Name=eno1
                                                      WakeOnLan=off


                                                      Solution Either:



                                                      1. remove netplan,

                                                      2. setup networking via a netplan configuration,

                                                      3. or set the systemd .link file to have a higher priority.

                                                      As I already had the systemd .link file I simply renamed it to 00-wired.link, rebooted
                                                      and now ethtool eno1 reports:



                                                       Wake-on: g


                                                      Without any extra services solely for the purpose of trying to enable WoL.






                                                      share|improve this answer






























                                                        1














                                                        1










                                                        1









                                                        This just bit me too under Ubuntu 18.04 (headless / minimal install), unfortunately the answers already listed here although they may seem to work at times are not going to provide a reliable solution as they create race conditions or fight with the likes of systemd, netplan and udev.



                                                        I had tried this approach too at first and it seemed to work, I am scheduling a system to boot each evening via WakeOnLan to run backups as the system BIOS does not provide a scheduled AC on option.



                                                        It would work for a few days and then refuse to wake, powering it on manually and running ethtool revealed that WoL had been disabled :



                                                         Wake-on: d


                                                        So I figured something else had to be turning it back off and having had many such issues in the last few years with systemd taking over parts of the system I decided to start here, lo and behold:



                                                        WakeOnLan=
                                                        ..
                                                        ..
                                                        Defaults to off.



                                                        https://www.freedesktop.org/software/systemd/man/systemd.link.html



                                                        Examples online show something along the lines of :



                                                        /etc/systemd/network/50-wired.link



                                                        [Match]
                                                        MACAddress=<MAC ADDRESS>

                                                        [Link]
                                                        WakeOnLan=magic


                                                        How ever this was still not working. Then I came across this :



                                                        udevadm test-builtin net_setup_link /etc/systemd/network/50-wired.link


                                                        which resulted in :



                                                        Load module index
                                                        Parsed configuration file /lib/systemd/network/99-default.link
                                                        Parsed configuration file /etc/systemd/network/50-wired.link
                                                        Parsed configuration file /run/systemd/network/10-netplan-eno1.link


                                                        And what do I find in /run/systemd/network/10-netplan-eno1.link ?



                                                        [Match]
                                                        MACAddress=<MAC ADDRESS>

                                                        [Link]
                                                        Name=eno1
                                                        WakeOnLan=off


                                                        Solution Either:



                                                        1. remove netplan,

                                                        2. setup networking via a netplan configuration,

                                                        3. or set the systemd .link file to have a higher priority.

                                                        As I already had the systemd .link file I simply renamed it to 00-wired.link, rebooted
                                                        and now ethtool eno1 reports:



                                                         Wake-on: g


                                                        Without any extra services solely for the purpose of trying to enable WoL.






                                                        share|improve this answer
















                                                        This just bit me too under Ubuntu 18.04 (headless / minimal install), unfortunately the answers already listed here although they may seem to work at times are not going to provide a reliable solution as they create race conditions or fight with the likes of systemd, netplan and udev.



                                                        I had tried this approach too at first and it seemed to work, I am scheduling a system to boot each evening via WakeOnLan to run backups as the system BIOS does not provide a scheduled AC on option.



                                                        It would work for a few days and then refuse to wake, powering it on manually and running ethtool revealed that WoL had been disabled :



                                                         Wake-on: d


                                                        So I figured something else had to be turning it back off and having had many such issues in the last few years with systemd taking over parts of the system I decided to start here, lo and behold:



                                                        WakeOnLan=
                                                        ..
                                                        ..
                                                        Defaults to off.



                                                        https://www.freedesktop.org/software/systemd/man/systemd.link.html



                                                        Examples online show something along the lines of :



                                                        /etc/systemd/network/50-wired.link



                                                        [Match]
                                                        MACAddress=<MAC ADDRESS>

                                                        [Link]
                                                        WakeOnLan=magic


                                                        How ever this was still not working. Then I came across this :



                                                        udevadm test-builtin net_setup_link /etc/systemd/network/50-wired.link


                                                        which resulted in :



                                                        Load module index
                                                        Parsed configuration file /lib/systemd/network/99-default.link
                                                        Parsed configuration file /etc/systemd/network/50-wired.link
                                                        Parsed configuration file /run/systemd/network/10-netplan-eno1.link


                                                        And what do I find in /run/systemd/network/10-netplan-eno1.link ?



                                                        [Match]
                                                        MACAddress=<MAC ADDRESS>

                                                        [Link]
                                                        Name=eno1
                                                        WakeOnLan=off


                                                        Solution Either:



                                                        1. remove netplan,

                                                        2. setup networking via a netplan configuration,

                                                        3. or set the systemd .link file to have a higher priority.

                                                        As I already had the systemd .link file I simply renamed it to 00-wired.link, rebooted
                                                        and now ethtool eno1 reports:



                                                         Wake-on: g


                                                        Without any extra services solely for the purpose of trying to enable WoL.







                                                        share|improve this answer















                                                        share|improve this answer




                                                        share|improve this answer








                                                        edited Aug 15 at 10:20

























                                                        answered Aug 12 at 9:35









                                                        Daniel SquiresDaniel Squires

                                                        112 bronze badges




                                                        112 bronze badges































                                                            draft saved

                                                            draft discarded















































                                                            Thanks for contributing an answer to Ask Ubuntu!


                                                            • Please be sure to answer the question. Provide details and share your research!

                                                            But avoid


                                                            • Asking for help, clarification, or responding to other answers.

                                                            • Making statements based on opinion; back them up with references or personal experience.

                                                            To learn more, see our tips on writing great answers.




                                                            draft saved


                                                            draft discarded














                                                            StackExchange.ready(
                                                            function ()
                                                            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f764158%2fhow-to-enable-wake-on-lan-wol-in-ubuntu-16-04%23new-answer', 'question_page');

                                                            );

                                                            Post as a guest















                                                            Required, but never shown





















































                                                            Required, but never shown














                                                            Required, but never shown












                                                            Required, but never shown







                                                            Required, but never shown

































                                                            Required, but never shown














                                                            Required, but never shown












                                                            Required, but never shown







                                                            Required, but never shown









                                                            Popular posts from this blog

                                                            Tamil (spriik) Luke uk diar | Nawigatjuun

                                                            Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

                                                            Training a classifier when some of the features are unknownWhy does Gradient Boosting regression predict negative values when there are no negative y-values in my training set?How to improve an existing (trained) classifier?What is effect when I set up some self defined predisctor variables?Why Matlab neural network classification returns decimal values on prediction dataset?Fitting and transforming text data in training, testing, and validation setsHow to quantify the performance of the classifier (multi-class SVM) using the test data?How do I control for some patients providing multiple samples in my training data?Training and Test setTraining a convolutional neural network for image denoising in MatlabShouldn't an autoencoder with #(neurons in hidden layer) = #(neurons in input layer) be “perfect”?