You are not logged in.

#1 2012-11-21 21:50:29

signor_rossi
Member
Registered: 2007-08-24
Posts: 257

Getting wol to work after a shutdown, wol after suspend IS working

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

#2 2012-11-21 22:23:42

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 5,275

Re: Getting wol to work after a shutdown, wol after suspend IS working

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: ASUS P8Z77-V PRO // Processor: Intel Core i7-3770K 3.4GHz // GFX: nVidia GeForce GTX 970 Ti // RAM: 32GB (4x 8GB) Corsair DDR3 (@ 2133MHz) // Storage: 1x 3TB Seagate SATAII 5x 1TB Samsung SATAII, 2x 120GB Corsair SSD

Offline

#3 2012-11-22 08:11:10

signor_rossi
Member
Registered: 2007-08-24
Posts: 257

Re: Getting wol to work after a shutdown, wol after suspend IS working

Wol is working from S3, so I guess that the hardware/BIOS side is already set. smile 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

#4 2012-12-02 13:45:45

menta
Member
From: Hungary
Registered: 2010-07-01
Posts: 5

Re: Getting wol to work after a shutdown, wol after suspend IS working

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

#5 2012-12-03 14:11:24

signor_rossi
Member
Registered: 2007-08-24
Posts: 257

Re: Getting wol to work after a shutdown, wol after suspend IS working

@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

#6 2012-12-03 16:14:15

menta
Member
From: Hungary
Registered: 2010-07-01
Posts: 5

Re: Getting wol to work after a shutdown, wol after suspend IS working

signor_rossi wrote:

@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

#7 2012-12-18 16:53:43

alejandro.perez
Member
Registered: 2012-12-18
Posts: 11

Re: Getting wol to work after a shutdown, wol after suspend IS working

signor_rossi wrote:

Wol is working from S3, so I guess that the hardware/BIOS side is already set. smile 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

Board footer

Powered by FluxBB