# [Solved] WOL: interface doesn't store it's state

## creaker

Trying to get Wake On LAN working.

'PME Events Wake Up'  option in BIOS enabled.

```
lspci -k

00:07.0 Bridge: NVIDIA Corporation MCP61 Ethernet (rev a2)

        Subsystem: Gigabyte Technology Co., Ltd Device e000

        Kernel driver in use: forcedeth

        Kernel modules: forcedeth
```

Ethernet adaptor supports Wak-On LAN functionality:

```
server ~ # ethtool eth0                                                                                                              

Settings for eth0:

        Supported ports: [ 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

        Speed: 100Mb/s

        Duplex: Full

        Port: MII

        PHYAD: 1

        Transceiver: external

        Auto-negotiation: on

        Supports Wake-on: g

        Wake-on: d

        Link detected: yes
```

By default Wake-On is disabled ('d'), but I can enable it with

```
ethtool -s eth0 wol g
```

this command switches Wake-On to 'g', that stands for 'enabled'. As confirmation:

```
server ~ # cat /proc/acpi/wakeup 

Device  S-state   Status   Sysfs node

HUB0      S5    *disabled  pci:0000:00:04.0

XVR0      S5    *disabled  pci:0000:00:09.0

XVR1      S5    *disabled

XVR2      S5    *disabled

UAR1      S5    *disabled  pnp:00:07

USB0      S3    *enabled   pci:0000:00:02.0

USB2      S3    *enabled   pci:0000:00:02.1

AZAD      S5    *disabled

MMAC      S5    *enabled   pci:0000:00:07.0
```

The last string corresponds to Ethernet adaptor.

To get adaptor always on, I put 'ethtool -s eth0 wol g' command into /etc/conf.d/local.start and /etc/conf.d/local.stop

But after reboot adaptor switches back to default 'disabled Wake-on' state.

How do I get Wake-on enabled permanently?Last edited by creaker on Sat Aug 16, 2014 7:15 am; edited 1 time in total

----------

## destroyedlolo

 *creaker wrote:*   

> But after reboot adaptor switches back to default 'disabled Wake-on' state.

 

Did you enabled WOL in your BIOS ? I think, if it's disabled here, this feature will be disabled what ever what you did with ethtool?

 *creaker wrote:*   

> To get adaptor always on, I put 'ethtool -s eth0 wol g' command into /etc/conf.d/local.start and /etc/conf.d/local.stop

 

It's only needed in one of those script. No arm to do it twice, just useless   :Very Happy: 

----------

## creaker

Yes, its enabled in BIOS: PME Event Wake Up option is set to 'Enabled'.

 *Quote:*   

> In the BIOS Power Management, you must enable the LAN Wakeup option.
> 
> The option can also be named like: Wake On LAN, MAC Resume From S3/S4, MACPME Power Up Control, Power On By Onboard LAN, Power Up By Onboard LAN, Power On By PCI Devices, Resume on PCI Event, Resume by LAN, Resume By WOL, Resume on LAN, Resume on LAN/PME#, Wake on LAN from S5, Wake Up On LAN, WakeUp by Onboard LAN, WOL (PME#) From Soft-Off, PME Events Wake Up, Resume by PME# Function, Resume On PME#, Wake On PME, Wake Up On PME.

 

----------

## Logicien

/etc/conf.d/local.start and /etc/conf.d/local.stop are not the good path to execute a script at boot and shutdown times, /etc/local.d/local.start and /etc/local.d/local.stop will be if the scripts are executables.

----------

## creaker

 *Logicien wrote:*   

> /etc/conf.d/local.start and /etc/conf.d/local.stop are not the good path to execute a script at boot and shutdown times, /etc/local.d/local.start and /etc/local.d/local.stop will be if the scripts are executables.

 

Yeah, really, it should be under local.d. It solved a problem. Now WOL works fine!

Many thanks!

----------

