Monday, November 30, 2009

K10STAT AMD Griffin Processor UnderVolting Guide


FAQ

Why UnderVolt?

Because if a lower voltage can sustain your clockspeed undervolting preserve battery life and reduce heat generated without affecting your CPU performance at all!!

0 performance handicap with less heat output and longer battery life!! (Your yield may vary)

If it is so great why manufacturers don't undervolt?

Because they create processors in bulk you can't expect them to test and undervolt every single processor!

So they simply take the a slightly higher approximate stable voltage and burn the same value into every chip of the same family!

Will it spoil my processor?

No it won't, because it doesn't involve making it hotter.
In non-biological system usually heat destroys and cold preserves.
During testing, BSOD (Blue Screen of Death) is common but after a restart the Processor Voltage is restored to original value.
After finalising the stable voltages then you set the program to run every startup.
I strongly recommend testing ALL THE P-STATES before setting up the final values so your computer will not crash when you are doing your important work (or in the middle of gaming).

Why don't you use Windows Startup to run it?

Microsoft seems to be encouraging running start-ups through Task Scheduler, not to mention Task Scheduler allows good control over program automated execution.

Which Processor is it for ?

AMD Griffin Series Processor, ZM,RM,QL,SI and the new M3XX, M5XX, M6X0 Turion II Processor series.

But I am using Intel Processors?

For Core 2 Duo Processor you can use RMClock, if you are using 64bit Operating System you might need to google for 64bit libraries to replace some of the 32bit libraries. You can google it up.
For Core i3/5/7 users, I haven’t heard of any undervolting tool but I personally seen in the BIOS/EFI ACPI P-State Control is Unlockable, so BIOS/EFI modding is a possible solution.

But I am using AMD TL Series and below Processors ?
Use RMClock as well refer to “But I am using Intel Processors”.

Getting Started


Firstly download K10STAT from here.
I Extracted it to C:\Program Files\K10STAT (K10STAT is 64bit and 32bit capable as well)
Configure K10STAT


When you run K10STAT you should see the menu above.
You can set a maximium of 5 Profiles.

FID: The multiplier for the Processor
(FID doesn't work in AMD Mobile Processors because they are multiplier-locked)

DID: The P-State of the Processor
Note all Processors supported by K10STAT uses K10 Power Design


CPU-Voltage

That is what we are interested in.
To set the voltage for P0 simply select P0 and select the corresponding voltage and apply.
Remember: Min 0.75 V Max 1.2 V!
Caspian CPUs maybe able to run lower than 0.75V
For me I tested -0.05 is the Max Stable voltage for each default state any higher it BSOD!

Up%:

This is the amount of CPU usage load before the processor increase P-State to meet the minmium load requirements.
Currently it is set at 60% meaning it will switch from P2 to P1 when processor detect 60% CPU load and the same applies from switching from P1 to P0.

Down%:

It is basically the opposite of Up %
This is the amount of CPU usage load before the processor decrease P-State to meet the minimum load requirements.

Up (milliseconds):

It is the time the processor takes to switch from one P-State to the next higher P-State.

Down (milliseconds):

It is basically the opposite of Up.
It is the time the processor takes to switch from one P-State to the next lower P-State.
After you have set suitable values (-0.05 recommended on first try).



Use Windows Processor Power Management to test different levels.

Use 4 Windows as shown above, to monitor all the P-States so it is more convenient to assess the values and monitor the states.

First remember to enable K10STAT Clock Control



To test simply click on the Core of the P-State immediately the Processor will assume the P-State.


Test each P-State by running Intel Burn In (Google and Download) or any suitable CPU loading tool.

For me the voltage values that passed Intel Burn In test are 1.075V, 0.850V and 0.750V.

At 1.025V, it BSOD after 2 mins.
At 1.0372V-1.050V it produced the wrong result.

Test all P-States you have modified so it won’t crash whenever the CPU switches to any of them.

To pass LinPack, the result calculated by the CPU must be consistent.
After you have affirmed the stable voltage values then you may proceed to set it to start automatically.

Setting K10STAT for StartUp

Open Task Scheduler by accessing Start Menu\All Programs\Accessories\System Tools\Task Scheduler

Create a Task



Alternatively you can make it run as a SYSTEM task (as shown below)


If you want the K10STAT icon to appear in the systray run the program under your username.
If you run it as SYSTEM account the program will run too but it will not be visible.
Click "Change User or Group" then Enter "System" then choose "Check Names" then select OK.


or you can create it as a startup process as shown below. (RECOMMENDED because it will run before a logon is required)


**Please note a file called K10stat.dat containing the undervolt settings will be created in the C:\Windows\System32 folder because it is the default path for admin rights unless you changed the "Start In (Optional)" parameters, the setting just under the "Add Arguments (Optional)" parameters as shown below.


The program will load the settings from K10STAT.dat so make sure all the changes are overwritten to the file. When you launch K10STAT manually a new K10STAT.dat will be created in C:\Program Files\K10STAT which Task Scheduler WILL NOT LOAD.
It will only load the K10STAT.dat in C:\Windows\System32 unless you change the "Start In" parameters to "C:\Program Files\K10STAT".

If you do not specify “Start In” parameters, the file “K10stat.dat” will be created in C:\Windows\System32 (Default Administrator Path) as shown below.


The following arguments are available (Source:http://dsus4.blog126.fc2.com/blog-entry-3.html)

Command Line Option
-lp:#(1-5) - load profile#(1-5) and write to MSR.

-nw - Start K10stat with No Window.

-ClkCtrl:#(0-4) - Enable Clock Control by K10stat.
0: No Control
1: Control clock of each core.
2: Control clock of all cores together (Criterion is most loaded core).
3: Control clock of all cores together (Criterion is average of all cores).
4: Control clock of all cores together (Criterion is least loaded core).
If you set -ClkCtrl:2 you get better performance at the expense of more power consumption.
Because Windows proceed on the assumption that cores are unganged by default.

AMD K10 Processors were designed originally to use unganged mode to conserve power.

-StayOnTray - use this option with -nw for Clock Control Mode.(Note after a sleep if the CPU registers are resetted, voltages will revert to default, hence you need -StayOnTray to ensure it is always running in the background)
e.g.Target:
"C:\Program Files\K10stat\K10STAT.exe" -lp:1 -ClkCtrl:2 -StayOnTray -nw



Finally you can Control your CPU using the K10STAT Systray if you enabled -StayOnTray manually as well.


-ClkCtrl:#(0-4) - Enable Clock Control by K10stat (Refer to above).
0:No Control

1:Control clock of each core.
UnGanged means each CPU Core #0 & #1 operates independently of each other so at any one time their frequency and DID could be different.(This is the original intent of the design of the Turion Chips as they are given different power planes.)

2:Control clock of all cores together (Criterion is most loaded core).
This means the CPU will raise/drop the DID of Core #0 & #1 together when it detects the one of higher Core has reached the criteria for a Frequency boost/Throttle Down.

3:Control clock of all cores together (Criterion is average of all cores).
This means the CPU will raise/drop the DID of Core #0 & #1 together when it detects the average of both core has reached the criteria for a Frequency boost/Throttle Down.

4:Control clock of all cores together (Criterion is least loaded core).
This means the CPU will raise/drop the DID of Core #0 & #1 together when it detects the one of lowest Core has reached the criteria for a Frequency boost/Throttle Down.


A new function called Lock-P-state is available in new versions of K10Stat.

It is another way you can lock the P-state for P-state testing again you should enable Clock Control before performing the P-State Testing.

Down Core refers to switching off 1 of the Cores either Core0 or Core1.

Testing

__________________________________________________________________



Original Factory Default Settings
_________________________________________________________________________


UnderVolted 1.075V
In Unganged Mode
__________________________________________________________________


UnderVolted 1.075V
In Ganged Mode (Based on highest core)
__________________________________________________________________

Thats All !

AMD Technical Documentation Regarding Turion Processors here

(Contains Temperature Limits P-States and Voltages)

Sunday, November 22, 2009

Wireless Suspend and Resume on Aspire 4530

The issue has been fixed with the latest Linux Kernel 2.6.31-16 updates, I will still leave the post open in case someone needs sleep, resume custom scripts.

As noted after suspend resume the wireless doesn't work due to a bug that broke suspend and resume in ath9k drivers.
However I found a workaround.
Create a script with the following inside
!# /bin/sh
sudo modprobe -r ath9k
sudo modprobe ath9k

Call it ath9kreset for easy recalling of its purpose.

Then put the script into /etc/pm/sleep.d folder.

Make it executable by running

sudo chmod +x /etc/pm/sleep.d/ath9kreset

After that wireless should work after each suspend.

Sunday, November 8, 2009

DSDT Testing

How to overload DSDT into Windows
1)Download Microsoft ASL Compiler

2)Go to Microsoft ASL Compiler from the start menu program
Right Click on ASL Compiler Command Window, select Run as Administrator

3)At the Command Prompt Window
Change Directory to Desktop.
Eg (cd "C:\Users\{Your Username}\Desktop")
Leave the command prompt open

4)Download the AML File into Desktop (in this example call it DSDT.AML

5)Using the Command Prompt Window in 3) Type:
asl /loadtable DSDT.AML
and Enter.
You should see loadtable successful
Restart for changes to take place.

You should see something like this in event log meaning THRM is enumerated


I am trying to make improvement to Aspire 4530 DSDT
The following is done using the Thermal Control Values from Aspire 4535G because I didn't hear overheated 4535Gs
I feel that this DSDT mod is good but I hope you get your feedback before incorporating the changes into BIOS release.
Please try this especially Gamers!
The aim is to reduce temperature during gaming!

Download the trial DSDT here

Changelog:
1)Added CPU1 to the list of thermal devices to be controlled
2)Use the THRM values of Aspire 4535G for the following methods
a)_TMP return value
b)_PSV
c)_TSP
d)_TC1
e)_TC2

How to obtain DSDT from Windows.

Saturday, November 7, 2009

How to obtain the DSDT from your laptop

There are many ways to rip the DSDT out of the laptop BIOS.
If there is a BIOS editor it is possible to rip out the .AML file.
However below is an easy way to obtain the DSDT AML file.
First download and install a powerful system BIOS viewing utility called RW-Everything.

Next launch the program.
Click the "ACPI" picture menu button just below the menu bar.

It will say building DSDT and you have to wait for a while.

Once it is ready, Click on the DSDT Tab and press Save as Binary (The Picture of the Floppy Disk with a "bin" word on it or Shift + F2)

Name it as DSDT.AML

This will be the AML file you will decompile to readable text by a ASL Compiler.

If you want me to check it you can upload it on a file sharing site (please upload it on a easy to download site like mediafire etc no rapidshare please) I will check the DSDT syntax.

Friday, November 6, 2009

ACPI DSDT Investigation

There has been this problem with Acer Aspire 4530.
When the temperature of the GPU hits 99 degrees the fans don't seemed to turn on to cool it.
Instead the GPU throttle down but without the active cooling the throttling doesn't help instead it stays around 95-99 cycling back and forth.
Therefore I investigated the ACPI configuration of the laptop.
Using Phoenix BIOS editor I extracted the AML file contain compiled ACPI instruction.
The AML file is actually the DSDT Table which Windows load from the BIOS
Using Microsoft ASL Compiler I decompiled the AML file to a notepad readable format.
After checking with ACPI specification PDF documentation I discovered a flaw in the coding.
According to the ACPI documentation as shown below
_PSV is supposed to be the temperature which it safe to do passive cooling meaning fan can turn off.
However Acer programmed the _PSV value to be 0x63 (hex) which is actually 99 degrees in Decimal.
Which means when the laptop reaches 99 degrees it is safe to turn off the fan which led to this situation.
Therefore I modded the DSDT changed it to 45 degrees and overload the table to Windows Registry.
Now the fan no longer stop working when the temperature reaches high levels.

Here I share with you the patched DSDT (actually you can patch the BIOS but I prefer not to do this)

To use the DSDT install Microsoft ASL Compiler, v. 3.0.1 [646 KB] from this page.

Copy and paste the patched DSDT to "C:\Program Files\Microsoft ASL Compiler v3.0"
Then open a Command Prompt Windows with Admin Permission then type
cd "C:\Program Files\Microsoft ASL Compiler v3.0"
asl.exe /loadtable DSDT.AML
You should see "Table Overloading Succeeded".
Reboot.

I modified another value.
It is the return value for the THRM.
I modified the else condition to a higher hex value so the else condition will assume higher temperature.
I relink the link above to the newer file.

Hi guys sorry I promised there would be no changes to th Acer Aspire 4530 BIOS but I found some errors in the Acer Aspire 4530 DSDT code hence I had to recompile and replace the buggy DSDT code found originally in the Acer Aspire 4530 BIOS.

Here is an excerpt from the original buggy code.

I used IASL Compiler (Intel ASL Compiler) for this purpose as Microsoft ASL Compiler is non-standard(Doesn't guarantee Linux Compatibility), no optimization & buggy.

The new output after I corrected the DSDT:


As usual I always tested the new BIOS with my Aspire 4530 before releasing it so no worries.

Please refer here for the modified BIOS for Aspire 4530

**Note important!
I have removed the optimized DSDT as many seems to have issues with it.
If your Windows report error please flash from DOS (Read Instructions) because DOS doesn't require ACPI so it should be possible.

(Includes Win7 SLIC, Undervolted GPU & Corrected DSDT code)
I noticed things like Brightness Display during unplugging of Adapter and Battery is solved with this DSDT Code Correction.