Wake over LAN WOL dietpi x86 pc

Awesome, I didn’t know that one, and so easy. I’ll put it on the list for dietpi-network to be available as GUI option when I find time to finish it.

Docs: WakeOnLan - Debian Wiki
Requires ethtool package, but it’s pre-installed on DietPi for link speed and debugging already.

@MichaIng but there would need to be a check, to verify if the feature is supported by the system.

Yes, the ethtool output contains this info.

Is any thing change with this configuration. my working WOL system stop since last week. i have not changed anything. in past WOL working fine. i just gave “apt-get update” “apt-get upgrade” commands also installed & uninstall docker cli & docker-compose via dietpi-software. this setup working fine before but now with this computer is not wakeup via WOL. my system is working headless so no change in BIOS etc.

I guess the updated packages broke something. What did you update?

only update system via standard commands “apt-get update” “apt-get upgrade” & i have install docker & docker compose & then uninstall it. is any linux command verify the WOL system or needed packages working /available or not?

these commands gives following results

root@DietPi:/etc/network#  networkctl list
WARNING: systemd-networkd is not running, output will be incomplete.

IDX LINK  TYPE     OPERATIONAL SETUP
  1 lo    loopback n/a         unmanaged
  2 eth0  ether    n/a         unmanaged
  3 wlan0 wlan     n/a         unmanaged 
root@DietPi:/etc/network# ifquery eth0
ethernet-wol: g
address: 192.168.1.90
netmask: 255.255.255.0
gateway: 192.168.1.254
broadcast: 192.168.1.255 
 root@DietPi:/etc/network# ethtool
ethtool: bad command line argument(s)
For more information run ethtool -h

You could have a look to official docs WakeOnLan - Debian Wiki

Dietpi is using ifupdown.

root@DietPi:~# sudo ethtool eth0
Settings for eth0:
        Supported ports: [ TP    MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Link partner advertised link modes:  10baseT/Full
                                             100baseT/Full
                                             1000baseT/Full
        Link partner advertised pause frame use: No
        Link partner advertised auto-negotiation: Yes
        Link partner advertised FEC modes: Not reported
        Speed: 1000Mb/s
        Duplex: Full
        Auto-negotiation: on
        master-slave cfg: preferred slave
        master-slave status: slave
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: external
        MDI-X: Unknown
        Supports Wake-on: pumbg
        Wake-on: g
        Link detected: yes

https://dpaste.org/LXpDX

Did you tried and ran ethtool -h to see more info?

yes it is giving hundreds line

root@DietPi:~# ethtool -h
ethtool version 5.9
Usage:
        ethtool [ --debug MASK ][ --json ] DEVNAME      Display standard information about device
        ethtool [ --debug MASK ][ --json ] -s|--change DEVNAME  Change generic options
                [ speed %d ]
                [ duplex half|full ]
                [ port tp|aui|bnc|mii|fibre|da ]
                [ mdix auto|on|off ]
                [ autoneg on|off ]
                [ advertise %x[/%x] | mode on|off ... [--] ]
                [ phyad %d ] 

Can you provide: ethtool -i eth0 ?
And what happens when you do:

sudo ethtool -s eth0 wol g
root@DietPi:~# ethtool -i eth0
driver: r8169
version: 5.10.0-18-amd64
firmware-version: rtl8411-1_0.0.3 06/18/12
expansion-rom-version:
bus-info: 0000:02:00.2
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: yes
supports-priv-flags: no
root@DietPi:~# sudo ethtool -s eth0 wol g
root@DietPi:~#

Ok no output at all, I would take this as “it worked”?! :smiley:
This command basically activated WOL mode g on eth0, like it was already before. I just wanted to get sure…
You can reboot the machine and try if it works no, but I think not since we didn’t change anything.

Hm this looks all fine, my only idea left is to check the LAN cable / physical connections.

I reboot many time, i have another raspberry running homeassistant & in that i created switch for wol for my server. shell_command: turn_off_server: "ssh -i /home/homeassistant/.ssh/id_rsa homeassistant@192.168.1.90 'sudo systemctl hibernate'" & it is working fine for hibernate. the wol start thing fail to wake up machine. it was working before. even i tried to send wol magic data through wrt router & android app. but system is not wake up by any method. i have to click the hard start button to boot the machine.

You checked the config still be present on your network configuration file?

Thanks Joulinar & Jappe, after giving all these commands & with your expert guidance i confirm that dietpi/operating system wise every thing working. then i did brainstorming & check each component backward. i checked router port, UFW ports etc. & then in last i check my NUC BIOS setting. then i found the reason for why wol was not working. the reason was my NUC is old & may be the battery on motherboard exhausted. last week there may be power outage for some time & my nuc forget its settings & start using default setting with WOL disable. I reconfigure my motherboard settings & WOL again start working. so i confirm WOL works on dietpi nuc. thanks

2 Likes