[ltp] X61 power consumption
Michael Karcher
linux-thinkpad@linux-thinkpad.org
Thu, 27 Nov 2008 14:26:29 +0100
--=-NPHa42ao1exgXDLrnReC
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
Am Donnerstag, den 27.11.2008, 13:00 +0100 schrieb Tino Keitel:
> > could you please elaborate on how to do it?
> I think that this should be possible with setpci for each device, at
> least for a quick test if it actually can save some power.
Yes, that is what I did.
If you do lspci -vv, you can find out at what offset the power
management structure is in the PCI configuration space, and what the
current settings are, like in
|08:03.4 FireWire (IEEE 1394): O2 Micro, Inc. Firewire (IEEE 1394) (rev 02)=
(prog-if 10 [OHCI])
| Capabilities: [60] Power Management version 2
| Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=3D0mA PME(D0+,D1+,D2+,D3hot+,D3co=
ld-)
| Status: D0 PME-Enable- DSel=3D0 DScale=3D0 PME+
It tells you that the states D1 and D2 are supported (by the "+" behind
the state identifiers), D0 and D3 are always supported.
To select the state, read the word at offset 4 in the power management
structure, in this case 0x60 (from lspci output) plus 4, and write the
D-State into the lowest two bits. For example:
| hermes2:~# setpci -s 8:3.4 0x64.W
| 8000
| hermes2:~# setpci -s 8:3.4 0x64.W=3D0x8003
Enters D3 mode. In that mode, the device does not have to behave anyhow
useful on the bus until you reset the mode to D0! That even applies to
config space except for the power management control register, so lspci
-H1 might show you an invalid PCI ID of that device. So, unload the
module before trying that, or you risk hard crashes. And set the mode
back to D0 before trying to load the module again.
Regards,
Michael Karcher
--=-NPHa42ao1exgXDLrnReC
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: Dies ist ein digital signierter Nachrichtenteil
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEABECAAYFAkkun/4ACgkQzhek2R7Eico9/wCfXbRof4UjZoDDd/wxxvKTw2Ak
fpYAn2ZtT3Bvvc5h3bL70zkN1ZAvTNU0
=mm70
-----END PGP SIGNATURE-----
--=-NPHa42ao1exgXDLrnReC--