<?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=Pcanto</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=Pcanto"/>
	<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/wiki/Special:Contributions/Pcanto"/>
	<updated>2026-05-11T04:14:34Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.12</generator>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Patch_for_controlling_fan_speed&amp;diff=12083</id>
		<title>Patch for controlling fan speed</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Patch_for_controlling_fan_speed&amp;diff=12083"/>
		<updated>2005-11-03T22:36:04Z</updated>

		<summary type="html">&lt;p&gt;Pcanto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
This patch extends the [[ibm-acpi]] Linux kernel module to control fan speed. It can be used to reduce [[Problem with fan noise|fan noise]] (both speed and pulsing) and to decrease fan power consumption.&lt;br /&gt;
&lt;br /&gt;
When this patch is applied and the &amp;lt;tt&amp;gt;ibm-acpi&amp;lt;/tt&amp;gt; module is loaded with the &amp;lt;tt&amp;gt;experimental=1&amp;lt;/tt&amp;gt; module parameter, the following new capabilities are added to {{path|/proc/acpi/ibm/fan}}:&lt;br /&gt;
* {{cmdroot|echo level LEVEL &amp;gt; /proc/acpi/ibm/fan}} sets a fan speed level between 0 and 7, where &amp;lt;tt&amp;gt;LEVEL&amp;lt;/TT&amp;gt;=0 means fan off and &amp;lt;tt&amp;gt;LEVEL&amp;lt;/tt&amp;gt;=7 is the fastest speed.&lt;br /&gt;
* {{cmdroot|echo level auto &amp;gt; /proc/acpi/ibm/fan}} tells the embedded controller to set the fan speed automatically according to system temperatures (this is the default).&lt;br /&gt;
* {{cmdroot|echo level disengaged &amp;gt; /proc/acpi/ibm/fan}} tells the embedded controller to disengage fan speed control (see specs below).&lt;br /&gt;
* {{cmdroot|cat /proc/acpi/ibm/fan}} shows the current fan level (in addition to the fan speed in RPM).&lt;br /&gt;
&lt;br /&gt;
For example:&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;
This patch is best used with an [[ACPI fan control script#Variable speed control scripts|ACPI fan control script]] that monitors system temperature and sets the fan speed accordingly.&lt;br /&gt;
&lt;br /&gt;
{{WARN|Overriding the system's automatic temperature control may cause permanent hardware damage. Even when using temperature monitoring software, it is not clear whether the software can access all temperature sensor accessible to the embedded controller and understand them correctly. Moreover, this patch relies on an undocumented hardware interface, and may thus have arbitrary effects (especially on models it wasn't tested on).}}&lt;br /&gt;
&lt;br /&gt;
==Models on which this patch works==&lt;br /&gt;
&lt;br /&gt;
* ThinkPad {{T41}}&amp;lt;br /&amp;gt;Speed levels in RPM: 1-2 = ~2980, 3-5 = ~3500, 6-7 = ~4050; disengaged mode works at ~5100)&lt;br /&gt;
* ThinkPad {{T43}}, {{T43p}}&amp;lt;br /&amp;gt;Speed levels in RPM: 1-2 = ~3300, 3-5 = ~4100, 6-7 = ~4700; disengaged mode works)&lt;br /&gt;
&lt;br /&gt;
Probably many other models.&lt;br /&gt;
&lt;br /&gt;
{{NOTE|If you try this patch on other models, please update this page with your results.}}&lt;br /&gt;
&lt;br /&gt;
==Models on which this patch doesn't work==&lt;br /&gt;
&lt;br /&gt;
* ThinkPad {{560}}, {{600E}}, {{600X}}, {{770E}}, {{770X}} (these use a different fan control interface)&lt;br /&gt;
&lt;br /&gt;
==The patch==&lt;br /&gt;
&lt;br /&gt;
===for ibm-acpi 0.11===&lt;br /&gt;
&lt;br /&gt;
This also includes a minor fix (rename of &amp;lt;tt&amp;gt;device_add&amp;lt;/tt&amp;gt;) to make [[ibm-acpi]] 0.11 compile on kernel 2.6.13.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--- ibm-acpi-0.11-orig/ibm_acpi.c	2005-03-17 12:06:16.000000000 +0200&lt;br /&gt;
+++ ibm-acpi-0.11/ibm_acpi.c	2005-10-26 06:21:57.000000000 +0200&lt;br /&gt;
@@ -1488,11 +1488,18 @@ static int fan_read(char *p)&lt;br /&gt;
 	} else {&lt;br /&gt;
 		/* all except 570, 600e/x, 770e, 770x */&lt;br /&gt;
 		if (!acpi_ec_read(fan_status_offset, &amp;amp;status))&lt;br /&gt;
 			len += sprintf(p + len, &amp;quot;status:\t\tunreadable\n&amp;quot;);&lt;br /&gt;
-		else&lt;br /&gt;
+		else {&lt;br /&gt;
 			len += sprintf(p + len, &amp;quot;status:\t\t%s\n&amp;quot;,&lt;br /&gt;
-				       enabled(status, 7));&lt;br /&gt;
+			              status ? &amp;quot;enabled&amp;quot; : &amp;quot;disabled&amp;quot;);&lt;br /&gt;
+			if (status &amp;amp; 0x40)&lt;br /&gt;
+				len += sprintf(p + len, &amp;quot;level:\t\tdisengaged\n&amp;quot;);&lt;br /&gt;
+			else if (status &amp;amp; 0x80)&lt;br /&gt;
+				len += sprintf(p + len, &amp;quot;level:\t\tauto\n&amp;quot;);&lt;br /&gt;
+			else&lt;br /&gt;
+				len += sprintf(p + len, &amp;quot;level:\t\t%d\n&amp;quot;, status);&lt;br /&gt;
+		}&lt;br /&gt;
 &lt;br /&gt;
 		if (!acpi_ec_read(fan_rpm_offset,     &amp;amp;lo) ||&lt;br /&gt;
 		    !acpi_ec_read(fan_rpm_offset + 1, &amp;amp;hi))&lt;br /&gt;
 			len += sprintf(p + len, &amp;quot;speed:\t\tunreadable\n&amp;quot;);&lt;br /&gt;
@@ -1506,9 +1513,12 @@ static int fan_read(char *p)&lt;br /&gt;
 		len += sprintf(p + len, &amp;quot;commands:\tlevel &amp;lt;level&amp;gt;&amp;quot;&lt;br /&gt;
 			       &amp;quot; (&amp;lt;level&amp;gt; is 0-7)\n&amp;quot;);&lt;br /&gt;
 	if (!gfan_handle)&lt;br /&gt;
 		/* all except 570, 600e/x, 770e, 770x */&lt;br /&gt;
-		len += sprintf(p + len, &amp;quot;commands:\tenable, disable\n&amp;quot;);&lt;br /&gt;
+		len += sprintf(p + len, &lt;br /&gt;
+		              &amp;quot;commands:\tenable, disable, level &amp;lt;level&amp;gt;\n&amp;quot;&lt;br /&gt;
+		              &amp;quot;         \t(&amp;lt;level&amp;gt; is 0-7, auto&amp;quot;&lt;br /&gt;
+		              &amp;quot;or disengaged)\n&amp;quot;);&lt;br /&gt;
 	if (fans_handle)&lt;br /&gt;
 		/* X31, X40 */&lt;br /&gt;
 		len += sprintf(p + len, &amp;quot;commands:\tspeed &amp;lt;speed&amp;gt;&amp;quot;&lt;br /&gt;
 			       &amp;quot; (&amp;lt;speed&amp;gt; is 0-65535)\n&amp;quot;);&lt;br /&gt;
@@ -1528,17 +1538,29 @@ static int fan_write(char *buf)&lt;br /&gt;
 			/* 570, 770x-JL */&lt;br /&gt;
 			if (!acpi_evalf(sfan_handle, NULL, NULL, &amp;quot;vd&amp;quot;, level))&lt;br /&gt;
 				return -EIO;&lt;br /&gt;
 		} else if (!gfan_handle &amp;amp;&amp;amp;&lt;br /&gt;
-			   strlencmp(cmd, &amp;quot;enable&amp;quot;) == 0) {&lt;br /&gt;
+			   ( (strlencmp(cmd, &amp;quot;enable&amp;quot;) == 0) ||&lt;br /&gt;
+			     (strlencmp(cmd, &amp;quot;level auto&amp;quot;) == 0) ) ) {&lt;br /&gt;
 			/* all except 570, 600e/x, 770e, 770x */&lt;br /&gt;
 			if (!acpi_ec_write(fan_status_offset, 0x80))&lt;br /&gt;
 				return -EIO;&lt;br /&gt;
 		} else if (!gfan_handle &amp;amp;&amp;amp;&lt;br /&gt;
 			   strlencmp(cmd, &amp;quot;disable&amp;quot;) == 0) {&lt;br /&gt;
 			/* all except 570, 600e/x, 770e, 770x */&lt;br /&gt;
 			if (!acpi_ec_write(fan_status_offset, 0x00))&lt;br /&gt;
 				return -EIO;&lt;br /&gt;
+		} else if (!gfan_handle &amp;amp;&amp;amp;&lt;br /&gt;
+			   strlencmp(cmd, &amp;quot;level disengaged&amp;quot;) == 0) {&lt;br /&gt;
+			/* all except 570, 600e/x, 770e, 770x */&lt;br /&gt;
+			if (!acpi_ec_write(fan_status_offset, 0x40))&lt;br /&gt;
+				return -EIO;&lt;br /&gt;
+		} else if (!gfan_handle &amp;amp;&amp;amp;&lt;br /&gt;
+		    sscanf(cmd, &amp;quot;level %d&amp;quot;, &amp;amp;level) == 1 &amp;amp;&amp;amp;&lt;br /&gt;
+		    level &amp;gt;=0 &amp;amp;&amp;amp; level &amp;lt;= 7) {&lt;br /&gt;
+			/* all except 570, 600e/x, 770e, 770x */&lt;br /&gt;
+			if (!acpi_ec_write(fan_status_offset, level))&lt;br /&gt;
+				return -EIO;&lt;br /&gt;
 		} else if (fans_handle &amp;amp;&amp;amp;&lt;br /&gt;
 		    sscanf(cmd, &amp;quot;speed %d&amp;quot;, &amp;amp;speed) == 1 &amp;amp;&amp;amp;&lt;br /&gt;
 		    speed &amp;gt;= 0 &amp;amp;&amp;amp; speed &amp;lt;= 65535) {&lt;br /&gt;
 			/* X31, X40 */&lt;br /&gt;
@@ -1751,9 +1773,9 @@ static int __init setup_notify(struct ib&lt;br /&gt;
 &lt;br /&gt;
 	return 0;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
-static int device_add(struct acpi_device *device)&lt;br /&gt;
+static int ibmacpi_device_add(struct acpi_device *device)&lt;br /&gt;
 {&lt;br /&gt;
 	return 0;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
@@ -1769,9 +1791,9 @@ static int __init register_driver(struct&lt;br /&gt;
 &lt;br /&gt;
 	memset(ibm-&amp;gt;driver, 0, sizeof(struct acpi_driver));&lt;br /&gt;
 	sprintf(ibm-&amp;gt;driver-&amp;gt;name, &amp;quot;%s/%s&amp;quot;, IBM_NAME, ibm-&amp;gt;name);&lt;br /&gt;
 	ibm-&amp;gt;driver-&amp;gt;ids = ibm-&amp;gt;hid;&lt;br /&gt;
-	ibm-&amp;gt;driver-&amp;gt;ops.add = &amp;amp;device_add;&lt;br /&gt;
+	ibm-&amp;gt;driver-&amp;gt;ops.add = &amp;amp;ibmacpi_device_add;&lt;br /&gt;
 &lt;br /&gt;
 	ret = acpi_bus_register_driver(ibm-&amp;gt;driver);&lt;br /&gt;
 	if (ret &amp;lt; 0) {&lt;br /&gt;
 		printk(IBM_ERR &amp;quot;acpi_bus_register_driver(%s) failed: %d\n&amp;quot;,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The [[User:Thinker|author]] disclaims all warranty for this patch, and releases it to the public domain (meaning you may use and further distribute it under any terms you wish, including incorporating it into other software).&lt;br /&gt;
&lt;br /&gt;
===for ibm-acpi 0.12a as found in kernel 2.6.14===&lt;br /&gt;
&lt;br /&gt;
A slightly modified version which also keeps the lines in the format expected by the gkrellm plugin.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--- drivers/acpi/ibm_acpi.c.orig        2005-11-01 19:47:44.262270250 +0100&lt;br /&gt;
+++ drivers/acpi/ibm_acpi.c     2005-11-01 20:16:16.081252250 +0100&lt;br /&gt;
@@ -1465,6 +1465,7 @@ static int fan_read(char *p)&lt;br /&gt;
 {&lt;br /&gt;
        int len = 0;&lt;br /&gt;
        int s;&lt;br /&gt;
+       char status_read = 0;&lt;br /&gt;
        u8 lo, hi, status;&lt;br /&gt;
&lt;br /&gt;
        if (gfan_handle) {&lt;br /&gt;
@@ -1477,9 +1478,11 @@ static int fan_read(char *p)&lt;br /&gt;
                /* all except 570, 600e/x, 770e, 770x */&lt;br /&gt;
                if (!acpi_ec_read(fan_status_offset, &amp;amp;status))&lt;br /&gt;
                        len += sprintf(p + len, &amp;quot;status:\t\tunreadable\n&amp;quot;);&lt;br /&gt;
-               else&lt;br /&gt;
+               else {&lt;br /&gt;
                        len += sprintf(p + len, &amp;quot;status:\t\t%s\n&amp;quot;,&lt;br /&gt;
-                                      enabled(status, 7));&lt;br /&gt;
+                                     status ? &amp;quot;enabled&amp;quot; : &amp;quot;disabled&amp;quot;);&lt;br /&gt;
+                       status_read = 1;&lt;br /&gt;
+               }&lt;br /&gt;
&lt;br /&gt;
                if (!acpi_ec_read(fan_rpm_offset, &amp;amp;lo) ||&lt;br /&gt;
                    !acpi_ec_read(fan_rpm_offset + 1, &amp;amp;hi))&lt;br /&gt;
@@ -1487,6 +1490,14 @@ static int fan_read(char *p)&lt;br /&gt;
                else&lt;br /&gt;
                        len += sprintf(p + len, &amp;quot;speed:\t\t%d\n&amp;quot;,&lt;br /&gt;
                                       (hi &amp;lt;&amp;lt; 8) + lo);&lt;br /&gt;
+               if (status_read) {&lt;br /&gt;
+                       if (status &amp;amp; 0x40)&lt;br /&gt;
+                               len += sprintf(p + len, &amp;quot;level:\t\tdisengaged\n&amp;quot;);&lt;br /&gt;
+                       else if (status &amp;amp; 0x80)&lt;br /&gt;
+                               len += sprintf(p + len, &amp;quot;level:\t\tauto\n&amp;quot;);&lt;br /&gt;
+                       else&lt;br /&gt;
+                               len += sprintf(p + len, &amp;quot;level:\t\t%d\n&amp;quot;, status);&lt;br /&gt;
+               }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if (sfan_handle)&lt;br /&gt;
@@ -1495,7 +1506,10 @@ static int fan_read(char *p)&lt;br /&gt;
                               &amp;quot; (&amp;lt;level&amp;gt; is 0-7)\n&amp;quot;);&lt;br /&gt;
        if (!gfan_handle)&lt;br /&gt;
                /* all except 570, 600e/x, 770e, 770x */&lt;br /&gt;
-               len += sprintf(p + len, &amp;quot;commands:\tenable, disable\n&amp;quot;);&lt;br /&gt;
+               len += sprintf(p + len, &lt;br /&gt;
+                             &amp;quot;commands:\tenable, disable, level &amp;lt;level&amp;gt;\n&amp;quot;&lt;br /&gt;
+                             &amp;quot;         \t(&amp;lt;level&amp;gt; is 0-7, auto &amp;quot;&lt;br /&gt;
+                             &amp;quot;or disengaged)\n&amp;quot;);&lt;br /&gt;
        if (fans_handle)&lt;br /&gt;
                /* X31, X40 */&lt;br /&gt;
                len += sprintf(p + len, &amp;quot;commands:\tspeed &amp;lt;speed&amp;gt;&amp;quot;&lt;br /&gt;
@@ -1516,7 +1530,8 @@ static int fan_write(char *buf)&lt;br /&gt;
                        /* 570, 770x-JL */&lt;br /&gt;
                        if (!acpi_evalf(sfan_handle, NULL, NULL, &amp;quot;vd&amp;quot;, level))&lt;br /&gt;
                                return -EIO;&lt;br /&gt;
-               } else if (!gfan_handle &amp;amp;&amp;amp; strlencmp(cmd, &amp;quot;enable&amp;quot;) == 0) {&lt;br /&gt;
+               } else if (!gfan_handle &amp;amp;&amp;amp; ( (strlencmp(cmd, &amp;quot;enable&amp;quot;) == 0) || &lt;br /&gt;
+                               (strlencmp(cmd, &amp;quot;level auto&amp;quot;) == 0) ) ) {&lt;br /&gt;
                        /* all except 570, 600e/x, 770e, 770x */&lt;br /&gt;
                        if (!acpi_ec_write(fan_status_offset, 0x80))&lt;br /&gt;
                                return -EIO;&lt;br /&gt;
@@ -1524,6 +1539,17 @@ static int fan_write(char *buf)&lt;br /&gt;
                        /* all except 570, 600e/x, 770e, 770x */&lt;br /&gt;
                        if (!acpi_ec_write(fan_status_offset, 0x00))&lt;br /&gt;
                                return -EIO;&lt;br /&gt;
+               } else if (!gfan_handle &amp;amp;&amp;amp;&lt;br /&gt;
+                          strlencmp(cmd, &amp;quot;level disengaged&amp;quot;) == 0) {&lt;br /&gt;
+                       /* all except 570, 600e/x, 770e, 770x */&lt;br /&gt;
+                       if (!acpi_ec_write(fan_status_offset, 0x40))&lt;br /&gt;
+                               return -EIO;&lt;br /&gt;
+               } else if (!gfan_handle &amp;amp;&amp;amp;&lt;br /&gt;
+                   sscanf(cmd, &amp;quot;level %d&amp;quot;, &amp;amp;level) == 1 &amp;amp;&amp;amp;&lt;br /&gt;
+                   level &amp;gt;=0 &amp;amp;&amp;amp; level &amp;lt;= 7) {&lt;br /&gt;
+                       /* all except 570, 600e/x, 770e, 770x */&lt;br /&gt;
+                       if (!acpi_ec_write(fan_status_offset, level))&lt;br /&gt;
+                               return -EIO;&lt;br /&gt;
                } else if (fans_handle &amp;amp;&amp;amp;&lt;br /&gt;
                           sscanf(cmd, &amp;quot;speed %d&amp;quot;, &amp;amp;speed) == 1 &amp;amp;&amp;amp;&lt;br /&gt;
                           speed &amp;gt;= 0 &amp;amp;&amp;amp; speed &amp;lt;= 65535) {&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The [[User:spiney|author]] disclaims all warranty for this patch, and releases it to the public domain (meaning you may use and further distribute it under any terms you wish, including incorporating it into other software).&lt;br /&gt;
&lt;br /&gt;
==Controlling the fan without this patch==&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 0x04 &amp;gt; /proc/acpi/ibm/ecdump}}&lt;br /&gt;
&lt;br /&gt;
will set the fan to manual mode 4 (see the specifications below).&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 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) &lt;br /&gt;
is read/writable and has the following meaning:&lt;br /&gt;
 &lt;br /&gt;
  7 6 5 4 3 2 1 0&lt;br /&gt;
  | | \_________/&lt;br /&gt;
  | |      |&lt;br /&gt;
  | |      +--------- manual fan speed level (0=disable, 1=min, ..., 7=max)&lt;br /&gt;
  | +---------------- disengaged (0=normal, 1=disengaged, overrides all)&lt;br /&gt;
  +------------------ automatic fan speed control (0=manual, 1=automatic, overrides manual)&lt;br /&gt;
&lt;br /&gt;
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;
When bit 7 is on, the embedded controller sets the fan speed automatically according to system temperaturesand some unknown algorithm. This overrides manual control.&lt;br /&gt;
&lt;br /&gt;
When bit 6 is on, 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. This overrides manual and automatic control. 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;
{{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;
[[Category:Patches]]&lt;/div&gt;</summary>
		<author><name>Pcanto</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Problem_with_high_power_drain_in_ACPI_sleep&amp;diff=5751</id>
		<title>Problem with high power drain in ACPI sleep</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Problem_with_high_power_drain_in_ACPI_sleep&amp;diff=5751"/>
		<updated>2005-06-15T15:57:12Z</updated>

		<summary type="html">&lt;p&gt;Pcanto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Information about the problem of too high power drain in ACPI sleep mode.&lt;br /&gt;
&lt;br /&gt;
==Problem description==&lt;br /&gt;
Several people realised that their ThinkPads eat up too much power while suspended to ram via ACPI. Compared to APM suspend to ram the power drain is experienced to be about 10 times as high, 2-5 Watts. This empties the battery within one or two days.&lt;br /&gt;
&lt;br /&gt;
==Affected Models==&lt;br /&gt;
*Different symptoms have been reported for different models. In some models the origin of the power drain is obvious ([[Problem with LCD backlight remaining on during ACPI sleep|backlight on during suspend]]), in other models there is no obvious reason.&lt;br /&gt;
*On some models/configurations the higher power drain couldn't even be realized or was at least significantly lower.&lt;br /&gt;
*The T4x thinkpad series (T40, T40p, T41, T41p, T42, T42p, T43, T43p) suspends to ram just fine, and there are no components that are obviously left powered up. The [[UltraBay]] and network light is on, but that is the same under windows (but under APM sleep to RAM those lights are OFF).&lt;br /&gt;
*One thing to keep in mind, though, is that some models only suffer this problem with certain software.  For example, my T40 (2374-94U) has the high power drain issue with the stock Fedora Core 3. If I use one of the more recent kernels from [http://www.sas.upenn.edu/~vbraun/computing/T41/kernel.html Volker Braun's T-41 site], everything (suspend-to-RAM, suspend-to-disk) works just fine and my battery life seems much better than APM. In other words, just because you see this problem with your ThinkPad with your current software does not mean that your ThinkPad will doomed to always be affected. There are similar solutions for Debian-based systems too.&lt;br /&gt;
&lt;br /&gt;
The following table gives an overview of the models suffering from the mysterious power drain. To find out about your model, you may use the following [[ACPI sleep power drain test script | script]]. It creates a file &amp;lt;tt&amp;gt;/var/log/battery.log&amp;lt;/tt&amp;gt; which will tell you if you are affected or not.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;vertical-align:top;background-color:#ffcfbc;&amp;quot; | affected models&lt;br /&gt;
! style=&amp;quot;vertical-align:top;background-color:#cfefcf;&amp;quot; | unaffected models &lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align:top;background-color:#fff0e0;&amp;quot; |&lt;br /&gt;
* {{R40}}&lt;br /&gt;
** 2722-5MG&lt;br /&gt;
** 2722-B3G&lt;br /&gt;
** 2897-GWU&lt;br /&gt;
* {{R50}}&lt;br /&gt;
** 1829-7RG&lt;br /&gt;
** 1829-6DM&lt;br /&gt;
** 1836-3SU&lt;br /&gt;
* {{R51}}&lt;br /&gt;
** 1829-9MG&lt;br /&gt;
** 1829-EHG&lt;br /&gt;
** 1830-DG4&lt;br /&gt;
** 1836-Q6U&lt;br /&gt;
* {{T23}}&lt;br /&gt;
**2647-???&lt;br /&gt;
* {{T30}}&lt;br /&gt;
** 2366-81A&lt;br /&gt;
** 2366-97U&lt;br /&gt;
*{{T40}}&lt;br /&gt;
**2373-MU3 &lt;br /&gt;
**2373-82U&lt;br /&gt;
**2373-92U&lt;br /&gt;
**2373-22G&lt;br /&gt;
**2373-19G&lt;br /&gt;
**2373-A1U&lt;br /&gt;
*{{T40p}}&lt;br /&gt;
**2373-G1U &lt;br /&gt;
**2373-G3U&lt;br /&gt;
**2373-G3G&lt;br /&gt;
**2373-G1G&lt;br /&gt;
**2373-G5G&lt;br /&gt;
* {{T41}}&lt;br /&gt;
**2379-DJU&lt;br /&gt;
**2373-9HU&lt;br /&gt;
**2373-4FG&lt;br /&gt;
**2373-4PG&lt;br /&gt;
**2373-1FG&lt;br /&gt;
**2373-2FG&lt;br /&gt;
**2373-6U4&lt;br /&gt;
**2373-7JU&lt;br /&gt;
**2373-CY0&lt;br /&gt;
* {{T41p}}&lt;br /&gt;
**2373-9FU&lt;br /&gt;
* {{T42}}&lt;br /&gt;
**2378-DUU&lt;br /&gt;
**2373-FWG&lt;br /&gt;
**[[2373-6ZG]]&lt;br /&gt;
* {{X21}}&lt;br /&gt;
| style=&amp;quot;vertical-align:top;background-color:#e9f9e9;&amp;quot; |&lt;br /&gt;
*[[:Category:R50p | R50p]]&lt;br /&gt;
*[[:Category:T41 | T41]]&lt;br /&gt;
**2373-GEU&lt;br /&gt;
*[[:Category:T41p | T41p]]&lt;br /&gt;
**2373-GKG&lt;br /&gt;
**2373-GGG&lt;br /&gt;
**[[2373-GHG]]&lt;br /&gt;
*[[:Category:T42p | T42p]]&lt;br /&gt;
**[[2373-HTG]]&lt;br /&gt;
**[[2373-W6M]]&lt;br /&gt;
**[[2373-GTG]]&lt;br /&gt;
**[[2373-GXG]]&lt;br /&gt;
**2373-KXM&lt;br /&gt;
*[[:Category:T42 | T42]]&lt;br /&gt;
**[[2378-FVU]]&lt;br /&gt;
**[[2373-WBZ]]&lt;br /&gt;
*[[:Category:X40 | X40]]&lt;br /&gt;
**2371&lt;br /&gt;
*[[:Category:A22m | A22m]]&lt;br /&gt;
**2628&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Affected Operating Systems==&lt;br /&gt;
&lt;br /&gt;
*Linux, all flavours.&lt;br /&gt;
*Windows, for some models as well (only when using non-IBM drivers).&lt;br /&gt;
*FreeBSD (on the A22M)&lt;br /&gt;
&lt;br /&gt;
==Status==&lt;br /&gt;
*The cause of the problem is not really clear, yet.&lt;br /&gt;
&lt;br /&gt;
*A faulty DSDT might be responsible for the phenomenon. The thinkpad T4x DSDT has a few small bugs, none of which should cause the extra power drain. (Interesting to note: The DSDT from BIOS 3.13 (Nov 04) for the T42p compiles without bugs.)&lt;br /&gt;
&lt;br /&gt;
*There is a interesting discussion taking place in the [http://bugme.osdl.org/show_bug.cgi?id=3022 OSDL Bugzilla].&lt;br /&gt;
&lt;br /&gt;
Update: it seems that the most significant difference can be made by properly turning off the video chip.&lt;br /&gt;
&lt;br /&gt;
==Solutions==&lt;br /&gt;
===For Thinkpads with Radeon graphic driver===&lt;br /&gt;
A proposed solution is to remove the CONFIG_PPC_PMAC condition for enabling D2 sleep in drivers/video/aty/radeon_pm.c as discussed in [http://bugme.osdl.org/show_bug.cgi?id=3022 kernel bug 3022]. There you can also find patches doing this. The patches divide into unconditional ones like [http://carrot.hep.upenn.edu/~vbraun/kernel-T4x/test/patch-2.6.11-rc2-radeonfb-D2.patch.bz2 this one for 2.6.11-rc2] and conditional ones. The conditional ones only do D2 on models where it has been reported to work, the unconditional ones force D2 sleep on every model and you might experience hangs on resume with those.&lt;br /&gt;
&lt;br /&gt;
For [[:Category:Fedora Core | Fedora Core]] there's are precompiled patched kernels (2.6.11-rc2 based) available:&lt;br /&gt;
*[http://carrot.hep.upenn.edu/~vbraun/kernel-T4x/test/kernel-DANGEROUS-T4x-2.6.11-8.i386.rpm kernel with unconditional patch applied]&lt;br /&gt;
*[http://carrot.hep.upenn.edu/~vbraun/kernel-T4x/test/kernel-T4x-2.6.11-8.i386.rpm kernel with conditional patch applied].&lt;br /&gt;
&lt;br /&gt;
If you try, please send the result (hang yes/no, battery drain yes/no) with the precise model number (for example, I have a IBM thinkpad T41 2379-DJU) to &amp;lt;tt&amp;gt;vbraun at physics dot upenn dot edu&amp;lt;/tt&amp;gt;, it would be nice if your subject line would include &amp;quot;RADEONFB:&amp;quot; to make sure that I do not miss any emails.&lt;br /&gt;
&lt;br /&gt;
{{WARN|This solution enables doing suspend-to-D2 on non-PPC-machines, which is not tested at all and supposed to be the wrong thing to do! Be careful and have a look at the discussion for kernel bug 3022 (see above) before applying the patch.}}&lt;br /&gt;
&lt;br /&gt;
===for other models===&lt;br /&gt;
Nothing yet.&lt;/div&gt;</summary>
		<author><name>Pcanto</name></author>
		
	</entry>
</feed>