HP Pavilion BIOS hack for silencing the fan
NOTE: This is a very interesting post by Rickard Holmberg I decided to mirror since the original is no longer online. It concerns hacking HP Pavilion BIOS in order to lower the CPU and GPU clocks and thus let the laptop fan make less noise. I found it a pretty interesting post, especially for those willing to deeply customize their laptop, to understand how the low level parts work and of course those brave enough to try!
Note that this guide has been conceived for Micro$oft Windows. Users of Linux do not have to hack the BIOS since they can profit from a custom kernel module named PHC that achieves the same goal via software (which means it’s highly unlikely you will ever break your coputer this way. Still wondering why Open Source is better?) Have a look at here for the howto: linux-phc-cpu-undervolting
Be careful you could end with a bricked BIOS and unusable laptop!! I personally have never had the chance to try this out, therefore I am sorry I cannot assist you in any way. Please refer to the original author for assistance.
Silencing the fan on HP Compaq under Windows XP
Recently I have had to work a bit in Microsoft Windows XP, since I got a job involving making some changes in Cygwin/X. I have been using my HP Compaq nw8240 for a while under Linux, and have tweaked the system quite a bit so that it is now effectively silent, apart from the harddrive whizzing. I couldn’t find much info on how to do this in Windows, though, so when I finally found out, I wrote this page to document how I got the computer as silent under Windows XP as I had it on Linux.
WARNING!
Anything you do to your computer is at your own risk. I don’t take responsability for what happens to your computer if you should follow the procedures outlined below. Don’t do anything described on this page if you don’t feel comfortable with the possibility that your actions may destroy your computer. In particular, the modified fan settings may fail to adequately cool your graphics processor! DON’T DO THIS IF YOU USE YOUR COMPUTER FOR 3D GAMING!
I am working on a more thorough patch that will take both CPU and GPU temperatures into account for controlling the fan speed, but right now only the CPU temperature is used, so in an extreme case, the GPU might overheat without the fan even turning on.
If you have any suggestions, questions or otherwise feel an urge to communicate with me, send an e-mail to rickard@holmberg.info.
Procedure overview
- Lower the CPU voltages using RMClock (makes the CPU produce less heat).
- (Optionally) Underclock your GPU, using ATITool.
- Lower fan speed with a modified ACPI DSDT table:
- Get the current DSDT from the registry
- Disassemble the DSDT using the Intel ASL Compiler (IASL).
- Patch the DSDT to change fan speeds
- Compile the patched DSDT using IASL.
- Install the new, patched DSDT using the Microsoft ASL Compiler (ASL).
- Reboot.
- Monitor your CPU temperature for a while, to see that the cooling is still working. The only program I’ve found that can actually do this is MobileMeter.
Lowering the CPU voltages
The first thing to do is to get the RMClock utility from RightMark. Install it and start it. Check the box that says “Run Automatically at Startup”. Under the “Management” tab, tick the “Use P-State Transitions” checkbox and add the Frequency-Voltage ID pairs you wish to use. I have a 2.13 GHz CPU, and the following pairs work fine for me:
| FID | VID |
|---|---|
| 6.0x | 0.716V |
| 8.0x | 0.812V |
| 10.0x | 0.892V |
| 12.0x | 0.956V |
| 14.0x | 1.036V |
| 16.0x | 1.148V |
If you have another CPU, those values will have to be different. Look at the minimum and maximum values under the “General” tab, and improvise. Don’t raise the voltages above what is shown on the “General” tab as maximal FID and VID. Lowering the voltages as much as possible, while keeping the system stable, is the point here. Further reading on FIDs and VIDs can be found in the Pentium M Datasheets available from http://www.intel.com/design/mobile/pentiumm/documentation.htm. Be sure to get the datasheet corresponding to your particular CPU.Enabling clock throttling might also help a bit.
Second, get the utility MobileMeter and install it. It’s quite important that you keep an eye on the CPU temperature (ThermalZone 1) so that it doesn’t overheat. Start worrying if the temperature goes over 70 degrees Celsius and keeps rising, but anything below 100 degrees Celsius won’t harm the processor.
Underclocking the GPU (optional)
I have seen a minuscule decrease (1-2 degrees Celsius) in GPU temperature when halving the core and memory clocks on my GPU. You may try it by using the utility ATITool.
Lowering the fan speeds
This is the most involved part, though it’s not really hard. Screwing up something may make bad things happen to your computer, though, since it may fail to run the fan. But you already knew that, so here’s how to do it.
Get the current DSDT
I am on my third motherboard for this computer now (not due to undervolting, but rather mechanical failures), and all three motherboards have had different DSDTs in BIOS, despite that HP hasn’t released any BIOS updates at all since the first one. Since the DSDT is quite intimately bound with a particular hardware revision, I won’t supply a pre-patched DSDT, but you’ll have to get the one currently used on your system and patch it yourself.To get the DSDT, you need a registry editor that can export raw binary data. If you have Cygwin installed with vim, you can type
reg query 'HKLM\HARDWARE\ACPI\DSDT\HP____\nc8200\00010000'| \ grep REG_BINARY|sed 's/.*BINARY.//'|xxd -r -ps > dsdt.orig
from a bash shell, and the DSDT will be saved to a file dsdt.orig in the current directory.If you don’t have Cygwin, you’ll have to get a program that can export the DSDT for you. I tested Registrar Lite, and it worked. Just navigate to HKEY_LOCAL_MACHINE\HARDWARE\ACPI\DSDT\HP____\nc8200\00010000, double-click on 00000000, click the small floppy icon at the bottom of the window, and save the data to disk as a file called dsdt.orig.
Disassembling your DSDT
Have a look at ACPI Component Architecture documentation website: http://www.acpica.org/documentation/
Now you should have a copy of your current DSDT in ACPI machine language. To be able to make changes to it, you should disassemble it to human-readable ACPI Source Language, ASL. The Intel ASL Compiler can do just that, so download it and unzip iasl.exe to the same folder you saved the DSDT AML file. Then start a command prompt, cd to the directory with the files, and type
iasl -d dsdt.orig
The program should respond with something like the following:
Intel ACPI Component Architecture AML Disassembler version 20050930 [Sep 30 2005] Copyright (C) 2000 - 2005 Intel Corporation Supports ACPI Specification Revision 3.0 Loading Acpi table from file dsdt.orig Acpi table [DSDT] successfully installed and loaded Pass 1 parse of [DSDT] Pass 2 parse of [DSDT] Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions) ................................................................. ................................................................. ................................................................. ................................................................. ................................................................. ................................................................. Parsing completed Disassembly completed, written to "dsdt.dsl"
This should give you a file called iasl.dsl, which is the disassembled DSDT.
Changing the fan speeds in the DSDT
There are four different speed settings for the fan, excluding stopped, that are switched between depending on the current CPU temperature. Each setting is an integer fan speed value between 0 and 64 (inclusive). The default speed settings are 26, 35, 41 and 64. With an undervolted CPU, these values can be lowered. I use the values 1, 14, 32 and 64, which works quite well, and is much more quiet than the standard settings.
To change the fan speed values, open the disassembled file in a text editor – notepad will do fine. There are 18 characters all in all that needs to be changed. Since the DSDTs vary quite a lot, your disassembled version may be slightly different from the one below, but use your best judgement to find what to change. Most likely, the line numbers are shifted slightly, and the PowerResource identifiers and method names (C2XX) may have changed a bit.
The fan speed values are encoded as the hexadecimal numbers 256 - 2*x, where x is the fan speed between 1 and 64. To encode fan speed 0 (completely off), use 0x7F. As an example, in the listing below, the original speeds (27, 36, 42, 64) are encoded as 0xCA, 0xB8, 0xAC and 0x80, while the modified speeds (1, 15, 33, 64) are 0xFE, 0xE2, 0xBE and 0x80, respectively.
The changes you should make are shown below. Changed lines are yellow.
| Line # | Original DSDT | Change to |
|---|---|---|
| 7325 | PowerResource (C268, 0×00, 0×0000) | PowerResource (C268, 0×00, 0×0000) |
| 7326 | { | { |
| 7327 | Method (_STA, 0, NotSerialized) | Method (_STA, 0, NotSerialized) |
| 7328 | { | { |
| 7329 | Return (C261 (0×01, 0×80)) | Return (C261 (0×01, 0×80)) |
| 7330 | } | } |
| 7331 | ||
| 7332 | Method (_ON, 0, NotSerialized) | Method (_ON, 0, NotSerialized) |
| 7333 | { | { |
| 7334 | If (LGreater (DerefOf (Index (C25E, 0×00)), C264 (C257, 0×00))) | If (LGreater (DerefOf (Index (C25E, 0×00)), C264 (C257, 0×00))) |
| 7335 | { | { |
| 7336 | C262 (0×01, 0×80) | C262 (0×01, 0×80) |
| 7337 | } | } |
| 7338 | } | } |
| 7339 | ||
| 7340 | Method (_OFF, 0, NotSerialized) | Method (_OFF, 0, NotSerialized) |
| 7341 | { | { |
| 7342 | C263 (0×01, 0xAC) | C263 (0×01, 0xBE) |
| 7343 | } | } |
| 7344 | } | } |
| 7345 | ||
| 7346 | PowerResource (C269, 0×00, 0×0000) | PowerResource (C269, 0×00, 0×0000) |
| 7347 | { | { |
| 7348 | Method (_STA, 0, NotSerialized) | Method (_STA, 0, NotSerialized) |
| 7349 | { | { |
| 7350 | Return (C261 (0×02, 0xAC)) | Return (C261 (0×02, 0xBE)) |
| 7351 | } | } |
| 7352 | ||
| 7353 | Method (_ON, 0, NotSerialized) | Method (_ON, 0, NotSerialized) |
| 7354 | { | { |
| 7355 | If (LGreater (DerefOf (Index (C25E, 0×00)), C264 (C256, 0×00))) | If (LGreater (DerefOf (Index (C25E, 0×00)), C264 (C256, 0×00))) |
| 7356 | { | { |
| 7357 | C262 (0×02, 0xAC) | C262 (0×02, 0xBE) |
| 7358 | } | } |
| 7359 | } | } |
| 7360 | ||
| 7361 | Method (_OFF, 0, NotSerialized) | Method (_OFF, 0, NotSerialized) |
| 7362 | { | { |
| 7363 | C263 (0×02, 0xB8) | C263 (0×02, 0xE2) |
| 7364 | } | } |
| 7365 | } | } |
| 7366 | ||
| 7367 | PowerResource (C26A, 0×00, 0×0000) | PowerResource (C26A, 0×00, 0×0000) |
| 7368 | { | { |
| 7369 | Method (_STA, 0, NotSerialized) | Method (_STA, 0, NotSerialized) |
| 7370 | { | { |
| 7371 | Return (C261 (0×04, 0xB8)) | Return (C261 (0×04, 0xE2)) |
| 7372 | } | } |
| 7373 | ||
| 7374 | Method (_ON, 0, NotSerialized) | Method (_ON, 0, NotSerialized) |
| 7375 | { | { |
| 7376 | If (LGreater (DerefOf (Index (C25E, 0×00)), C264 (C255, 0×00))) | If (LGreater (DerefOf (Index (C25E, 0×00)), C264 (C255, 0×00))) |
| 7377 | { | { |
| 7378 | C262 (0×04, 0xB8) | C262 (0×04, 0xE2) |
| 7379 | } | } |
| 7380 | } | } |
| 7381 | ||
| 7382 | Method (_OFF, 0, NotSerialized) | Method (_OFF, 0, NotSerialized) |
| 7383 | { | { |
| 7384 | C263 (0×04, 0xCA) | C263 (0×04, 0xFE) |
| 7385 | } | } |
| 7386 | } | } |
| 7387 | ||
| 7388 | PowerResource (C26B, 0×00, 0×0000) | PowerResource (C26B, 0×00, 0×0000) |
| 7389 | { | { |
| 7390 | Method (_STA, 0, NotSerialized) | Method (_STA, 0, NotSerialized) |
| 7391 | { | { |
| 7392 | Return (C261 (0×08, 0xCA)) | Return (C261 (0×08, 0xFE)) |
| 7393 | } | } |
| 7394 | ||
| 7395 | Method (_ON, 0, NotSerialized) | Method (_ON, 0, NotSerialized) |
| 7396 | { | { |
| 7397 | If (LGreater (DerefOf (Index (C25E, 0×00)), C264 (C254, 0×00))) | If (LGreater (DerefOf (Index (C25E, 0×00)), C264 (C254, 0×00))) |
| 7398 | { | { |
| 7399 | C262 (0×08, 0xCA) | C262 (0×08, 0xFE) |
| 7400 | } | } |
| 7401 | } | } |
| 7402 | ||
| 7403 | Method (_OFF, 0, NotSerialized) | Method (_OFF, 0, NotSerialized) |
| 7404 | { | { |
| 7405 | C263 (0×08, 0x7F) | C263 (0×08, 0x7F) |
| 7406 | } | } |
| 7407 | } | } |
Compiling the altered DSDT
Now that the changes are made to the DSDT, you should compile it back to ACPI machine language. Just type
iasl dsdt.dsl
The compiler will respond with something like the following;
Intel ACPI Component Architecture ASL Optimizing Compiler version 20050930 [Sep 30 2005] Copyright (C) 2000 - 2005 Intel Corporation Supports ACPI Specification Revision 3.0 dsdt.dsl 5817: Name (_WDG, Buffer (0x3C) Warning 2097 - ^ Unknown reserved name (_WDG) dsdt.dsl 6117: Method (_WED, 1, NotSerialized) Warning 2097 - Unknown reserved name ^ (_WED) ASL Input: dsdt.dsl - 7919 lines, 265496 bytes, 3987 keywords AML Output: DSDT.aml - 32043 bytes 933 named objects 3054 executable opcodes Compilation complete. 0 Errors, 2 Warnings, 0 Remarks, 1145 Optimizations
These two warnings are okay, but be watchful for other warnings that might indicate a typo or such. Also, if there are any “errors”, they must be corrected before you proceed.If the compilation went well, you will be left with a file called DSDT.aml.
Installing the modified DSDT
To install the DSDT with the new fan speed settings, you need the Microsoft ASL Compiler 2.0 (beta) or above. The reasons I use both the Intel and the Microsoft Compilers, are as follows:
- The Microsoft ASL Compiler can not disassemble AML to make ASL.
- The Intel ASL Compiler can not install DSDTs
Furthermore, due to slight syntax differences between IASL and the Microsoft ASL, and possibly the fact that IASL supports ACPI 3.0 and Microsoft’s only ACPI 2.0, the Microsoft compiler can’t recompile what the Intel compiler produced when disassembling. So, when you have installed the Microsoft ASL Compiler, just type
"C:\Program Files\Microsoft ASL Compiler BETA\asl.exe" /loadtable DSDT.aml
The program should respond with something similar to
Microsoft ACPI Source Language Assembler Version 2.0.2NT (BETA) [Apr 30 2004, 17:46:58] Copyright (c) 1996,2004 Microsoft Corporation Compliant with the ACPI 2.0c Specification Table overloading succeeded
Now reboot to make the changes effective. Don’t delete the DSDT.aml, nor the dsdt.orig files. You want to keep them around for uninstalling purposes.
Keep monitoring the system
When you have rebooted, start MobileMeter again and keep an eye on the CPU temperature. Since the new DSDT is effective much earlier than RMClock starts, the CPU may get a little hot during bootup (about 55 degrees), while the voltages are still high, but after a few minutes it should be down under 50. Most importantly, your fan should be much quieter than before.As for CPU temperatures to expect, when idle, my CPU keeps between 39 and 45 degrees Celsius, and it goes up to about 65 under full load. If yours is significantly hotter than this, you may need to alter the fan speeds in dsdt.dsl. See above.
Uninstalling
If you for some reason want to restore your original DSDT, here’s how. Just open a command prompt, go to the directory where you saved the DSDT.aml and type
"C:\Program Files\Microsoft ASL Compiler BETA\asl.exe" /loadtable -d DSDT.aml
Rebooting should make your fan loud again.
Links
- RMClock: http://cpu.rightmark.org/products/rmclock.shtml
- ATITool: http://www.techpowerup.com/atitool/.
- Intel ASL Compiler (IASL): http://developer.intel.com/technology/iapc/acpi/downloads.htm
- Microsoft ASL Compiler v2.0 BETA: http://www.microsoft.com/whdc/system/pnppwr/powermgmt/
- MobileMeter: http://www.geocities.co.jp/SiliconValley-Oakland/8259/
- Registrar Lite: http://www.resplendence.com/reglite
- Generic ACPI info: http://www.acpi.info/
- ACPI Component Architecture: http://www.acpica.org/
- Pentium M Datasheets: http://www.intel.com/design/mobile/pentiumm/documentation.htm
- Implementing, Testing And Debugging ACPI On Windows Platforms: http://download.microsoft.com/download/1/8/f/18f8cee2-0b64-41f2-893d-a6f2295b40c8/TW04015_WINHEC2004.ppt (powerpoint presentation)
- Ubuntu GNU/Linux on the HP Compaq nw8240: http://avkrok.net/nw8240/
Glossary
| ACPI | Advanced Configuration and Power Interface, an interface for configuring computers. |
| AML | ACPI Machine Language, a bytecode language that is interpreted by the operating system to carry out the instructions from the DSDT. |
| ASL | ACPI Source Language, the language that the DSDT is written in. Compiles to make the AML file. |
| DSDT | Differentiated System Descriptor Table, a set of instructions, specific for each computer model, that describes to the operating system how to configure the computer. For the purposes of this page, it specifically includes instructions for controlling the fans. |
Related posts:
- HP Pavilion laptops BIOS DSDT hack
- HP Pavilion BIOS changelogs and download links
- TrustedCore BIOS è di default sui portatili HP Pavilion
- HP Pavilion Recover from failed BIOS update
- TrustedCore BIOS is the default on HP Pavilions
Print This Post
|
Email This Post
[...] HP Pavilion BIOS hack for silencing the fan | Nobody was Born with … Tags: fan, fan noise, laptop, transport samples Published by admin on Oct 30, 2009 under 1 | Post your comment now Find out more: here « laptop for sale [...]
Hi.
I’m trying to fix the DSDT and fan control on my HP Pavilion DV7-1145ef. I’m using the last BIOS (F.2C) and I deactivated “Fan always on”.
I’m coming from two others articles about DSDT :
- http://h30434.www3.hp.com/t5/Hardware/Pavilion-1150-em-Fan-Noise/m-p/25553#M3391
- http://notebookequus.blogspot.com/
Thanks to your article I now understand that the values about the fan control are coded differently on the recent Pavilions.
However, in my DSDT, I can’t find those different _OFF functions, there is only one :
PowerResource(FN00, 0x0, 0x0)
{
Method(_STA, 0x0, Serialized)
{
If(ECON)
{
If(\_SB_.PCI0.LPC_.EC0_.FAN1)
{
Return(One)
}
Else
{
Return(Zero)
}
}
Return(One)
}
Method(_ON_, 0x0, Serialized)
{
If(ECON)
{
Store(One, \_SB_.PCI0.LPC_.EC0_.FAN1)
}
}
Method(_OFF, 0x0, Serialized)
{
If(ECON)
{
Store(Zero, \_SB_.PCI0.LPC_.EC0_.FAN1)
}
}
}
Device(FAN_)
{
Name(_HID, 0xb0cd041)
Name(_UID, Zero)
Name(_PR0, Package(0x1)
{
FN00
})
}
Here is the full DSDT : http://drop.io/hidden/lsoi26pttonrng/asset/ZHNkdC1hc2w%253D
Do you have any idea maybe ?
Thanks.