Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 11971  / 2 Years ago, sat, november 27, 2021, 8:46:00

After preparing my P5K Motherboard to recieve WOL Magic Packets, following this tutorial, I shutdown and booted several times to Windows.



The problem happens when I shutdown from Ubuntu.

It simply won't boot.

The output of ethtool eth0 and part of lspci is on pastebin but here are the important parts:



sudo ethtool eth0



        Supports Wake-on: g
Wake-on: g
Current message level: 0x0000003f (63)
drv probe link timer ifdown ifup


lspci



2:00.0 Ethernet controller: Atheros Communications Inc. Attansic L1 Gigabit Ethernet (rev b0)


I must say that if i boot to windows and shutdown without making any changes the WOL works correctly again.


More From » wakeonlan

 Answers
1

If the interface is managed by the system



If your network interface (eth0 in most cases) is managed via /etc/network/interfaces you could avoid running ethtool before every shutdown by following this guide.



If the interface is managed by NetworkManager



If eth0 is managed by Network Manager, the simplest way is to add the ethtool -s eth0 wol g command in an if-up.d script.



Here is a quick example that you could put in /etc/network/if-up.d/eth0-wol and make the script executable: sudo chmod +x /etc/network/if-up.d/eth0-wol :



#!/bin/sh

ETHTOOL=/sbin/ethtool
[ -x "$ETHTOOL" ] || exit 0
[ "$IFACE" != "lo" ] || exit 0

WOL="g"
"$ETHTOOL" -s "$IFACE" wol "$WOL"
exit 0

[#35432] Sunday, November 28, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
elopingapo

Total Points: 206
Total Questions: 110
Total Answers: 114

Location: Guam
Member since Tue, Nov 29, 2022
1 Year ago
;