You are not logged in.
I have a fresh system that uses systemd and followed the directions in the wiki regarding wol. The result is that wol works after a suspend, but not after a shutdown. My guess is that systemd may unload the module for the network interface at shutdown, thus disabling wol for it. Although I googled quite a while I didn't find anything conclusive that could help me, is anyone around here more knowledgeable about systemd and how it is configured that could help me?
Offline
WOL should operate at a hardware level. Check your BIOS settings and make sure you have it enabled in there.
One thing though: are you using a wired or wireless internet connection? If wireless, it's possible that your wireless adaptor/card remains on and keeps a connection to your router while in suspend, but isn't receiving power when your PC is shutdown.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Wol is working from S3, so I guess that the hardware/BIOS side is already set. The machine is a Samsung N210 netbook I wanted to test as a Squeezebox music server with a 1TByte external hard disk (might be replaced with an internal one) that should shut down automatically after a while when not used. I could do with S3 too, but the system boots so fast with systemd that a clean shutdown seems a better solution to me, thus avoiding potential S3 problems on kernel upgrades and other S3 oddities.
Offline
My solution to make WoL work after shutdown and suspend/hibernate was to create a script in /usr/lib/systemd/system-sleep/wol.sh:
#!/bin/sh
# Setting WOL to Active
/usr/sbin/ethtool -s eth0 wol g
Don't forget to make it executable!
Since man 8 systemd-sleep considers this kind of solutions as hack, I also tried the following alternative code in /etc/systemd/system/wol@.service, however it didn't work:
[Unit]
Description=Wake-on-LAN for %i
Requires=network.target
After=network.target
After=sleep.target
Before=halt.target
Before=poweroff.target
Before=kexec.target
Before=shutdown.target
[Service]
ExecStart=/usr/sbin/ethtool -s %i wol g
Type=oneshot
[Install]
WantedBy=multi-user.target
WantedBy=sleep.target
WantedBy=halt.target
WantedBy=poweroff.target
WantedBy=kexec.target
WantedBy=shutdown.target
Any suggestions how to make this work without the /usr/lib/systemd/system-sleep/wol.sh script?
Offline
@menta
The Wiki has an example script to put in '/etc/systemd/system' which enables wol for me from S3.
https://wiki.archlinux.org/index.php/Wol#With_systemd
I tried your approach and my system still does not wol from shutdown btw.
Last edited by signor_rossi (2012-12-03 14:12:15)
Offline
@menta
The Wiki has an example script to put in '/etc/systemd/system' which enables wol for me from S3.
https://wiki.archlinux.org/index.php/Wol#With_systemd
I tried your approach and my system still does not wol from shutdown btw.
Thanks, I didn't emphasized, but I use that example /etc/systemd/system/wol@.service file AND the described /usr/lib/systemd/system-sleep/wol.sh script simultaneously. With the wol@.service file alone I was able to wake on my system when it wasn't suspended/hibernated, just simply poered off. Introduction of the wol.sh script helped to be able to wake up the system when suspend/hibernate occured before shutdown.
Offline
Wol is working from S3, so I guess that the hardware/BIOS side is already set.
The machine is a Samsung N210 netbook I wanted to test as a Squeezebox music server with a 1TByte external hard disk (might be replaced with an internal one) that should shut down automatically after a while when not used. I could do with S3 too, but the system boots so fast with systemd that a clean shutdown seems a better solution to me, thus avoiding potential S3 problems on kernel upgrades and other S3 oddities.
Sorry I break the thread, but I have the same netbook, and suspend is not working for me (arch linux), samsung-tools installed. Did you perform any hack? Are you using pm-utils?
Thanks and best regards
Offline