How to enable WOL on Dell Inspiron 1420 with Fedora/Linux
I use my laptop (dell Inspiron 1420) as a server for remote access from office. Even at home, my primary laptop is my mac. I just let my dell run all the time as I don't know when I would need/want to access that from office.
I wanted to enable WOL or Wake Up on Lan so that I could start my laptop from office if required. Even though it says "Wake Up on Lan", it can be started from internet as well.
First place to start was to enable the WOL option in BIOS. And lo.. it wasn't there.. ! So, does my NIC card doesn't support WOL ?
But a quick probe using ethtool showed WOL was indeed supported on my card.
[root@mouthwa init.d]# ethtool eth0
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Port: Twisted Pair
Supports Wake-on: g
Current message level: 0x000000ff (255)
Link detected: yes
Now the next line, Wake-on: d means that WOl was disabled. To enable WOL, use:
ethtool -s eth0 wol g
Now this change is not persistent, i.e, it will be gone in the next reboot.
So to make it persisten, I put a file in /etc/init.d/
#wake on lan
ethtool -s eth0 wol g
Do a chmod +x on the file.
Now check which all devices are allowed to wake up your system in the OS:
[root@mouthwa init.d]# cat /proc/acpi/wakeup
Device S-state Status Sysfs node
PCI0 S5 *disabled no-bus:pci0000:00
PCIE S4 *disabled pci:0000:00:1e.0
USB1 S0 *disabled pci:0000:00:1d.0
USB2 S0 *disabled pci:0000:00:1d.1
USB3 S0 *disabled pci:0000:00:1d.2
USB4 S0 *disabled pci:0000:00:1a.0
USB5 S0 *disabled pci:0000:00:1a.1
EHC2 S0 *disabled pci:0000:00:1a.7
EHCI S0 *disabled pci:0000:00:1d.7
AZAL S3 *disabled pci:0000:00:1b.0
RP01 S3 *disabled pci:0000:00:1c.0
RP02 S3 *disabled pci:0000:00:1c.1
RP03 S3 *disabled
RP04 S3 *disabled pci:0000:00:1c.3
RP05 S3 *disabled
RP06 S5 *disabled pci:0000:00:1c.5
LID S3 *enabled
PBTN S4 *enabled
MBTN S5 *disabled
I need to find out which of the above is my NIC card and enable wake up for that.
[root@mouthwa init.d]# lspci -tv
-[0000:00]-+-00.0 Intel Corporation Mobile PM965/GM965/GL960 Memory Controller Hub
+-01.0-----00.0 nVidia Corporation G86 [GeForce 8400M GS]
+-1a.0 Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #4
+-1a.1 Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5
+-1a.7 Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2
+-1b.0 Intel Corporation 82801H (ICH8 Family) HD Audio Controller
+-1c.1-[0c]----00.0 Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection
+-1c.5-----00.0 Broadcom Corporation NetLink BCM5906M Fast Ethernet PCI Express
+-1d.0 Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1
+-1d.1 Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2
+-1d.2 Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3
+-1d.7 Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1
+-1e.0---+-01.0 Ricoh Co Ltd R5C832 IEEE 1394 Controller
| +-01.1 Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter
| +-01.2 Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter
| -01.3 Ricoh Co Ltd xD-Picture Card Controller
+-1f.0 Intel Corporation 82801HEM (ICH8M) LPC Interface Controller
+-1f.1 Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) IDE Controller
+-1f.2 Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) SATA AHCI Controller
-1f.3 Intel Corporation 82801H (ICH8 Family) SMBus Controller
Notice the 1c.5 in front of my LAN card in the lspci output above. Look for the same number in the /proc/acpi/wakeup and I find that my card is RPC06!
Now to enable the wakeup for my card, a simple echo will do:
[root@mouthwa init.d]# echo RP06>/proc/acpi/wakeup
[root@mouthwa init.d]# cat /proc/acpi/wakeup |grep RP06
RP06 S5 *enabled pci:0000:00:1c.5
So there you are, WOL is enabled!
However, it can wake up only from certain states, not all at the moment.
So, the best way to switch off the laptop so that it can be woken from LAN is
[root@mouthwa init.d]# pm-suspend-hybrid
What it does is that the system does everything it needs to hibernate, but suspends instead of shutting down. This means that your computer can wake up quicker than for
normal hibernation if you do not run out of power, and you can resume even if you run out of power.
Most of the above was sourced from here.
Now, the script to wake up from internet.
I got it from here:
Also, If you dont want to or dont have a place to run scripts, you can use online services like:
Ofcourse, you need to know your MAC address, your router address and the subnet.
Keep subnet as 255.255.255.255 in the depicus page if you have one public ip and the router allots private ips using DHCP. (This is true for most of the routers).
And now, I can happily power down my laptop and wake it up when required! #FTW