<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.thinkwiki.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Masurium</id>
	<title>ThinkWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.thinkwiki.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Masurium"/>
	<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/wiki/Special:Contributions/Masurium"/>
	<updated>2026-05-09T13:41:54Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.12</generator>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=How_to_make_use_of_IrDA&amp;diff=23066</id>
		<title>How to make use of IrDA</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=How_to_make_use_of_IrDA&amp;diff=23066"/>
		<updated>2006-07-04T07:06:36Z</updated>

		<summary type="html">&lt;p&gt;Masurium: /* LIRC and IrDA */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;white-space:nowrap;&amp;quot; | __TOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#efefef; align:right;&amp;quot;&amp;gt;&lt;br /&gt;
The purpose of this document is to get the [[IrDA]] hardware in your ThinkPad operational, setting up communication to other devices is not covered. However, the external links section can prove useful for this.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Serial IR (SIR) ==&lt;br /&gt;
SIR is limited to serial datarates up to 115.2Kb/s&lt;br /&gt;
&lt;br /&gt;
To use it, run {{cmdroot|irattach /dev/ttyS1 -s; modprobe ircomm-tty}}  (on {{Fedora}} 5 just run {{cmdroot|service irda start}}). Then turn on your IrDA-capable device and put it within range, and point your software (e.g., &amp;lt;tt&amp;gt;minicom&amp;lt;/tt&amp;gt;) to {{path|/dev/irda0}}.&lt;br /&gt;
&lt;br /&gt;
===Kernel configuration===&lt;br /&gt;
&lt;br /&gt;
Some distributions (e.g., {{Fedora}} 5) already include the equvialent of the following.&lt;br /&gt;
&lt;br /&gt;
==== Linux 2.4 kernel config ====&lt;br /&gt;
Edit {{path|/etc/modules.conf}} and add the following lines&lt;br /&gt;
 alias tty-ldisc-11 irtty&lt;br /&gt;
 alias char-major-161 ircomm-tty&lt;br /&gt;
&lt;br /&gt;
==== Linux 2.6 kernel config ====&lt;br /&gt;
Edit {{path|/etc/modprobe.conf}} and add the following lines&lt;br /&gt;
 alias tty-ldisc-11 irtty-sir&lt;br /&gt;
 alias char-major-161 ircomm-tty&lt;br /&gt;
&lt;br /&gt;
== Fast IR (FIR) ==&lt;br /&gt;
FIR is the preferred mode of IrDA operation and operates at a bandwidth of 4 Mbps&lt;br /&gt;
&lt;br /&gt;
The chips FIR mode first needs to be activated using the ISA PnP or BIOS method.&lt;br /&gt;
&lt;br /&gt;
{{HINT|Regardless of which method you use, you will still have to set the dongle_id and run setserial as shown further below}}&lt;br /&gt;
=== ISA PnP support for nsc-ircc ===&lt;br /&gt;
&lt;br /&gt;
ISA PnP support is '''necessary''' in some cases, as without it the kernel doesn't manage to enable the device by itself in many ThinkPads.&lt;br /&gt;
&lt;br /&gt;
Starting with the 2.6.17-rc1 kernel, the nsc-ircc driver has ISA PnP support.  For older kernels you will need patches to allow the loading of the driver without the below BIOS change.&lt;br /&gt;
&lt;br /&gt;
* [http://steffenpingel.de/patches/nsc-ircc-pnp.diff 2.6.10 patch]&lt;br /&gt;
* [http://shamrock.dyndns.org/~ln/linux/nsc-ircc-pnp.2.6.12-rc6.diff 2.6.12-rc6 patch] &lt;br /&gt;
* [http://shamrock.dyndns.org/~ln/linux/nsc-ircc-pnp.2.6.12.diff 2.6.12 patch (applies cleanly to 2.6.12 through 2.6.15)]&lt;br /&gt;
&lt;br /&gt;
=== NS PC8394T support ===&lt;br /&gt;
&lt;br /&gt;
Thinkpads {{T43}}, {{T43p}} and {{R52}} [http://bugzilla.kernel.org/attachment.cgi?id=8247 need an extra patch] to detect their [[NS PC8394T]]-based FIR device (even in 2.6.17 kernels).  They also require ISA PnP support in the driver to work, which is already available in 2.6.17 (and can be added to 2.6.16 with the patches above).&lt;br /&gt;
&lt;br /&gt;
=== Changing BIOS settings ===&lt;br /&gt;
For older kernels (prior to 2.6.17-rc1), the easiest way to activate FIR mode is by entering BIOS setup during boot-up by pressing {{key|F1}} when prompted.&lt;br /&gt;
Then, selecting 'Config' followed by 'Infrared' will allow you to control the IrDA operation. Here you will need to select the option to Enable the infra-red port, and ensure the proper resources are set (typically: IO 0x2f8 and IRQ 3). Be sure to save the changes, and then Exit.&lt;br /&gt;
&lt;br /&gt;
{{NOTE|Changing these BIOS settings does not affect Windows 2000 or XP operating systems, but may cause resource issues in older windows versions, or other legacy operating systems.}}&lt;br /&gt;
&lt;br /&gt;
{{WARN|If you change the BIOS settings for IO, IRQ or DMA of the IrDA port, remember to do so accordingly on all examples in this page when applying them to your ThinkPad.}}&lt;br /&gt;
&lt;br /&gt;
===Kernel configuration===&lt;br /&gt;
==== Linux 2.4 kernel config ====&lt;br /&gt;
Edit {{path|/etc/modules.conf}} and add the following lines&lt;br /&gt;
&lt;br /&gt;
 alias irda0 nsc-ircc&lt;br /&gt;
 options nsc-ircc dongle_id=0x09 io=0x2f8 irq=3 dma=3&lt;br /&gt;
 pre-install nsc-ircc setserial /dev/ttyS1 uart none port 0 irq 0&lt;br /&gt;
&lt;br /&gt;
==== Linux 2.6 kernel config ====&lt;br /&gt;
Edit {{path|/etc/modprobe.conf}} and add the following lines&lt;br /&gt;
&lt;br /&gt;
 alias irda0 nsc-ircc&lt;br /&gt;
 options nsc-ircc dongle_id=0x09 io=0x2f8 irq=3 dma=3&lt;br /&gt;
 install nsc-ircc /bin/setserial /dev/ttyS1 uart none port 0 irq 0; /sbin/modprobe --ignore-install nsc-ircc&lt;br /&gt;
&lt;br /&gt;
The install line is a work-around for the 8250 serial driver taking over the device, and may not be needed in certain distributions.&lt;br /&gt;
Another way to do this is to set this kernel config option:&lt;br /&gt;
&lt;br /&gt;
1. {{kernelconf|CONFIG_SERIAL_8250_RUNTIME_UARTS|(1)|Number of 8250/16550 serial ports to register at runtime|Serial drivers|Character devices|Device Drivers|}}&lt;br /&gt;
&lt;br /&gt;
2. {{kernelconf|CONFIG_SERIAL_8250_NR_UARTS|(4)|Maximum number of 8250/16550 serial ports|Serial drivers|Character devices|Device Drivers|}}&lt;br /&gt;
&lt;br /&gt;
This will prevent the 8250 driver from grabbing any other than the first serial port at boot time or when the module is loaded. You can still add more ports later for example from PC-Card modems, up to CONFIG_SERIAL_8250_NR_UARTS.&lt;br /&gt;
&lt;br /&gt;
==== {{Gentoo}} kernel config ====&lt;br /&gt;
Edit / Create {{path|/etc/modules.d/nsc-irrc}} and add the following lines&lt;br /&gt;
&lt;br /&gt;
 alias irda0 nsc-ircc&lt;br /&gt;
 options nsc-ircc dongle_id=0x09 io=0x2f8 irq=3 dma=3&lt;br /&gt;
&lt;br /&gt;
Edit {{path|/etc/modules.autoload.d/kernel-2.6}} and add the following lines&lt;br /&gt;
&lt;br /&gt;
 nsc-ircc&lt;br /&gt;
&lt;br /&gt;
If you have serial support build in the kernel, switch it to a module and add it after nsc-ircc to advoid io base and irq conflict. For kernel 2.4, same as 2.6 changing the path to modules.autoload.d/kernel-2.4. &lt;br /&gt;
&lt;br /&gt;
==== {{Debian}} Sarge/Etch kernel config ====&lt;br /&gt;
Install irda-utils and set it up for serial port emulation. Edit {{path|/etc/modprobe.d/irda-utils}} and add/change the following lines:&lt;br /&gt;
&lt;br /&gt;
 alias irda0 nsc-ircc&lt;br /&gt;
 options nsc-ircc dongle_id=0x09 io=0x2f8 irq=3 dma=3&lt;br /&gt;
&lt;br /&gt;
Edit / create {{path|/etc/modules.conf}} and add the following line before any references to 8250*, if any:&lt;br /&gt;
&lt;br /&gt;
 nsc-ircc&lt;br /&gt;
&lt;br /&gt;
Make sure that module-init-tools has a chance to iterate over {{path|/etc/modules.conf}} before udev does the initial pci hotplug (this is a problem at least in Debian Sarge, when using backported udev packages):&lt;br /&gt;
&lt;br /&gt;
 {{cmdroot|cp /etc/rcS.d/S20module-init-tools /etc/rcS.d/S03module-init-tools}}&lt;br /&gt;
&lt;br /&gt;
Note that at S03, module-init-tools cannot run depmod for you, so either do it manually before you reboot into a new kernel, or reboot twice to get it to work right.  This is also the reason for using cp instead of mv.&lt;br /&gt;
&lt;br /&gt;
If you have the regular serial port drivers as modules, that's it.  Otherwise, try adding the install line described in the Linux 2.6 kernel config section, above, or compile them as modules instead of built-in.&lt;br /&gt;
&lt;br /&gt;
== Known problems ==&lt;br /&gt;
* If the FIR mode is not activated, attempts to load the &amp;lt;tt&amp;gt;nsc-ircc&amp;lt;/tt&amp;gt; module will result in an error in syslog of &amp;quot;Wrong chip version ff&amp;quot;.&lt;br /&gt;
* After suspend the &amp;lt;tt&amp;gt;nsc-ircc&amp;lt;/tt&amp;gt; module needs to be manually reloaded&lt;br /&gt;
* If module reloading does not work after a suspend, try reactivating the IrDA port as well:&lt;br /&gt;
 rmmod nsc_ircc&lt;br /&gt;
 echo disable &amp;gt; /sys/devices/pnp0/00\:0d/resources&lt;br /&gt;
 echo activate &amp;gt; /sys/devices/pnp0/00\:0d/resources&lt;br /&gt;
 modprobe nsc_ircc&lt;br /&gt;
:The value &amp;lt;tt&amp;gt;pnp0/00\:0d&amp;lt;/tt&amp;gt; can vary - look for a id file containing IBM0071 or PNP0511, or for a resources file containing the appropriate irq/dma/io values, e.g., using {{cmdroot|grep 0x2f8 /sys/devices/pnp*/*/resources}} .&lt;br /&gt;
{{NOTE|The power management issues should be resolved starting with the 2.6.17-rc1 kernel.}}&lt;br /&gt;
&lt;br /&gt;
== Some other things you might want to do with IrDA ==&lt;br /&gt;
* add fast PPP support:&lt;br /&gt;
:{{cmdroot|modprobe irnet}}&lt;br /&gt;
* if needed, limit further the size of the transmit window&lt;br /&gt;
:{{cmdroot|echo 1 &amp;gt; /proc/sys/net/irda/max_tx_window}}&lt;br /&gt;
* set the connection speed to 4Mbit in FIR mode:&lt;br /&gt;
:{{cmdroot|echo 4000000 &amp;gt; /proc/sys/net/irda/max_baud_rate}}&lt;br /&gt;
&lt;br /&gt;
==LIRC and IrDA==&lt;br /&gt;
Usually, IrDA ports are not compatible with LIRC, but you may have luck using lirc_sir.&lt;br /&gt;
&lt;br /&gt;
If loading the &amp;lt;tt&amp;gt;lirc_sir&amp;lt;/tt&amp;gt; module shows something like the following in {{cmdroot|dmesg}} output, you are lucky and can use LIRC with the IrDA port to remote control your ThinkPad.&lt;br /&gt;
 lirc_sir: I/O port 0x02f8, IRQ 3.&lt;br /&gt;
 lirc_sir: Installed.&lt;br /&gt;
&lt;br /&gt;
== External Sources ==&lt;br /&gt;
*[http://irda.sourceforge.net/ Linux-IrDA Project] (External)&lt;br /&gt;
*[http://pcmcia-cs.sourceforge.net/ Linux PCMCIA Project] (External)&lt;br /&gt;
*[http://tpctl.sourceforge.net/ tpctl homepage] (External)&lt;br /&gt;
*[http://www.lirc.org/ Linux Infrared Remote Control] (External)&lt;/div&gt;</summary>
		<author><name>Masurium</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=How_to_control_fan_speed&amp;diff=23063</id>
		<title>How to control fan speed</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=How_to_control_fan_speed&amp;diff=23063"/>
		<updated>2006-07-04T04:39:06Z</updated>

		<summary type="html">&lt;p&gt;Masurium: /* Supported models */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page discusses methods for controlling the system fan.&lt;br /&gt;
&lt;br /&gt;
==For Linux==&lt;br /&gt;
===Using a patched kernel===&lt;br /&gt;
&lt;br /&gt;
The [[Patch for controlling fan speed]] provides a convenient interface via {{path|/proc/acpi/ibm/fan}}.&lt;br /&gt;
&lt;br /&gt;
Manual speed control can be done through the [[patch for controlling fan speed]]:&lt;br /&gt;
&lt;br /&gt;
 '''#cat /proc/acpi/ibm/fan'''&lt;br /&gt;
 status:         enabled&lt;br /&gt;
 level:          auto&lt;br /&gt;
 speed:          4219&lt;br /&gt;
 commands:       enable, disable, level &amp;lt;level&amp;gt;&lt;br /&gt;
                 (&amp;lt;level&amp;gt; is 0-7, auto or disengaged)&lt;br /&gt;
 &lt;br /&gt;
 '''#echo level 2 &amp;gt; /proc/acpi/ibm/fan'''&lt;br /&gt;
 &lt;br /&gt;
 '''#cat /proc/acpi/ibm/fan'''&lt;br /&gt;
 status:         enabled&lt;br /&gt;
 level:          2&lt;br /&gt;
 speed:          3142&lt;br /&gt;
 commands:       enable, disable, level &amp;lt;level&amp;gt;&lt;br /&gt;
                 (&amp;lt;level&amp;gt; is 0-7, auto or disengaged)&lt;br /&gt;
&lt;br /&gt;
===Using a stock kernel===&lt;br /&gt;
&lt;br /&gt;
If you have the [[ibm-acpi]] module loaded with &amp;lt;tt&amp;gt;experimental=1&amp;lt;/tt&amp;gt;, you can control the fan without patching the kernel by directly writing to the relevant embedded controller register using {{path|/proc/acpi/ibm/ecdump}}. &lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
{{cmdroot|echo 0x2F 0x00 &amp;gt; /proc/acpi/ibm/ecdump}} (fan off)&lt;br /&gt;
&lt;br /&gt;
{{cmdroot|echo 0x2F 0x02 &amp;gt; /proc/acpi/ibm/ecdump}} (low speed)&lt;br /&gt;
&lt;br /&gt;
{{cmdroot|echo 0x2F 0x04 &amp;gt; /proc/acpi/ibm/ecdump}} (medium speed)&lt;br /&gt;
&lt;br /&gt;
{{cmdroot|echo 0x2F 0x07 &amp;gt; /proc/acpi/ibm/ecdump}} (maximum speed)&lt;br /&gt;
&lt;br /&gt;
{{cmdroot|echo 0x2F 0x80 &amp;gt; /proc/acpi/ibm/ecdump}} (automatic - default)&lt;br /&gt;
&lt;br /&gt;
{{cmdroot|echo 0x2F 0x40 &amp;gt; /proc/acpi/ibm/ecdump}} (disengaged)&lt;br /&gt;
&lt;br /&gt;
Ssee the specifications below for the meaning of these modes.&lt;br /&gt;
&lt;br /&gt;
===On/off control using stock kernel===&lt;br /&gt;
&lt;br /&gt;
If you only wish to turn the fan on and off (with automatic control when it's on), you can use the following.&lt;br /&gt;
&lt;br /&gt;
When loading [[ibm-acpi]] v0.11 with experimental switch ({{cmdroot|1=modprobe ibm_acpi experimental=1}}), it is possible to read and write the status of fan:&lt;br /&gt;
&lt;br /&gt;
 '''#cat /proc/acpi/ibm/fan'''&lt;br /&gt;
 status:         enabled&lt;br /&gt;
 speed:          3580&lt;br /&gt;
 commands:       enable, disable&lt;br /&gt;
 &lt;br /&gt;
 '''#echo disable &amp;gt; /proc/acpi/ibm/fan'''&lt;br /&gt;
 &lt;br /&gt;
 '''cat /proc/acpi/ibm/fan'''&lt;br /&gt;
 status:         disabled&lt;br /&gt;
 speed:          0&lt;br /&gt;
 commands:       enable, disable&lt;br /&gt;
&lt;br /&gt;
When off, the fan will then '''never''' wake up. It is advised to use an automated control script to reduce the chance of hardware damage.&lt;br /&gt;
&lt;br /&gt;
===Automated control scripts===&lt;br /&gt;
&lt;br /&gt;
An [[ACPI fan control script#Variable speed control scripts|ACPI fan control script]] can be to override the firmware's fan algorithm with gentler, quieter version. It monitors the laptop's [[thermal sensors]] and sets the fan speed accordingly, according to customizable thresholds. For the default behavior, simply save the [[ACPI fan control script#Variable speed control scripts|script]] as {{path|tp-fancontrol}} and run&amp;lt;br /&amp;gt;&lt;br /&gt;
{{cmdroot|./tp-fancontrol}}&lt;br /&gt;
&lt;br /&gt;
==For Windows==&lt;br /&gt;
&lt;br /&gt;
Shimodax's ThinkPad fan control tool offers similar functionality (see [http://forum.thinkpads.com/viewtopic.php?t=17715 forum discussion] at thinkpads.com).  Source and binaries are available through the [http://sourceforge.net/projects/tp4xfancontrol &amp;quot;Tp4xFanControl&amp;quot;] project on SourceForge.&lt;br /&gt;
&lt;br /&gt;
==Hardware specs==&lt;br /&gt;
&lt;br /&gt;
The patch relies on the following hardware behavior, which was discovered experimentally by [[User:Thinker|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.&lt;br /&gt;
&lt;br /&gt;
ACPI DSDT register _SB.PCI0.LPC.EC.HFSP (8 bits, offset 0x2F in the &amp;lt;tt&amp;gt;EmbeddedController&amp;lt;/tt&amp;gt; address space, accessed through the standard EC interface at IO ports 0x62 and 0x66) is read/writable and has the following meaning:&lt;br /&gt;
 &lt;br /&gt;
 Bits   7 6 5 4 3 2 1 0&lt;br /&gt;
        ---------------&lt;br /&gt;
 Value  1 0 * * * * * *  - automatic&lt;br /&gt;
        * 1 * * * * * *  - disengaged&lt;br /&gt;
        0 0 N N N N N N  - manual (0..63; 0=disable fan, 1=min, ..., 7=max)&lt;br /&gt;
&lt;br /&gt;
In ''automatic'' mode, the embedded controller sets the fan speed automatically according to system temperatures and some unknown algorithm.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In ''disengaged'' mode, the embedded controller does not read the fan RPM (hence &amp;lt;tt&amp;gt;EmbeddedController&amp;lt;/tt&amp;gt; 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!).&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
{{HINT|Apparently the [[Problem with fan noise|pulsing fan noise]] experienced by some users can be cured by repeatedly running 2-4 seconds of manual control followed by 0.5-1 seconds of disengaged mode. The pulse occurs when the the embedded controller computes the fan speed and adjusts the fan voltage adaptively every few seconds (~4.8sec for the ThinkPad T43); the aforementioned mode switching doesn't give it a chance to do so. One of the [[ACPI fan control script#Variable speed control scripts|ACPI fan control scripts]] implements this solution.}}&lt;br /&gt;
&lt;br /&gt;
==Supported models==&lt;br /&gt;
&lt;br /&gt;
The above was successfully tested on the following models:&lt;br /&gt;
&lt;br /&gt;
* ThinkPad {{T43}}, {{T43p}} (fan levels RPM: 1-2 = ~3300, 3-5 = ~4100, 6-7 = ~4700; disengaged mode works)&lt;br /&gt;
* ThinkPad {{T42}}, {{T42p}} (fan levels RPM: 1-2 = ~2900, 3-5 = ~3700, 6-7 = ~4700)&lt;br /&gt;
* ThinkPad {{T41}}, {{T41p}} (fan levels RPM: 1-2 = ~2980, 3-5 = ~3500, 6-7 = ~4050; disengaged mode works at ~5100)&lt;br /&gt;
* ThinkPad {{T40}} (fan levels RPM: 1-2 = ~2950, 3-5 = ~3600, 6-7 = ~4050)&lt;br /&gt;
* ThinkPad {{T30}}&lt;br /&gt;
* ThinkPad {{T22}}&lt;br /&gt;
* ThinkPad {{T23}}&lt;br /&gt;
* ThinkPad {{R52}}&lt;br /&gt;
* ThinkPad {{R50}} (highest manual level is 3; disengage mode works and reaches much higher RPM)&lt;br /&gt;
* ThinkPad {{R50p}} (disengaged mode works at ~5100)&lt;br /&gt;
* ThinkPad {{R51}} (level 0 = off, level 1-2 = ~3160, level 3-5 = ~3380, level 6 = ~3760, disengaged &amp;gt; 5200, sounds afoul)&lt;br /&gt;
* ThinkPad {{X41T}}&lt;br /&gt;
* ThinkPad {{X31}}&lt;br /&gt;
* ThinkPad {{Z60t}} (fan levels RPM: 1-2 = ~1700, 3-5 = ~2800, 6-7 = ~3500)&lt;br /&gt;
* ThinkPad {{Z60m}}&lt;br /&gt;
* ThinkPad {{X60}}&lt;br /&gt;
Probably other models are supported too (please update this page if you confirm this).&lt;br /&gt;
&lt;br /&gt;
==Models using a different interface==&lt;br /&gt;
&lt;br /&gt;
The following models also work, use a different access method which supported (only) via the {{path|/proc/acpi/ibm/fan}} of [[ibm-acpi]]. No need for patching.&lt;br /&gt;
&lt;br /&gt;
* ThinkPad {{600E}}, {{600X}}, {{770E}}, {{770X}} (these use a different fan control interface)&lt;br /&gt;
&lt;br /&gt;
==Unsupported models==&lt;br /&gt;
&lt;br /&gt;
* ThinkPad {{560}} (these models don't have a fan)&lt;/div&gt;</summary>
		<author><name>Masurium</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=How_to_control_fan_speed&amp;diff=23062</id>
		<title>How to control fan speed</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=How_to_control_fan_speed&amp;diff=23062"/>
		<updated>2006-07-04T04:32:55Z</updated>

		<summary type="html">&lt;p&gt;Masurium: /* Supported models */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page discusses methods for controlling the system fan.&lt;br /&gt;
&lt;br /&gt;
==For Linux==&lt;br /&gt;
===Using a patched kernel===&lt;br /&gt;
&lt;br /&gt;
The [[Patch for controlling fan speed]] provides a convenient interface via {{path|/proc/acpi/ibm/fan}}.&lt;br /&gt;
&lt;br /&gt;
Manual speed control can be done through the [[patch for controlling fan speed]]:&lt;br /&gt;
&lt;br /&gt;
 '''#cat /proc/acpi/ibm/fan'''&lt;br /&gt;
 status:         enabled&lt;br /&gt;
 level:          auto&lt;br /&gt;
 speed:          4219&lt;br /&gt;
 commands:       enable, disable, level &amp;lt;level&amp;gt;&lt;br /&gt;
                 (&amp;lt;level&amp;gt; is 0-7, auto or disengaged)&lt;br /&gt;
 &lt;br /&gt;
 '''#echo level 2 &amp;gt; /proc/acpi/ibm/fan'''&lt;br /&gt;
 &lt;br /&gt;
 '''#cat /proc/acpi/ibm/fan'''&lt;br /&gt;
 status:         enabled&lt;br /&gt;
 level:          2&lt;br /&gt;
 speed:          3142&lt;br /&gt;
 commands:       enable, disable, level &amp;lt;level&amp;gt;&lt;br /&gt;
                 (&amp;lt;level&amp;gt; is 0-7, auto or disengaged)&lt;br /&gt;
&lt;br /&gt;
===Using a stock kernel===&lt;br /&gt;
&lt;br /&gt;
If you have the [[ibm-acpi]] module loaded with &amp;lt;tt&amp;gt;experimental=1&amp;lt;/tt&amp;gt;, you can control the fan without patching the kernel by directly writing to the relevant embedded controller register using {{path|/proc/acpi/ibm/ecdump}}. &lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
{{cmdroot|echo 0x2F 0x00 &amp;gt; /proc/acpi/ibm/ecdump}} (fan off)&lt;br /&gt;
&lt;br /&gt;
{{cmdroot|echo 0x2F 0x02 &amp;gt; /proc/acpi/ibm/ecdump}} (low speed)&lt;br /&gt;
&lt;br /&gt;
{{cmdroot|echo 0x2F 0x04 &amp;gt; /proc/acpi/ibm/ecdump}} (medium speed)&lt;br /&gt;
&lt;br /&gt;
{{cmdroot|echo 0x2F 0x07 &amp;gt; /proc/acpi/ibm/ecdump}} (maximum speed)&lt;br /&gt;
&lt;br /&gt;
{{cmdroot|echo 0x2F 0x80 &amp;gt; /proc/acpi/ibm/ecdump}} (automatic - default)&lt;br /&gt;
&lt;br /&gt;
{{cmdroot|echo 0x2F 0x40 &amp;gt; /proc/acpi/ibm/ecdump}} (disengaged)&lt;br /&gt;
&lt;br /&gt;
Ssee the specifications below for the meaning of these modes.&lt;br /&gt;
&lt;br /&gt;
===On/off control using stock kernel===&lt;br /&gt;
&lt;br /&gt;
If you only wish to turn the fan on and off (with automatic control when it's on), you can use the following.&lt;br /&gt;
&lt;br /&gt;
When loading [[ibm-acpi]] v0.11 with experimental switch ({{cmdroot|1=modprobe ibm_acpi experimental=1}}), it is possible to read and write the status of fan:&lt;br /&gt;
&lt;br /&gt;
 '''#cat /proc/acpi/ibm/fan'''&lt;br /&gt;
 status:         enabled&lt;br /&gt;
 speed:          3580&lt;br /&gt;
 commands:       enable, disable&lt;br /&gt;
 &lt;br /&gt;
 '''#echo disable &amp;gt; /proc/acpi/ibm/fan'''&lt;br /&gt;
 &lt;br /&gt;
 '''cat /proc/acpi/ibm/fan'''&lt;br /&gt;
 status:         disabled&lt;br /&gt;
 speed:          0&lt;br /&gt;
 commands:       enable, disable&lt;br /&gt;
&lt;br /&gt;
When off, the fan will then '''never''' wake up. It is advised to use an automated control script to reduce the chance of hardware damage.&lt;br /&gt;
&lt;br /&gt;
===Automated control scripts===&lt;br /&gt;
&lt;br /&gt;
An [[ACPI fan control script#Variable speed control scripts|ACPI fan control script]] can be to override the firmware's fan algorithm with gentler, quieter version. It monitors the laptop's [[thermal sensors]] and sets the fan speed accordingly, according to customizable thresholds. For the default behavior, simply save the [[ACPI fan control script#Variable speed control scripts|script]] as {{path|tp-fancontrol}} and run&amp;lt;br /&amp;gt;&lt;br /&gt;
{{cmdroot|./tp-fancontrol}}&lt;br /&gt;
&lt;br /&gt;
==For Windows==&lt;br /&gt;
&lt;br /&gt;
Shimodax's ThinkPad fan control tool offers similar functionality (see [http://forum.thinkpads.com/viewtopic.php?t=17715 forum discussion] at thinkpads.com).  Source and binaries are available through the [http://sourceforge.net/projects/tp4xfancontrol &amp;quot;Tp4xFanControl&amp;quot;] project on SourceForge.&lt;br /&gt;
&lt;br /&gt;
==Hardware specs==&lt;br /&gt;
&lt;br /&gt;
The patch relies on the following hardware behavior, which was discovered experimentally by [[User:Thinker|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.&lt;br /&gt;
&lt;br /&gt;
ACPI DSDT register _SB.PCI0.LPC.EC.HFSP (8 bits, offset 0x2F in the &amp;lt;tt&amp;gt;EmbeddedController&amp;lt;/tt&amp;gt; address space, accessed through the standard EC interface at IO ports 0x62 and 0x66) is read/writable and has the following meaning:&lt;br /&gt;
 &lt;br /&gt;
 Bits   7 6 5 4 3 2 1 0&lt;br /&gt;
        ---------------&lt;br /&gt;
 Value  1 0 * * * * * *  - automatic&lt;br /&gt;
        * 1 * * * * * *  - disengaged&lt;br /&gt;
        0 0 N N N N N N  - manual (0..63; 0=disable fan, 1=min, ..., 7=max)&lt;br /&gt;
&lt;br /&gt;
In ''automatic'' mode, the embedded controller sets the fan speed automatically according to system temperatures and some unknown algorithm.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In ''disengaged'' mode, the embedded controller does not read the fan RPM (hence &amp;lt;tt&amp;gt;EmbeddedController&amp;lt;/tt&amp;gt; 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!).&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
{{HINT|Apparently the [[Problem with fan noise|pulsing fan noise]] experienced by some users can be cured by repeatedly running 2-4 seconds of manual control followed by 0.5-1 seconds of disengaged mode. The pulse occurs when the the embedded controller computes the fan speed and adjusts the fan voltage adaptively every few seconds (~4.8sec for the ThinkPad T43); the aforementioned mode switching doesn't give it a chance to do so. One of the [[ACPI fan control script#Variable speed control scripts|ACPI fan control scripts]] implements this solution.}}&lt;br /&gt;
&lt;br /&gt;
==Supported models==&lt;br /&gt;
&lt;br /&gt;
The above was successfully tested on the following models:&lt;br /&gt;
&lt;br /&gt;
* ThinkPad {{T43}}, {{T43p}} (fan levels RPM: 1-2 = ~3300, 3-5 = ~4100, 6-7 = ~4700; disengaged mode works)&lt;br /&gt;
* ThinkPad {{T42}}, {{T42p}} (fan levels RPM: 1-2 = ~2900, 3-5 = ~3700, 6-7 = ~4700)&lt;br /&gt;
* ThinkPad {{T41}}, {{T41p}} (fan levels RPM: 1-2 = ~2980, 3-5 = ~3500, 6-7 = ~4050; disengaged mode works at ~5100)&lt;br /&gt;
* ThinkPad {{T40}} (fan levels RPM: 1-2 = ~2950, 3-5 = ~3600, 6-7 = ~4050)&lt;br /&gt;
* ThinkPad {{T22}}&lt;br /&gt;
* ThinkPad {{T23}}&lt;br /&gt;
* ThinkPad {{R52}}&lt;br /&gt;
* ThinkPad {{R50}} (highest manual level is 3; disengage mode works and reaches much higher RPM)&lt;br /&gt;
* ThinkPad {{R50p}} (disengaged mode works at ~5100)&lt;br /&gt;
* ThinkPad {{R51}} (level 0 = off, level 1-2 = ~3160, level 3-5 = ~3380, level 6 = ~3760, disengaged &amp;gt; 5200, sounds afoul)&lt;br /&gt;
* ThinkPad {{X41T}}&lt;br /&gt;
* ThinkPad {{X31}}&lt;br /&gt;
* ThinkPad {{Z60t}} (fan levels RPM: 1-2 = ~1700, 3-5 = ~2800, 6-7 = ~3500)&lt;br /&gt;
* ThinkPad {{Z60m}}&lt;br /&gt;
* ThinkPad {{X60}}&lt;br /&gt;
Probably other models are supported too (please update this page if you confirm this).&lt;br /&gt;
&lt;br /&gt;
* ThinkPad {{T30}}&lt;br /&gt;
&lt;br /&gt;
==Models using a different interface==&lt;br /&gt;
&lt;br /&gt;
The following models also work, use a different access method which supported (only) via the {{path|/proc/acpi/ibm/fan}} of [[ibm-acpi]]. No need for patching.&lt;br /&gt;
&lt;br /&gt;
* ThinkPad {{600E}}, {{600X}}, {{770E}}, {{770X}} (these use a different fan control interface)&lt;br /&gt;
&lt;br /&gt;
==Unsupported models==&lt;br /&gt;
&lt;br /&gt;
* ThinkPad {{560}} (these models don't have a fan)&lt;/div&gt;</summary>
		<author><name>Masurium</name></author>
		
	</entry>
</feed>