5

How can I tell Windows or Linux to power a specific device (e.g. USB controller, network card, video card) down, that is put it in the D3 state? From the very little I know about ACPI and such, the operating system has control over this, as it puts devices in said D3 state (if supported) for example when putting the computer into sleep (S3) mode. I am wondering if there is a way to do this manually for certain devices.

For Linux I found this thread, suggesting enabling the driver to control the power of the device using e.g.

 echo -n "auto" > /devices/pci0000:00/0000:00:02.0/power/control' 

and then unloading the driver:

 echo -n "0000:00:02.0" > /sys/bus/pci/drivers/i915/unbind

so that the device will sleep.

Is there another way? Perhaps to emulate what happens when the whole system is put to sleep mode?

Additionally, how would this work in Windows 7?

1 Answer 1

3

For Linux I found this thread, suggesting enabling the driver to control the power of the device using e.g.

echo -n "auto" > /devices/pci0000:00/0000:00:02.0/power/control' and

then unloading the driver:

echo -n "0000:00:02.0" > /sys/bus/pci/drivers/i915/unbind

so that the device will sleep.

For Linux,

Echoing auto to the sys file (/sys/devices/..../..../power/control) is telling the kernel to enable Runtime Power Management for that specific device. I beleive this requires a minimum kernel version of 2.6.32, and Runtime PM must be enabled in the kernel config file (CONFIG_PM_RUNTIME=y).

The event that initiates the transition into D3 is loss of link. Unloading the driver will probably prevent the device from going into D3, better to just ifdown (or ifconfig ethX down) the interface.

You can determine the state of the devie with the command:

lspci -s 00:02.0 -vv

For NDIS, the same event (loss of link) is what initiates the transition to D3 (unload/disable device/cable pull/link-partner disconnect). You can find out the state of the device by looking at Properties->Details->Power data. In addition, the Power data screen should inform you of the Power state mappings (i.e. what Dx state is entered in each Sx state).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .