[mythtv-users] OT. WOL for my myth box.

David Watkins watkinshome at gmail.com
Tue Aug 29 11:50:13 UTC 2006


I know this is off-topic.  My only excuse is that it's my myth backend
that I'm trying to wake up and I've run out of ideas.  And it's a long
post, sorry about that too.

I've recently secured my network to the point where I'm confident to
open it up to the internet, so I can adminster it remotely.  It shut's
down when it's not recording so my plan was to use Wake-on-Lan (WOL)
to wake it up (I have a mail server that is on all the time which I
can log onto to generate magic packets).  So a week ago I enabled
Wake-on-Lan in my myth machine's BIOS and sent it a hopefull
'magic-packet'. Nothing happend then, and nothing has continued to
happen over the past week, despite much googling.  I've learnt a lot
in that week but I've still no real idea of how close or far away it
is from working.  Before I give up and chalk the whole thing down to
experience I'd be gratefull if someone who knows could have a quick
scan of where I've got to and give me some advice.

I'm pretty sure I'm sending the magic packets correctly.  I have both
windows and linux machines on the local network and anyway for testing
I've enabled it 'pumbg', which should wake it up on almost any network
activity right?  I think the problem is the NIC's not being configured
to generate the wakeup event.

I'll limit myself to two questions here at the top, with a bit of
supporting information afterwords. Any comments on any of it
gratefully received.

(1)  Should I be able to get my NIC to generate acpi wakeup events,
without powering down the computer.  This would speed up my test cycle
considerably.

(2)  I have some concerns over the state of /proc/acpi/wakeup.

#cat /proc/acpi/wakeup

produces

Device  Sleep state     Status
PCI0       4            disabled
UAR1       4            disabled
USB       1            disabled
USB1       1            disabled
USB2       1            disabled
AC9       4            disabled
 MC9       4            disabled
ILAN       4            disabled
SLPB       4            *enabled


I assume that PCI0 is the PCI bus, so I enable it with:

#echo PCI0 -n > /proc/acpi/wakeup

which now gives:

Device  Sleep state     Status
PCI0       4            enabled
UAR1       4            disabled
USB       1            disabled
USB1       1            disabled
USB2       1            disabled
AC9       4            disabled
 MC9       4            disabled
ILAN       4            disabled
SLPB       4            *enabled

There's no asterisk against it (is that important?) and what's odd is
that Sleep State 4 appears to not be supported by the motherboard.  At
least is it's not available in the bios (S1 or S3 only) and

#echo n > /sys/power/state

only triggers a shutdown for n = 1 or 3.

#echo 4 > /sys/power/state

does nothing!

So can I modify /proc/acpi/wakeup somehow, to change the 4 to 3?

(BTW I assume ILAN would be for an on-board LAN interface, which the
motherboard doesn;t have, but I enabled it anyway)

SYSTEM INFO
-------------------------

Motherboard is an MSI K7T266 Pro which, according to the manual,
supports WOL via a header or through the PCI 2.2 bus.

Not sure if the NIC has a brand but lspci --v reports:

00:06.0 Ethernet controller: Realtek Semiconductor Co., Ltd.
RTL-8139/8139C/8139C+ (rev 10)
        Subsystem: Realtek Semiconductor Co., Ltd. RT8139
        Flags: bus master, medium devsel, latency 64, IRQ 5
        I/O ports at d800 [size=256]
        Memory at d9ffff00 (32-bit, non-prefetchable) [size=256]
        Capabilities: [50] Power Management version 2

It doesn't have a WOL header but does, according to its documentation,
support WOL via PCI 2.2.

It's using the 8139too driver.

The motherboard has bios settings for 'Wake on WOL/Modem' (which I
assume is the header) and 'Wake on PME' (which I assume is the PCI
bus).  I've enable both.  I also have 'Wake on RTC' enabled, which
works fine.

ethtool eth0 reports:

[root at viola ~]# ethtool eth0
Settings for eth0:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Advertised auto-negotiation: Yes
        Speed: 100Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 32
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: pumbg
        Wake-on: d
        Current message level: 0x00000007 (7)
        Link detected: yes

and running

#ethtool -s eth0 wol pumbg

changes the above to:

         .
         .
        Auto-negotiation: on
        Supports Wake-on: pumbg
        Wake-on: pumbg
        Current message level: 0x00000007 (7)
        Link detected: yes


Strangely, changing these settings didn't change the relevant section
of lspci -xxx,
which is:

00:06.0 Ethernet controller: Realtek Semiconductor Co., Ltd.
RTL-8139/8139C/8139C+ (rev 10)
00: ec 10 39 81 07 01 90 02 10 00 00 02 00 40 00 00
10: 01 d8 00 00 00 ff ff d9 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 ec 10 39 81
30: 00 00 00 00 50 00 00 00 00 00 00 00 05 01 20 40
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 01 00 02 76 00 00 00 00 00 00 00 00 00 00 00 00
60:....

which, from what I've read, it should do.

Any ideas where to go from here?

Thanks in advance


More information about the mythtv-users mailing list