Kodi Community Forum

Full Version: XBMCBuntu Wake-On-Lan not working from S3 Suspend
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all,

long story short.
I switched from a regular Ubuntu 12.04 to XBMCbuntu because....

Everything seems to work fine or even better.
But I am struggling to get the Wake-on-Lan working together with Suspend to RAM (S3).
WOL is working fine after shutdown (S5) and system gets back on after receiving magic packet. On Ubuntu 12.04 it is working with suspend flawlessly.
All I have to do in Ubuntu 12.04 is:
echo SLAN > /proc/acpi/wakeup
echo enabled > /sys/bus/pci/devices/my_network_card/power/wakeup
echo enabled > /sys/class/net/eth0/device/power/wakeup
and eventually set up a script for
ethtool -s eth0 wol g
because it is "d" by default on every boot

For some reason XMBCBuntu is already pre-equiped with ethtool and ethtool eth0 reports "g" without any further script of my own.
As mentioned, if I do sudo poweroff, magic packet works. But it won't work after pm-suspend (LAN leds still blinking).
I know how to set up WOL on Ubuntu but I don't know what is the difference in XBMCBuntu distro and why it won't work there.
Is it managing suspending actions differently? Is it maybe some script overriding the ethtool wol setting? Do I have to unload network before suspend somehow?
I have already tried all the suggested ways like adding STOP, WHITELIST, etc.. entries in
service network stop
ifconfig eth0 down
or commenting out lines in
Are there any other scripts in xbmcbuntu compared to ubuntu that take care of suspending? I know for sure that BIOS is fine. Network driver is via_rhine and current XMBCBuntu kernel is

Here are the outputs:
[email protected]:~$ cat /proc/acpi/wakeup
Device    S-state      Status   Sysfs node
NPGS      S4    *disabled  pci:0000:02:00.0
NP0S      S4    *disabled  
USB1      S3    *enabled   pci:0000:00:10.0
USB2      S3    *enabled   pci:0000:00:10.1
USB3      S3    *enabled   pci:0000:00:10.2
USB4      S3    *enabled   pci:0000:00:10.3
EHCI      S3    *enabled   pci:0000:00:10.4
SLT1      S4    *disabled  
SLT2      S4    *disabled  
SLAN      S4    *enabled   pci:0000:00:12.0
SLPB      S4    *enabled  
PWRB      S3    *enabled

[email protected]:~$ for i in /sys/bus/pci/devices/*/power/wakeup; do echo $i && cat $i; done

[email protected]:~$ cat /sys/class/net/eth0/device/power/wakeup
[email protected]:~$ uname -a
Linux iqon-MS-7387 3.5.0-48-generic #72-Ubuntu SMP Mon Mar 10 23:20:26 UTC 2014 i686 i686 i686 GNU/Linux
[email protected]:~$ sudo lshw -C network
       description: Ethernet interface
       product: VT6102 [Rhine-II]
       vendor: VIA Technologies, Inc.
       physical id: 12
       bus info: [email protected]:00:12.0
       logical name: eth0
       version: 7c
       serial: 00:1d:92:7e:df:7f
       size: 100Mbit/s
       capacity: 100Mbit/s
       width: 32 bits
       clock: 33MHz
       capabilities: bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=via-rhine driverversion=1.5.1 duplex=full ip= latency=64 maxlatency=8 mingnt=3 multicast=yes port=MII speed=100Mbit/s
       resources: irq:23 ioport:c000(size=256) memory:fcfff800-fcfff8ff
[email protected]:~$ sudo ethtool eth0
Settings for eth0:
    Supported ports: [ TP MII ]
    Supported link modes:   10baseT/Half 10baseT/Full
                            100baseT/Half 100baseT/Full
    Supported pause frame use: No
    Supports auto-negotiation: Yes
    Advertised link modes:  10baseT/Half 10baseT/Full
                            100baseT/Half 100baseT/Full
    Advertised pause frame use: No
    Advertised auto-negotiation: Yes
    Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                         100baseT/Half 100baseT/Full
    Link partner advertised pause frame use: Symmetric
    Link partner advertised auto-negotiation: Yes
    Speed: 100Mb/s
    Duplex: Full
    Port: MII
    PHYAD: 1
    Transceiver: internal
    Auto-negotiation: on
    Supports Wake-on: pumbg
    Wake-on: g
    Current message level: 0x00000000 (0)
    Link detected: yes
It's not that dramatic, but I used to WOL from suspend pretty often.
Thanks alot!
...just found another thread that could have to do with it.

This led me to do a little research.
I booted into my previous Ubuntu 12.04, istalled xbmc and tried the WOL functionality from Suspend:

When calling
from command line (over ssh), I can bring it up with wakeonlan magic packet.

But when I suspend from XBMC with its build in XBMC.Suspend() command, it somehow disables and brings down the networking (i guess).
Can this be worked around?
This seems like a dead end Sad
Maybe the questions should only be:

What method does XBMC.Suspend() use to suspend the system? I think it is not "pm-suspend"..
Can that function be overriden? Can I assign another command to this function? I think this would involve rewriting the source and compiling, which I am not a friend of Sad
What about using the XBMC.System.Exec together with the pm-suspend? I have come up with something like XBMC.System.Exec("sudo pm-suspend"), added my user to sudoers to not to prompt for password, but it is not suspending..
Can the bringing down of network be set up by some XBMC settings (GUI or console), or is it hardcoded?

I just need to do ONLY pm-suspend, as with this command the WOL is working.
Any respond is much appreciated!