I’ve pieced this information together from various sources on the web (apologize if I’ve included someones webpage without their consent). Kent over at http://arrrr.com/ helped me out a great deal figuring out this dsdt stuff and his howto for the Presario is great for linux laptop users: http://arrrr.com/presario2800.shtml
This is how I was able to get C3 states on my old P4-m with an ICH3-m chipset 82801CA. Not sure how successful it will be for others, but it seems like it should be reproducible. I’ve looked through several dsdts on http://acpi.sourceforge.net/dsdt/index.php and it seems that many manufacturers have left out the C-state coding (I actually don't see this in some newer laptops either). Thus, no matter how hard you bang your laptop against the wall, patch it to high heaven, beg god etc, you won’t get C3 or C4. My laptop (VPR 180B5 that is based off a Samsung P10) normally comes up with C1 & C2. I noticed the CST information missing and decided to see if I could add it in. So far I have had some success: Pros; C3 or C4 states can be reached, power draw has dropped from 20+ watts to 15 watts during idle (with screen off I get 10.9 watts), C3 residency is 99%, wakeups are 20 -30 with wifi off. Cons; I’ve seen the occasional lockup – ie. GUI freezes completely, and keyboard is not responsive. However, I think this may be due to either the ondemand governor (currently trying conservative with good results) or additional power management like gnome-power manager, or it could be because I’m using CentOS5 (I know, I need to switch to a more cutting edge distro, but I use it at work on my servers and like to use it for testing). Enough babbling. Here's how I was able to get C3 States 1) 1O1) Obtain your DSDT: cat /proc/acpi/dsdt > dsdt or get it from here: http://acpi.sourceforge.net/dsdt/index.php 2) Download the latest iasl from intel and run: iasl -d dsdt ; this will create a file called dsdt.dsl 3) 3) Open dsdt.dsl with Vi , gedit etc, & find CPU info for C-State Scope (\_PR) { Processor (CPU0, 0x00, 0x00001010, 0x06) {} //Note the 0x06. Some laptops have 0x07 which prevents the code from being read properly. If you see 0x07, change it to 0x06 and that might be all you need. 4) 4) Add CST info for C-States if you do not see it in the dsdt. Mine only showed Processor (CPU0, 0x00, 0x00001010, 0x06) {} . (The following is an example only – taken from http://www.acpi.info/spec30a.htm pp255-267): Name(_CST, Package(0x04) { 0x04, // There are four C-states defined here with three semanticsThe third and fourth C-states defined have the same C3 entry semantics. If only 3 C-states, use 0x03. Package(0x04){ResourceTemplate(){Register(FFixedHW, 0, 0, 0)}, 1, 20, 1000}, //Cstate=1, latency=20, power=1000mA Package(0x04){ResourceTemplate(){Register(SystemIO, 8, 0, 0x1013)}, 2, 40, 750}, //Cstate=2, latency=40, power=750 mA Package(0x04){ResourceTemplate(){Register(SystemIO, 8, 0, 0x1014)}, 3, 60, 500}, Package(0x04){ResourceTemplate(){Register(SystemIO, 8, 0, 0x1015)}, 3, 100, 250} }) } Note with above code: I have used standard decimals for specifying Cstate, latency and power. Usually these are entered as hex but the iasl will compile regardless. The higher the latency & lower the power = better power savings. Also, C4 is usually mapped to a C3 state but C4 has less power and higher latency = more power savings/deeper sleep. For my laptop I am just using one C3 at the moment. Latencies and power will vary with different processors – i.e. Centrinos might use 100 mA instead of 250 for C4. 5) 5) Compile new DSDT with iasl: iasl -tc dsdt.dsl Make sure there are no errors as this creates two files – dsdt.hex and DSDT.aml (DSDT.aml is not created if you have an error). You need the DSDT.aml for the next steps 6) Recompile Kernel to allow initrd – intrafms: http://gaugusch.at/kernel.shtml a. Obtain intrd patch http://gaugusch.at/acpi-dsdt-initrd-patches/acpi-dsdt-initrd-v0.8.4-2.6.21.patch First you need to patch your kernel: cd /usr/src/linux patch -p1 < /tmp/acpi-dsdt-initrd-patch-v0.x-....patch In kernel config enable the ramdisk (not as module!) and initrd (in Block Devices) and enable CONFIG_ACPI_CUSTOM_DSDT_INITRD at the ACPI options (General Setup|Power Management|ACPI Support|Read custom DSDT from initramfs). Recompile your kernel (see #7) 7) 7) Make sure kernel is latest 2.2.22 with HRT Patches and includes patch for your ICHX if applicable – ICH3/4 patch important for P4 systems. http://www.tglx.de/projects/hrtimers/ 8) 8) Compile kernel to allow tickless, High resolution time support, HPET, 1000HZ etc, ram disk via, ACPI (check all relevant power savings,bios support, cpu translation stats etc – build into kernel), initramfs: make menuconfig, make all, make modules_install, make install 9) Add your DSDT.aml into the intrd: 9) Script to add DSDT to initrd: http://gaugusch.at/acpi-dsdt-initrd-patches/initrd-add-dsdt Usage: ./initrd-add-dsdt initrd-2.6.22x.img DSDT.aml Cross your fingers and reboot. Now if everything works you should have additional C-states. If you want to make changes to your C-states, add, remove, modify latencies, power etc, then just redit the dsdt.dsl file, recompile with iasl to get a new DSDT.aml and re-add it to your initrd -- no need to recompile your kernel! If anyone has any suggestions or sees something wrong with this method please let me know. I'm not sure if additional code needs to be added to the dsdt to flush caches when entering C3/C4 but I believe the hardware should take care of this. ____________________________________________________________________________________ Shape Yahoo! in your own image. Join our Network Research Panel today! http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
_______________________________________________ Power mailing list [email protected] http://www.bughost.org/mailman/listinfo/power
