WakeOnLan - Community Help Wiki (2024)

This page explains how to enable use of Wake-on-LAN (WoL) in systems that have Ubuntu installed.

Contents

  1. Introduction
  2. Setting Up Wake-on-LAN
    1. Enabling WoL in the BIOS
    2. Enabling WoL in the NIC
  3. Testing Wake-On-LAN
    1. Command-line tools
    2. GTK+ tool
  4. Configure other operating systems
  5. Troubleshooting
  6. External Links

Wake-on-LAN enables users to turn on a computer across a network from another network device. It can be very useful in situations where computers are not all next to each other or there are a lot of machines. WoL works by sending a packet of data called a Magic Packet™ to the target machine. When the packet is received, the target machine's network device (Network Interface Controller or NIC) wakes-up the rest of the machine.

In order to use WoL it must be supported and enabled as necessary in the BIOS, NIC and other network hardware (routers, switches etc). You may also need to configure some software if things don't work out-of-the-box.

Enabling WoL in the BIOS

This section may differ depending on whether or not you have a NIC integrated into your motherboard.

Using an Integrated NIC

To enable WoL in the 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.

Using a Non-Integrated NIC

If your NIC is not integrated into your motherboard, you will still have to configure your BIOS to allow devices to wake up your computer. Boot your computer and enter the BIOS settings menu. In one of the sub-menus there will hopefully be the option to allow USB and/or PCI devices to wake-up the computer. Enable the setting that is appropriate for your NIC. Save your settings and reboot.

PCI NICs sometimes require a cable connection to the power supply in order to stay awake when the computer is off/asleep. Check your manual to see if yours does and install if necessary.

Enabling WoL in the NIC

Determining whether the NIC supports WoL

First, determine which NIC will be used, and then check whether it supports the Magic Packet™ using

sudo ethtool <NIC>

where <NIC> is the device name of your NIC, e.g. eth0. This command will output some information about your the capabilities of your NIC. If this output contains a line similar to the following:

Supports Wake-on: <letters>

where <letters> contains the letter g, the NIC should support the WoL Magic Packet™ method (for the other letters look at manethtool).

Enabling WoL in the NIC

To check whether WoL is enabled in the NIC, one could use

sudo ethtool <NIC>

and look for

Wake-on: <letters>

If <letters> contains g and not d, then Magic Packet™ is enabled. However, if <letters> does contain d, WoL needs to be enabled by running the following command:

sudo ethtool -s <NIC> wol g

On most systems, issuing this command is required after each boot. If the system's networking is configured via ifupdown, then it is easy to add the line upethtool-s<NIC>wolg below the interface's configuration stanza in /etc/network/interfaces. For example:

shahar@shahar-backup:~$ cat /etc/network/interfaces# This file describes the network interfaces available on your system# and how to activate them. For more information, see interfaces(5).# The loopback network interfaceauto loiface lo inet loopback# The primary network interfaceauto eth0iface eth0 inet static address 10.0.0.1 netmask 255.255.255.0 gateway 10.0.0.138 up ethtool -s eth0 wol g

This will ensure that WoL is enabled in the NIC on each boot. Fore more information see the interfaces manual.

Test WoL by powering off the system and trying to send it the magic packet using:

GTK+ tool

If the system dual-boots with other operating systems, they should be configured to also enable or, at least, not disable WoL in the NIC. This is beyond the scope of this document but here's a starting point for Microsoft's OS's.

If WoL is not working as expected, there are a number of lines of investigation to follow:

  • Check that the power management options for your BIOS and NIC support WoL and are enabled as described above.
  • Verify that the packets sent to wake the target computer are indeed reaching their intended desination.
    • You may be able to verify the presence of packets by watching the network activity indicator LED on your switch or router. This is easier to see if you send multiple packets as you can count them.
  • Ensure that no other network configuration software is interfering with WoL activity. network-manager may interfere with WoL activity in certain situations; removing it and configuring your network manually may solve some issues.

  • Read and follow steps in Launchpad Bug 981461

  • Magic Packet Technology - A white paper describing the specification and implemenation of Magic Packet™ technology from AMD, one of its two co-developers.

CategoryNetworking CategoryPowerManagement

WakeOnLan - Community Help Wiki (2024)
Top Articles
Latest Posts
Article information

Author: Rueben Jacobs

Last Updated:

Views: 6249

Rating: 4.7 / 5 (77 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Rueben Jacobs

Birthday: 1999-03-14

Address: 951 Caterina Walk, Schambergerside, CA 67667-0896

Phone: +6881806848632

Job: Internal Education Planner

Hobby: Candle making, Cabaret, Poi, Gambling, Rock climbing, Wood carving, Computer programming

Introduction: My name is Rueben Jacobs, I am a cooperative, beautiful, kind, comfortable, glamorous, open, magnificent person who loves writing and wants to share my knowledge and understanding with you.