Fighting with computers

Computers are not always friendly.

Friday, February 19, 2010

Wake on lan

Recognizing the big amount of energy being wasted at my university, a system for waking up a computer has been set up. In the past many people, including myself, had no other choice but to leave the computer on if you might want access it remotely (as directed-broadcast is not allowed on campus' network, there was no way to send a Wake-On-Lan magic packet from outside of campus).

The new system put in place allows users to wake up their computer from the university intranet, which is a big plus. Alternative systems were available but only worked on certain subnets and you need to know you computer's MAC address (something I have to tell you I've never been able to memorize).

However, and there is always a catch, I realized my computer (an ASUS P5G33) did not seem to accept the wake-on-lan feature. I am quite doubtful about following the advice I read on a forum, even more if it requires reflashing my motherboard BIOS with a firmware many tools refuse to accept. However, I decided I'd risk my system this time to see if I can get WOL working.

In the process I learned that I need to boot up my system with MS-DOS. Not having an MS-DOS system boot floppy, nor a flopply drive in my system proved a problem. Luckily I could get the instructions to install FreeDOS on a USB pen drive. And because this install was bootable, I could finally got my system capable of running AFUDOS.EXE utility to re-flash my system.

Unfortunately some side effects showed up after the process was finished: now BIOS reports my CPU temperature is 4 degrees Celsius and Suspend has became non functional, as my system is non responsive after waking up from Suspend state.

But to make things worse I failed to see anything remotely similar to "Enable Wake On Lan" on the new firmware (though other people reported it solve their problem with WOL). And, of course, everything change I tried in the BIOS did not fix my problem.

Days later I read some advice on our computer center help info that turned my prevoius failure into a success:

sudo ethtool -s eth0 wol g

What this command does is to enable network card to be waiting for a magic packet to wake up the system. Apparently default startup configuration of my Ubuntu system does not enable the feature on the network card and so, the system looks dead (and not sleeping) to wake-on-lan.

In order to make this change permanent it is a good idea to include it somewhere in the adapter initialization process (i.e: if-up.d scripts).

Update: Once again, it happens you should not trust all what you read on the Internet. Out of curiosity, I reverted my motherboard to the original BIOS: Not only I've recovered flawless suspend operation and CPU temperature measurement but Wake On LAN works too. It turns out replacing BIOS was completely unnecessary, but I was fooled to believe the opposite due to both my failure to make WOL work and these reports I read on some forums.


  • At 6:49 pm, Anonymous vierito5 said…

    Outside the campus but with VPN is posible to send WOL packets? ssh-ing to a 24/7 machine and sending it? As you say this is limited by subnets and so on.

  • At 7:02 pm, Blogger Miguel Sánchez said…

    VPN gives you access to one subnet. If the system you want to wake up is in that same subnet, then Bob's your uncle. But as I mention, directed broadcast to any other campus subnet is blocked.

    Still, if you have access to another computer located in the same subnet as your target, then what you suggest will work (ssh-ing to a 24/7 server and from there send WOL packet). I've been doing that in the past.

    However ... you'll need to have admin privileges on that server as many WOL programs will require that (or you can be in the sudoers file instead).


Post a Comment

<< Home