Close Menu
    X (Twitter)
    Hectic GeekHectic Geek
    • Apps
      • Apps for Mac
      • Apps for PCs
      • Best Apps
    • Concepts
      • Comparison
      • For Geeks
      • IT Careers
    • Gadgets
      • Accessories
      • Best Work Laptops
      • Budget Laptops
    • GNU/Linux
      • Ubuntu
    • How To
      • Virtualization
      • Windows
      • Windows How-To
    Hectic GeekHectic Geek
    Home » Disabling ‘Wake On LAN’ in Ubuntu might save a Tiny Bit of Power on your Laptop
    Ubuntu

    Disabling ‘Wake On LAN’ in Ubuntu might save a Tiny Bit of Power on your Laptop

    GayanBy GayanSeptember 20, 2012Updated:December 24, 20175 Comments5 Mins Read
    Twitter Reddit Telegram WhatsApp Email
    Share
    Twitter Reddit Telegram WhatsApp Email

    ‘Wake on LAN’ is a handy little feature that lets individuals like system administrators to turn-on a computer on their network by simply sending a message from their PC to the targeted computer’s Ethernet adapter.

    But in order for this to happen the Ethernet adapter has to keep it in a certain ‘awakened’ state (even when the computer is turned off) and it requires some power (it’s enabled by default by the Ethernet adapter). So if you have something like a laptop and don’t really need this feature then you can save some power by disabling it.

    Now I did measure the power usage before and after and to be honest it was a tiny reduction, almost invincible (at least in my Vostro V131). So if you decided to not to go through all this hassle to disable it, well I’d understand ;-).

    Before …
    After …

    I used ‘powerstat’ for calculating the power consumption.

    However, if you usually turn off your laptop for like 8-10 hours daily, then  while running ‘WOL’ can still consume a decent amount of energy in that period. So by disabling it you can save that energy ‘waste’ nevertheless.

    I’m using Ubuntu 12.04 LTS (Precise Pangolin) and by using a tool called ‘ethtool’ we can see whether if it’s already enabled or disabled, if it’s enabled then we can use it to easily disable it.

    Step 1: ‘ethtool’ is not installed by default, so enter the below command in your Terminal window to install it.

    sudo apt-get install ethtool

    Step 2: Then enter the below command below command to see whether it’s enabled or disabled.

    sudo ethtool eth0 | grep Wake-on

    Then you should see a simple output and as illustrated in the below picture, if under the option ‘Wake-on:’ it says anything other than ‘d’ then it means this feature is enabled.

    Step 3: If it’s enabled then on most occasions it’ll say ‘g’ and you can use the below command to disable it.

    sudo ethtool -s eth0 wol d

    Then enter the command showed in the ‘Step 2‘ again and this time under ‘Wake-on:’ it should say ‘d’.

    But the thing is, this setting will be lost as soon as you reboot your computer. So to make Ubuntu permanently save the changes, use the below steps. If you use Ubuntu 12.04 then please skip to ‘Step 5‘ (I’m not sure but even 11.10 users might have to use that method as well).

    Step 4: Enter the below command in your Terminal window. This will open a configuration file in Ubuntu that we can use to add and execute programs when the OS boots.

    gksudo gedit /etc/rc.local

    Now simply copy and past the below code into that newly opened configuration file (make sure to paste it above the ‘exit 0’ code).

    ethtool -s eth0 wol d

    Now click on the ‘Save’ button and close the window. That it now the setting is permanently saved.

    For Ubuntu 12.04 (and up) users …

    With Ubuntu 12.04, Ubuntu engineers have done some tweaks to the OS (HDD spin down, changing Wi-Fi signal strength, few file system related tweaks etc) and as a result it’s much more energy efficient than the previous releases (at least in my experience).

    And there’s a simple script called ‘disable-wol’ that enable/disable the ‘Wake on LAN’ feature on its own and I think it was because of this that even after editing the ‘/etc/rc.local’ file my Ubuntu 12.04 still booted to the desktop with it enabled.

    But there’s a simple trick that we can use so that the ‘disable-wol’ script to will always disable ‘WOL’ feature of your Ethernet card.

    Step 5: Now, let’s first copy the original script to the ‘/etc/pm …’ folder, as if we were to edit the file while keeping it on its original location, then it might get overwritten when your OS receives update. So for that, open the terminal window and enter the below command.

    sudo cp /usr/lib/pm-utils/power.d/disable_wol /etc/pm/power.d

    Step 6: Now enter the below command to edit it.

    gksudo gedit /etc/pm/power.d/disable_wol

    Once opened locate a code called ‘wol g’ (you can search for it in the editor) as shown below then simply change the letter ‘g’ to ‘d’.

    Then click on the ‘Save’ button’ and close the editor. Now reboot your PC and when you’ve logged into the desktop use the command in the ‘Step 2‘ to know if it’s working or not. If it’s working, then under ‘Wake-on’, now it should say ‘d’ (= disabled).

    You can easily restore your changes later by simply re changing that latter ‘d’ to ‘g’ of that ‘disable_wol’ script.

    If interested there are few other things that you can do to reduce the power usage of the Ethernet adapter and you can find the instructions from this page. Good luck.

    Share. Twitter Reddit Telegram WhatsApp Email
    Gayan

    An RHCE, 'Linux' user with 14+ years of experience. Extreme lover of Linux and FOSS. He is passionate to test every Linux distribution & compare with the previous release to write in-depth articles to help the FOSS community.

    Related Posts

    How to Check Linux CPU Usage?

    February 5, 2024

    Linux export Command: A Comprehensive Tutorial

    February 3, 2024

    Debian vs Ubuntu Server: A Brief Comparison for Beginners

    July 2, 2023

    CPU Based Simple System Stability and Benchmark Tester for Ubuntu Linux – systester

    June 16, 2023

    Typespeed: Typing Speed Testing Game for Ubuntu Linux

    March 12, 2023

    Debian vs Ubuntu in 2023- Which Linux OS is Right for You?

    January 6, 2023

    5 Comments

    1. silver price on October 5, 2012 11:10 am

      Sorry. My wake-on-lan works perfectly when my system is halted or completely down. But it still wont work if ubuntu went to sleep or hibernates.

      Reply
      • Gayan on October 9, 2012 4:54 pm

        Hi,

        First of all, I'm sorry it took this long for me to reply. The reason is, your comment was in the 'spam' folder and I just saw it now.

        Anyway there are few things that you can try …

        1. First, if you haven't, then as pointed out in the article, install the 'ethtool' utility. If you have editied the 'disable_wol' configuration file, then undo the changes as well.

        2. Then enter the below command.

        sudo cp /usr/lib/pm-utils/power.d/disable_wol /etc/pm/sleep.d

        3. Now enter the below command.

        gksudo gedit /etc/pm/sleep.d/disable_wol

        4. Now search for the below code …

        disable) ethtool -s "${d##*/}" wol d>/dev/null 2>&1;;

        Then in the 'wol d>' code, change the letter 'd' to 'g'. Don't change anything else. Now save the file and close its window and reboot the computer.

        Now try putting it to Standby to see if it works or not.

        Reply
    2. Kayode Olaniyi on November 30, 2015 1:39 am

      Thanks bro, It worked for me Ubuntu 15.10

      Reply
      • Gayan on November 30, 2015 8:24 am

        You’re welcome 🙂 .

        Reply
    3. Wolf on September 17, 2019 12:46 pm

      Hello, could you give me a hint how to make it work in bionic 18.04? – Here the /etc/pm/sleep.d/disable_wol script does not exist.

      Cheers,
      Wolf

      Reply
    Leave A Reply Cancel Reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Latest Posts

    Transforming Geek Culture with Advanced Software Development

    April 8, 2024

    The Role of Technology in Enhancing Digital Signage Solutions

    February 21, 2024

    How to Check Linux CPU Usage?

    February 5, 2024

    Linux export Command: A Comprehensive Tutorial

    February 3, 2024

    [Fixed] HDMI No Signal to TV or Monitor on Windows 10/11

    November 7, 2023

    AlmaLinux vs Ubuntu – How to Select the Best One?

    October 22, 2023

    Subscribe to Updates

    Get the latest news and updates from Hectic Geek. We won't overload you or sell your data!

    Contact
    • About Us
    • Contact Us
    • Privacy Policy
    • Write for Us
    X (Twitter)
    © 2026 Hectic Geek.

    Type above and press Enter to search. Press Esc to cancel.