WolCommandsNotSendingWake-LANPacket:TroubleshootingGentooLinuxDesktopLaptop
Wake-on-LAN (WoL) is a powerful feature that allows you to turn on a computer remotely by sending a special magic packet over the network. However, if you're experiencing issues with WoL commands not sending the wake-LAN packet on your Gentoo Linux desktop or laptop, you're in the right place.
Problem Confirmation
You have confirmed that your system is not sending the wake-LAN packet by running the following command:
sudo tcpdump -i eth0 udp port 9This command should show broadcast packets being sent, but it did not. Now, let's dive into the possible causes and solutions.
Check Wake-on-LAN Settings in BIOS
First, ensure that the Wake-on-LAN feature is enabled in your system's BIOS settings. Restart your computer and press the appropriate key (usually F2, F10, or Del) to enter the BIOS setup. Look for the Power Management or Boot settings and enable Wake-on-LAN (usually labeled as WoL, Magic Packet, or Wake on PCIe).
Check Network Card Settings
After enabling WoL in the BIOS, check the network card settings in the operating system. The following steps will help you enable Wake-on-LAN for your network card.
1. Identify the network card: Run the command lspci -v to list all PCI devices with detailed information. Look for the network card, usually labeled Ethernet controller. Take note of the device ID (e.g., 02:00.0).
2. Check the network card's current configuration: Run the command ethtool -i ethX, replacing ethX with the device name from step 1 (e.g., eth0). Check the Supports Wake-on: line for pumbg (power-up, magic packet, unicast, broadcast, and multicast), indicating that Wake-on-LAN is supported.
3. Enable Wake-on-Magic-Packet: Run the command ethtool -s ethX wol g, replacing ethX with the device name from step 1. This command enables Wake-on-Magic-Packet.
Load ethtool Module
Ensure the ethtool module is loaded during system boot. Edit the file /etc/modules by adding the following line:
ethtoolConfigure systemd-networkd (Optional)
If you are using systemd-networkd, you need to configure it to broadcast the WoL packets on shutdown. Create a file named /etc/systemd/network/wol.network with the following contents:
[Match]
Name=ethX
[Network]
WakeOnLan=magic
Replace ethX with the device name from step 1. Then, reload systemd-networkd configuration:
sudo systemctl restart systemd-networkdTest Wake-on-LAN
Now, it's time to test the configuration.
a. Shutdown your computer: sudo shutdown -h now
b. Send the wake-LAN packet from another computer using a tool such as ettercap or an online service like Depicus' Wake-on-LAN Tool.
- Ensure Wake-on-LAN is enabled in the BIOS.
- Configure the network card settings using
ethtool. - Load the
ethtoolmodule during system boot. - Configure
systemd-networkd(optional). - Test the Wake-on-LAN functionality.