Difference between revisions of "How to control fan speed"
m (How to control fan seed moved to How to control fan speed) |
|||
Line 6: | Line 6: | ||
The [[Patch for controlling fan speed]] provides a convenient interface via {{path|/proc/acpi/ibm/fan}}. | The [[Patch for controlling fan speed]] provides a convenient interface via {{path|/proc/acpi/ibm/fan}}. | ||
− | ===Stock kernel, using <tt>ibm-acpi<tt>=== | + | ===Stock kernel, using <tt>ibm-acpi</tt>=== |
If you have the [[ibm-acpi]] module loaded with <tt>experimental=1</tt>, you can control the fan without patching the kernel by directly writing to the relevant embedded controller register using {{path|/proc/acpi/ibm/ecdump}}. | If you have the [[ibm-acpi]] module loaded with <tt>experimental=1</tt>, you can control the fan without patching the kernel by directly writing to the relevant embedded controller register using {{path|/proc/acpi/ibm/ecdump}}. | ||
Line 12: | Line 12: | ||
For example: | For example: | ||
− | {{cmdroot|echo 0x2F | + | {{cmdroot|echo 0x2F 0x00 > /proc/acpi/ibm/ecdump}} (fan off) |
− | + | {{cmdroot|echo 0x2F 0x02 > /proc/acpi/ibm/ecdump}} (low speed) | |
+ | |||
+ | {{cmdroot|echo 0x2F 0x04 > /proc/acpi/ibm/ecdump}} (medium speed) | ||
+ | |||
+ | {{cmdroot|echo 0x2F 0x07 > /proc/acpi/ibm/ecdump}} (maximum speed) | ||
+ | |||
+ | {{cmdroot|echo 0x2F 0x80 > /proc/acpi/ibm/ecdump}} (automatic - default) | ||
+ | |||
+ | {{cmdroot|echo 0x2F 0x40 > /proc/acpi/ibm/ecdump}} (disengaged) | ||
+ | |||
+ | Ssee the specifications below for the meaning of these modes. | ||
===Automated control scripts=== | ===Automated control scripts=== | ||
Line 65: | Line 75: | ||
− | The following models also work, use a different access method which supported via the {{path|/proc/acpi/ibm/fan}} of [[ibm-acpi]] even on stock kernels (no need for patching). | + | The following models also work, use a different access method which supported (only) via the {{path|/proc/acpi/ibm/fan}} of [[ibm-acpi]] even on stock kernels (no need for patching). |
* ThinkPad {{600E}}, {{600X}}, {{770E}}, {{770X}} (these use a different fan control interface) | * ThinkPad {{600E}}, {{600X}}, {{770E}}, {{770X}} (these use a different fan control interface) |
Revision as of 20:28, 20 January 2006
This page discusses methods for controlling the system fan.
Contents
For Linux
Patched kernel
The Patch for controlling fan speed provides a convenient interface via /proc/acpi/ibm/fan.
Stock kernel, using ibm-acpi
If you have the ibm-acpi module loaded with experimental=1, you can control the fan without patching the kernel by directly writing to the relevant embedded controller register using /proc/acpi/ibm/ecdump.
For example:
# echo 0x2F 0x00 > /proc/acpi/ibm/ecdump
(fan off)
# echo 0x2F 0x02 > /proc/acpi/ibm/ecdump
(low speed)
# echo 0x2F 0x04 > /proc/acpi/ibm/ecdump
(medium speed)
# echo 0x2F 0x07 > /proc/acpi/ibm/ecdump
(maximum speed)
# echo 0x2F 0x80 > /proc/acpi/ibm/ecdump
(automatic - default)
# echo 0x2F 0x40 > /proc/acpi/ibm/ecdump
(disengaged)
Ssee the specifications below for the meaning of these modes.
Automated control scripts
For Windows
Shimodax's ThinkPad fan control tool (see the forum discussion at thinkpads.com).
Hardware specs
The patch relies on the following hardware behavior, which was discovered experimentally by Thinker and neither provided by nor confirmed by IBM/Lenovo. The following description may be inaccurate and may vary by model (see list of models above). The terminology probably does not match the one used by IBM/Lenovo engineers.
ACPI DSDT register _SB.PCI0.LPC.EC.HFSP (8 bits, offset 0x2F in the EmbeddedController address space, accessed through the standard EC interface at IO ports 0x62 and 0x66) is read/writable and has the following meaning:
Bits 7 6 5 4 3 2 1 0 --------------- Value 1 0 * * * * * * - automatic * 1 * * * * * * - disengaged 0 0 N N N N N N - manual (0..63; 0=disable fan, 1=min, ..., 7=max)
In automatic mode, the embedded controller sets the fan speed automatically according to system temperatures and some unknown algorithm.
In manual mode, the fan level is forced to the given value and the EC will auto-regulate the fan to maintain at a (roughly) constant RPM, which is model-dependent. Manual speed levels 8-63 yield the same behavior as level 7, and the the ACPI DSDT uses level 7 for the emergency mode it enters upon critical CPU/GPU temperature, so apparently 7 is the real maximum level.
In disengaged mode, the embedded controller does not read the fan RPM (hence EmbeddedController offset 0x84 is not updated), and does not maintain a stable fan speed. When disengaged mode is entered the fan speed is not immediately changed (except if the fan was disabed, in which case it is turned on at a low level). However, once in disengaged mode, fan speed will slowly increase to beyond the maximum manual level (this may cause hardware damage!).
After boot, the register may not reflect the true state of the EC (on some models it reads 0x07 even though the EC is actually in automatic mode).
Supported models
The above was successfully tested on the following models:
- ThinkPad T43, T43p (fan levels RPM: 1-2 = ~3300, 3-5 = ~4100, 6-7 = ~4700; disengaged mode works)
- ThinkPad T42, T42p (fan levels RPM: 1-2 = ~2900, 3-5 = ~3700, 6-7 = ~4700)
- ThinkPad T41, T41p (fan levels RPM: 1-2 = ~2980, 3-5 = ~3500, 6-7 = ~4050; disengaged mode works at ~5100)
- ThinkPad T40 (fan levels RPM: 1-2 = ~2950, 3-5 = ~3600, 6-7 = ~4050)
- ThinkPad T22
- ThinkPad T23
- ThinkPad R52
- ThinkPad R50 (highest manual level is 3; disengage mode works and reaches much higher RPM)
- ThinkPad X41 Tablet
- ThinkPad X31
- ThinkPad Z60t (fan levels RPM: 1-2 = ~1700, 3-5 = ~2800, 6-7 = ~3500)
Probably other models are supported too (please update this page if you confirm this).
The following models also work, use a different access method which supported (only) via the /proc/acpi/ibm/fan of ibm-acpi even on stock kernels (no need for patching).
Unsupported models
- ThinkPad 560 (these models don't have a fan)