You are not logged in.

#1 2011-05-10 14:40:18

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

[SOLVED]Will WOL ever work again after suspend to RAM on my server?

I used Ubuntu on this server for a long while and had WOL working after 'suspend to RAM' and after a 'shutdown -h'. Suddenly with 10.10 WOL after 'suspend to RAM' stopped working, WOL after 'shutdown -h' was still working fine, so I used that for the time being. Some days ago I thought, "well, you use Arch on your laptop for years now, so why not try it on your server, you don't like fixed release cycles anyway and Samba on Ubuntu never worked reliably on this machine, too'. So after a little fiddling to install Arch on this server and following the pm-utils entry on the Arch Wiki I am now at exactly the same position as before, WOL after 'suspend to RAM' doesn't work while WOL after a 'shutdown -h' works. smile The funny thing is that if I stop the network service before calling 'pm-suspend' on the server directly I can wake it with a WOL command from my laptop. I checked (via ethtool) and saw that disabling the network actually leaves the wol flag for the network card on g, but starting the network service again sets it to d. I have read many howtos and forum posts, but am at a loss right now.
Does anyone have hints or an idea to where to look now?

EDIT: Oh man, could this have really been so easy?
It turns out that I simply need to stop the network service at suspend and start it again at resume, I don't even need to unload the driver module of my network card, doh. smile What put me off track were all my previous attempts under Ubuntu where I had tried the same thing following provided means (trough acpi) of the distro, seems I messed up there or the documentation was out of date. I now just created a hook completely myself following the Arch documentation for pm-utils and it works now!

[root@archi ~]# cat /etc/pm/sleep.d/Start_and_stop_network_service 
#!/bin/bash
case $1 in
    hibernate)
        echo "You didn't really call hibernate?"
        ;;
    suspend)
        echo "Stop the network service"
        /etc/rc.d/network stop;
        ;;
    thaw)
        echo "oh, suspend to disk is over, we are resuming..."
        ;;
    resume)
        echo "Start the network service again"
        /etc/rc.d/network start;
        /usr/sbin/ethtool -s eth0 wol g;
        ;;
        *)  echo "somebody is calling me totally wrong."
        ;;
esac

I also have to re-enable wol in the script, and at a cold boot I do the same through '/etc/rc.local'.

Last edited by signor_rossi (2011-05-10 19:44:07)

Offline

Board footer

Powered by FluxBB