As per the Arch Wiki Wake-On-Lan entry I want to pass the s5wol=1 parameter to the kernel while loading, but apparently it gets ignored by both sudo modprobe r8168 s5wol=1 and by manually adding a /etc/modprobe.d/myfile.conf and then rebuilding the initram. No matter what, it looks like the parameter is not applied (no /sys/modules/r8168/parameters) or anything, and of course the wake on lan isn't working. I honestly have no idea on how to troubleshoot, any help would be really appreciated.
The point is that WOL per se it's working, because if I suspend the PC instead of shutting it down then I can successfully wake it up with WOL. So i think it's more something related to the S5 power state, and since there is a kernel module parameter I would really like to give it a try.
The wol setting has already been activated when you go into suspend, that is why it works after a suspend. The problem is that the settings aren't initiated automatically at start up. You need to have the settings activated at startup via a service or an alternate method to work automatically without manual intervention.
Yes, I did, and the systemd approach was the first one I tried actually. However, for some reason it doesn't seem to work either. After creating the script and enabling it via sudo systemctl enable wol@enp6s0, I always get Wake-On: d when launching sudo ethtool enp6s0 after a reboot. Anyway, if I just start the service instead of enabling it (sudo systemctl start wol@enp6s0) I get Wake-On: g but then I cannot wake up the system after a shutdown. That's why I thought I had to enable the s5wol=1 parameter in r8168 module.