This is what my board reports after the ethtools commands:
Code:
--------------------
# ethtool -s eth0 wol g
# lspci -vv -s 01:00.0
01:00.0 Ethernet controller: Intel Corporation 82573L Gigabit Ethernet
Controller
Subsystem: ASUSTeK Computer Inc. Device 81c2
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort-
<MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 219
Region 0: Memory at ff4e0000 (32-bit, non-prefetchable) [size=128K]
Region 2: I/O ports at 9c00 [size=32]
Capabilities: [c8] Power Management version 2
Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA
PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=1 PME-
Capabilities: [d0] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0
Enable+
Address: 00000000fee0100c Data: 4182
Capabilities: [e0] Express (v1) Endpoint, MSI 00
DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s <512ns,
L1 <64us
ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset-
DevCtl: Report errors: Correctable- Non-Fatal- Fatal-
Unsupported-
RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
MaxPayload 128 bytes, MaxReadReq 512 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+
TransPend-
LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency
L0 <128ns, L1 <64us
ClockPM+ Suprise- LLActRep- BwNot-
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+
DLActive- BWMgmt- ABWMgmt-
Capabilities: [100] Advanced Error Reporting <?>
Capabilities: [140] Device Serial Number ab-cd-ef-fe-dc-ba-ab-00
Kernel driver in use: e1000
# ethtool -s eth0 wol d
# lspci -vv -s 01:00.0
01:00.0 Ethernet controller: Intel Corporation 82573L Gigabit Ethernet
Controller
Subsystem: ASUSTeK Computer Inc. Device 81c2
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort-
<MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 219
Region 0: Memory at ff4e0000 (32-bit, non-prefetchable) [size=128K]
Region 2: I/O ports at 9c00 [size=32]
Capabilities: [c8] Power Management version 2
Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA
PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=1 PME-
Capabilities: [d0] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0
Enable+
Address: 00000000fee0100c Data: 4182
Capabilities: [e0] Express (v1) Endpoint, MSI 00
DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s <512ns,
L1 <64us
ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset-
DevCtl: Report errors: Correctable- Non-Fatal- Fatal-
Unsupported-
RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
MaxPayload 128 bytes, MaxReadReq 512 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+
TransPend-
LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency
L0 <128ns, L1 <64us
ClockPM+ Suprise- LLActRep- BwNot-
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+
DLActive- BWMgmt- ABWMgmt-
Capabilities: [100] Advanced Error Reporting <?>
Capabilities: [140] Device Serial Number ab-cd-ef-fe-dc-ba-ab-00
Kernel driver in use: e1000
--------------------
Also, my lspci device tree looks like this:
Code:
--------------------
# lspci -t
-[0000:00]-+-00.0
+-02.0
+-1c.0-[0000:03]--
+-1c.2-[0000:02]--+-00.0
| \-00.1
+-1c.3-[0000:01]----00.0
+-1d.0
+-1d.1
+-1d.2
+-1d.3
+-1d.7
+-1e.0-[0000:04]--+-03.0
| +-09.0
| \-0a.0
+-1f.0
+-1f.1
+-1f.2
\-1f.3
--------------------
This tells me (somehow) that my integrated eth board, device 01:00.0 is
connected via PCI slot (?) 1c.3.
This info is in turn useful to check the status of ACPI device wakeup
capability:
Code:
--------------------
# cat /proc/acpi/wakeup
Device S-state Status Sysfs node
P0P2 S4 enabled
PS2K S4 disabled pnp:00:0b
USB0 S4 disabled pci:0000:00:1d.0
USB1 S4 disabled pci:0000:00:1d.1
USB2 S4 disabled pci:0000:00:1d.2
USB3 S4 disabled pci:0000:00:1d.3
EUSB S4 disabled pci:0000:00:1d.7
MC97 S4 disabled
P0P4 S4 enabled pci:0000:00:1c.0
P0P5 S4 enabled
P0P6 S4 enabled pci:0000:00:1c.2
P0P7 S4 enabled pci:0000:00:1c.3
P0P8 S4 enabled
P0P9 S4 enabled
P0P3 S4 disabled pci:0000:00:1e.0
--------------------
What's important here is that P0P7 (yet another kind of identifier
pointing to pci:0000:00:1c.3) has wake enabled (from S4, this you can't
manipulate afaik.)
If I boot my machine with a fresh linux install there is a good chance
most if not all devices will show "disabled" instead. Using a debian
lenny/sid setup probably not too far from the freshest Ubuntu distro, I
still need to tweak the /proc/acpi/wakeup at boot.
To flip-flop the enabled/disabled state the recipe is to echo the ACPI
device name in /proc/acpi/wakeup
Here is what I have set in a script that runs at boot:
Code:
--------------------
# Enable PME events (Wake-on-PCI) if they are disabled
# Correct BIOS setting needed. Ethtool needed too
# to enable eth0 at ifup time (see /etc/networking/*)
# For more info see
# http://www.vdr-wiki.de/wiki/index.php/WAKE_ON_LAN
# http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit
if (/bin/grep P0P7 /proc/acpi/wakeup | /bin/grep disabled 2>&1 >> /dev/null)
; then
echo -n " WOL"
/bin/echo -n P0P7 > /proc/acpi/wakeup
fi
--------------------
The echo P0P7 does it for me. This works on all boards I have played
with so far, including some seriously outdated junk.
FYI, ACPI could bring you CPU throttling and all sorts of power
management goodies too. You can install "powertop" on recent linux
machines and see what it advices. You can also google for "linux
laptop-mode" and you should find some pages of interest. I use an Intel
Core Solo processor, and the following stanza in the same boot script:
Code:
--------------------
# Powertop and others suggest the following:
# Set laptop disk write mode - Flush writes 10 secs after spinup - Normal
value 0.
echo 10 > /proc/sys/vm/laptop_mode
# Hold up to 70% of the RAM with pages that need to be written - Normal value
40.
echo 70 > /proc/sys/vm/dirty_ratio
# % of pages to keep unflushed ?? - Normal value 10.
echo 1 > /proc/sys/vm/dirty_background_ratio
# Reduce disk activity by waiting up to 10 minutes before doing writes
# Normal values: 3000 for expire, 500 for writeback
echo 60000 > /proc/sys/vm/dirty_writeback_centisecs
echo 60000 > /proc/sys/vm/dirty_expire_centisecs
# Tendency to write to swap. Normal swappiness: 60.
echo 10 > /proc/sys/vm/swappiness
# Set Min Power to SATA Drives
for i in /sys/class/scsi_host/host?/link_power_management_policy
do echo min_power > $i
done
# Use powersave on PCIE
if [ -e /sys/module/pcie_aspm/parameters/policy ]; then
echo powersave > /sys/module/pcie_aspm/parameters/policy
fi
# USB autosuspend - Dunno which of the 2 work..
for i in /sys/bus/usb/devices/usb?/power/autosuspend
do echo 1 > $i
done
# auto = autosupend
for i in /sys/bus/usb/devices/usb?/power/level
do echo auto > $i
done
# and also
echo 1 > /sys/module/usbcore/parameters/autosuspend
# Ondemand cpu freq. policy. Shifts from 1GHz to 1.5GHz
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
--------------------
I won't swear every entry is useful nor harmless, but my machine hasn't
turned to a pile of ashes yet. I have read tweaking PCIE brings huge
power savings, but I don't use PCI Express, so I can't tell. For me the
big gain comes from CPU frequency scaling.
Overall my kill-a-watt readings dropped from 68W to around 40W with 1
laptop type hdd spinning.
There's a ton of leftover sata and pata 3"5 drives in the box as well
(hence my use of laptop-mode, which copes better with spindown). When
all are spinning the system rates at around 115W. The PSU is recent and
should be reasonably efficient; unfortunately, needing a lot of HDD
connectors, I went for a 450W model. 40-100W is not enough load to
enter the efficiency zone of the PSU. A 250W PSU along with a few
Y-shaped HDD power connectors would have been more efficient and
probably cheaper (at boot the system can draw up to 230W according to
my kill-a-watt).
--
epoch1970
------------------------------------------------------------------------
epoch1970's Profile: http://forums.slimdevices.com/member.php?userid=16711
View this thread: http://forums.slimdevices.com/showthread.php?t=54091
_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/unix