View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 8 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject: Wake on Lan
PostPosted: Tue Sep 18, 2012 9:43 am 
Offline
Joined: Thu Sep 13, 2012 6:54 pm
Posts: 6
LinHES 7.4

My system works perfectly except for wakeonlan.

If I shut the system down using shutdown -h now I can wake it up from another machine ether-wake 00:04:61:53:C7:8B with no problem at all.

If I leave the backend to shut down automatically after idle then wol doesn't ever work.

I see that /etc/runit/1 sets up my lan interface correctly on booting with /usr/sbin/ethtool -s eth0 wol g 2>/dev/null so why should the shutdown method make a difference? I'm suspecting that mythbackend does something untoward that I don't know about.

Any help gratefully received.


Top
 Profile  
 
 Post subject: Re: Wake on Lan
PostPosted: Wed Sep 19, 2012 10:58 am 
Offline
Joined: Sun Nov 13, 2005 5:56 pm
Posts: 104
I am going through WOL trauma myself at the moment. I just don't get it. This WOL packet does not seem very magical to me. :wink: One problem I have found is that some machines that send the WOL packet need to have the machine that is the object of WOL in the arp table. My laptop does not need this but my Cisco home router (e3000 running Tomato USB) needs it and, as I discovered this morning, so does my LinHES machine. The packet gets broadcast 255.255.255.255 so I am not sure why this situation exists but it does. I have yet to research this further. So try adding LinHES to the arp table. In linux this is done by 'arp -s ipaddress MACaddress'. Also, arp tools work better if host resolution appears in /etc/hosts. Otherwise an 'arp -a' (this prints the arp table) hangs a bit trying to resolve the hostname.

The second thought is to change your LinHES shutdown command to the one that works. The setup screens are a big blur in my mind so I can't remember where the setting is but it's in there someplace (quick guess is mythtv-setup --> General and a few screens in, but this is just a raw guess).

I am far, very far, from being a network tech. Just reporting my experience.

s


Top
 Profile  
 
 Post subject: Re: Wake on Lan
PostPosted: Wed Sep 19, 2012 12:35 pm 
Offline
Joined: Sun Nov 13, 2005 5:56 pm
Posts: 104
To add even more noise to the picture, I am finding that not all WOL programs are equal and even using the same one may call for different approaches. I thought I was pretty well set at the time of write my first response but when I went back to testing I still had a problem. I found that I need to add some parameters to make the command work. wol XX:XX:XX:XX:XX:XX did not work nor did wol -i 255.255.255.255 -p 9 XX:XX:XX:XX:XX:XX. But when I tried wol -h brunhild -p 9 XX:XX:XX:XX:XX:XX it worked. So try different WOL programs and play with the parameters. Yeah. Real scientific. I keep having the sneaking suspicion that somehow the WOL isn't reaching the correct ethernet NIC. I have been using a Perl program as a benchmark since it is highly portable but have yet to understand why it fails or is inconsistent on some machines and works consistently on others. Drives me nutz. My network sniffing shows that often the (so-called) Magic Packet doesn't even reach the network which tells me that there is something happening on the sending machine. My brunhild is an OS X machine whose NIC is assigned via dhcp (though statically assigned). It only responds when the machine is turned off in a sleep state (S3) but has yet to respond when powered off.

s


Top
 Profile  
 
 Post subject: Re: Wake on Lan
PostPosted: Wed Sep 19, 2012 1:34 pm 
Offline
Joined: Mon Apr 10, 2006 3:48 pm
Posts: 997
Location: Lexington, Ky
Just a couple of thoughts. First and most important does your nic support WOL? If so you will also most likely need to enable it in the BIOS


Top
 Profile  
 
 Post subject: Re: Wake on Lan
PostPosted: Wed Sep 19, 2012 5:51 pm 
Offline
Joined: Thu Sep 13, 2012 6:54 pm
Posts: 6
Hi sparks and thanks for your thoughts.

I don't think arp has much bearing on my problem - wol is always sent from the same machine and is very reliable.

Quote:
The second thought is to change your LinHES shutdown command to the one that works.

Ah yes well that would be too easy! I didn't mention it, but, if I do that, then WOL will work but wake from RTC won't.
I must have mythbackend shut the system down so it programs the rtc correctly.

Note: I've discovered that when mythtbackend shuts down it is not doing what I expect; in particular it doesn't run my pre-shutdown script which is suspicious. I can see a weekend of poking around with mythbackend, runit etc. as I'm far from understanding what happens when the system shuts down. (FIXED: Problem was permissions on my shutdown script.)


Last edited by crt on Fri Sep 21, 2012 5:24 am, edited 1 time in total.


Top
 Profile  
 
 Post subject: Re: Wake on Lan
PostPosted: Fri Sep 21, 2012 5:09 am 
Offline
Joined: Thu Sep 13, 2012 6:54 pm
Posts: 6
sparks wrote:
I am going through WOL trauma myself at the moment. I just don't get it. This WOL packet does not seem very magical to me. :wink: One problem I have found is that some machines that send the WOL packet need to have the machine that is the object of WOL in the arp table. My laptop does not need this but my Cisco home router (e3000 running Tomato USB) needs it and, as I discovered this morning, so does my LinHES machine. The packet gets broadcast 255.255.255.255 so I am not sure why this situation exists but it does. I have yet to research this further. So try adding LinHES to the arp table.


Humble pie is on my menu today sparks. I waspishly dismissed your arp suggestions but that was exactly the trouble. My router (Netgear DG834GT) had buggy firmware which forgot MACs and reserved IP's unless the PC in question was actually online. I upgraded the router firmware last night and all is now good. Total time wasted: 3 whole days:sad: Many thanks for putting the right thoughts in my head.

[ What really confused me was that the router cached MACs for a few minutes after the mythtv PC was powered down; if I wolled it during that time it would work otherwise it wouldn't. I thought it was something to do with the way the machine was shutdown - a total red herring.]


Top
 Profile  
 
 Post subject: Re: Wake on Lan
PostPosted: Fri Sep 21, 2012 8:21 am 
Offline
Joined: Sun Nov 13, 2005 5:56 pm
Posts: 104
Glad to hear you got it working. I'm still struggling will my WOL problem. I'm trying to do all my transcoding on the most powerful cpu in the house which also is running OS X. Seems apple isn't kidding when they talk about thinking different. Seems their expectation of a WOL packet is a little bit different from everybody else. So I am learning there is more to forming the 'Magic Packet' than FF x 6 and MAC x 16. I don't think I'll ever get it to wake from a complete power down like we can do from our LinHES boxes though I am having reasonable success in waking from an S3 sleep state.

Now I've hit a nasty nvidia bug that not only locks up the computer but also stops all video (i.e. black screen) but that's another story.

Would also like to add that executing a WOL program with 'sudo' can make a difference even though some programs do not require this. It deals with more than I want to get into at the moment.

s


Top
 Profile  
 
 Post subject: Re: Wake on Lan
PostPosted: Sat Sep 22, 2012 10:08 am 
Offline
Joined: Thu Sep 13, 2012 6:54 pm
Posts: 6
Quote:
Now I've hit a nasty nvidia bug

Hmmm... now where have I heard that before? I've spent hours trying to fix Linux/nvidia problems and I was reading the other day that Torvalds had some choice words to say about them. With LinHES however, it correctly set up the right proprietary driver for my very old 5200 card and it works brilliantly (the nouveau driver was a dismal mess).

Quote:
OS X - Seems apple isn't kidding when they talk about thinking different. Seems their expectation of a WOL packet is a little bit different from everybody else.

I was traumatised by Apple software many years ago when I was fixing bugs in Appletalk. I give everything Apple a very wide berth.

Quote:
there is more to forming the 'Magic Packet' than FF x 6 and MAC x 16

I do agree that there are variations on what WOL is, I wheeled out wireshark to see what was going on and their documentation, if I remember correctly, suggests there are several TCP WOL formats and also a UDP format. As far as I could see, my old Fedora 11 PC pumps out FFx6,MACx16 as expected.

Shock horror news: A new spanner has entered the works: my LinHES box is now at the other end of a D-Link ethernet over mains link. Guess what? After the LinHES has powered down for a few minutes, even in standby mode, the D-Link cuts all connection with it entirely, the router can't see it and yes - no WOL again! Aaarrgh!


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 103 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu