[mythtv] [mythtv-commits] Ticket #5210: Automatic shutdown for SBE

f-myth-users at media.mit.edu f-myth-users at media.mit.edu
Fri Dec 5 06:43:24 UTC 2008


    > Date: Thu, 4 Dec 2008 21:45:09 -0500
    > From: Chris Pinkham <cpinkham at bc2va.org>

    > * On Fri Dec 05, 2008 at 12:23:57AM -0000, MythTV wrote:
    > > #5210: Automatic shutdown for SBE

    > >  Great news.
    > > 
    > >  In my solution, the slave backend was awaken by the master backend with a
    > >  magic wol packet sended by a "at" job... this mecanism was done outside
    > >  mythtv but your work seems promising!

    > My plan is to have a "WakeupCommand" setting per slave.  When the master
    > wants to wakeup a slave, it will run this command.  I was considering making
    > it a special case if the command actually was just a xx:xx:xx:xx:xx:xx
    > format MAC address.  In this case, the master would just use a
    > SendWOL(QString MAC) method in backendutil.cpp rather than relying on the
    > user to install another WOL binary.

If you do that, here's something that might save some headscratching:
if the MAC is 01:02:03:04:05:06:07:08, send a WOL package for both
that MAC -and- one in reversed byte order (08:07:06:05:04:03:02:01).

Yes, seriously.  Oy.

I know for a fact that there are some motherboard combos (e.g.,
certain MSI/nVidia chipsets) and some distros (older Ubuntus at least,
and probably others) where the hardware got set up incorrectly, such
that it wouldn't come back up without the bytes reversed.

Also, some chipsets require that the packet be sent to the broadcast
address and -not- just to the IP address of the relevant machine;
presumably, they don't have enough brains in waiting-for-WOL mode to
know their own MAC and instead drop all non-broadcast packets before
they even look to see if it's a WOL.  (All of the MSI/nVidia mobos I
tested required broadcast; the single MSI/VIA mobo I tried did not.)

The other issue is that slaves will have to arrange to do something
like "ethtool -s eth0 wol g" (the Ubuntu default seems to be "d",
unless that changed at some point) before shutdown, to leave the
hardware in the right state.  Of course, that requires the SBE to
know which interface to use; maybe it should just enumerate all
interfaces and do that?

I know this is klugy, but it's a fairly small amount of hair, and
might eliminate a lot of "why isn't my backend waking up again?"
sort of traffic on the lists...


More information about the mythtv-dev mailing list