<?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=WbnSts</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=WbnSts"/>
	<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/wiki/Special:Contributions/WbnSts"/>
	<updated>2026-05-05T09:53:09Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.12</generator>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Code/tp-fancontrol&amp;diff=29290</id>
		<title>Code/tp-fancontrol</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Code/tp-fancontrol&amp;diff=29290"/>
		<updated>2007-04-13T02:44:26Z</updated>

		<summary type="html">&lt;p&gt;WbnSts: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# tp-fancontrol 0.3.02 (http://thinkwiki.org/wiki/ACPI_fan_control_script)&lt;br /&gt;
# Provided under the GNU General Public License version 2 or later or&lt;br /&gt;
# the GNU Free Documentation License version 1.2 or later, at your option.&lt;br /&gt;
# See http://www.gnu.org/copyleft/gpl.html for the Warranty Disclaimer.&lt;br /&gt;
&lt;br /&gt;
# This script dynamically controls fan speed on some ThinkPad models&lt;br /&gt;
# according to user-defined temperature thresholds.  It implements its&lt;br /&gt;
# own decision algorithm, overriding the ThinkPad embedded&lt;br /&gt;
# controller. It also implements a workaround for the fan noise pulse&lt;br /&gt;
# experienced every few seconds on some ThinkPads.&lt;br /&gt;
#&lt;br /&gt;
# Run 'tp-fancontrol --help' for options.&lt;br /&gt;
#&lt;br /&gt;
# For optimal fan behavior during suspend and resume, invoke &lt;br /&gt;
# &amp;quot;tp-fancontrol -u&amp;quot; during the suspend process.&lt;br /&gt;
# &lt;br /&gt;
# WARNING: This script relies on undocumented hardware features and&lt;br /&gt;
# overrides nominal hardware behavior. It may thus cause arbitrary&lt;br /&gt;
# damage to your laptop or data. Watch your temperatures!&lt;br /&gt;
#&lt;br /&gt;
# WARNING: The list of temperature ranges used below is much more liberal&lt;br /&gt;
# than the rules used by the embedded controller firmware, and is&lt;br /&gt;
# derived mostly from anecdotal evidence, hunches and wishful thinking.&lt;br /&gt;
# It is also model-specific (see http://thinkwiki.org/wiki/Thermal_sensors).&lt;br /&gt;
&lt;br /&gt;
# Temperature ranges, per sensor:&lt;br /&gt;
# (min temperature: when to step up from 0-th fan level,&lt;br /&gt;
#  max temperature: when to step up to maximum fan level)&lt;br /&gt;
THRESHOLDS=( #  Sensor     ThinkPad model&lt;br /&gt;
             #             R51     T41/2  Z60t   T43-26xx&lt;br /&gt;
# min  max   #  ---------- ------- -----  -----  ---------------------------&lt;br /&gt;
  50   70    #  EC 0x78    CPU     CPU    ?      CPU&lt;br /&gt;
  47   60    #  EC 0x79    miniPCI ?      ?      Between CPU and PCMCIA slot&lt;br /&gt;
  43   55    #  EC 0x7A    HDD     ?      ?      PCMCIA slot&lt;br /&gt;
  49   68    #  EC 0x7B    GPU     GPU    ?      GPU&lt;br /&gt;
  40   50    #  EC 0x7C    BAT     BAT    BAT    Sys BAT (front left of battery)&lt;br /&gt;
  40   50    #  EC 0x7D    n/a     n/a    n/a    UltraBay BAT&lt;br /&gt;
  37   47    #  EC 0x7E    BAT     BAT    BAT    Sys BAT (rear right of battery)&lt;br /&gt;
  37   47    #  EC 0x7F    n/a     n/a    n/a    UltraBay BAT&lt;br /&gt;
&lt;br /&gt;
  45   60    #  EC 0xC0    ?       n/a    ?      Between northbridge and DRAM&lt;br /&gt;
  48   62    #  EC 0xC1    ?       n/a    ?      Southbridge (under miniPCI)&lt;br /&gt;
  50   65    #  EC 0xC2    ?       n/a    ?      Power circuitry (under CDC)&lt;br /&gt;
&lt;br /&gt;
  47   58    #  HDD        -&amp;gt;      -&amp;gt;     -&amp;gt;     Hard disk internal sensor&lt;br /&gt;
  47   60    #  HDAPS      -&amp;gt;      -&amp;gt;     -&amp;gt;     HDAPS readout (same as EC 0x79)&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
LEVELS=(    0      2      4      7)  # Fan speed levels&lt;br /&gt;
ANTIPULSE=( 0      1      1      0)  # Prevent fan pulsing noise at this level&lt;br /&gt;
                                     # (reduces frequency of fan RPM updates)&lt;br /&gt;
&lt;br /&gt;
OFF_THRESH_DELTA=3 # when gets this much cooler than 'min' above, may turn off fan&lt;br /&gt;
MIN_THRESH_SHIFT=0 # increase min thresholds by this much&lt;br /&gt;
MAX_THRESH_SHIFT=0 # increase max thresholds by this much&lt;br /&gt;
MIN_WAIT=180 # minimum time (seconds) to spend in a given level before stepping down&lt;br /&gt;
&lt;br /&gt;
IBM_ACPI=/proc/acpi/ibm&lt;br /&gt;
HDAPS_TEMP=/sys/bus/platform/drivers/hdaps/hdaps/temp1&lt;br /&gt;
PID_FILE=/var/run/tp-fancontrol.pid&lt;br /&gt;
LOGGER=/usr/bin/logger&lt;br /&gt;
INTERVAL=3        # sample refresh interval&lt;br /&gt;
SETTLE_TIME=6     # wait this many seconds long before applying anti-pulsing&lt;br /&gt;
RESETTLE_TIME=600 # briefly disable anti-pulsing at every N seconds&lt;br /&gt;
SUSPEND_TIME=5    # seconds to sleep when receiving SIGUSR1&lt;br /&gt;
DISK_POLL_PERIOD=15 # poll period in seconds for disk sensors (it changes slowly and is expensive to read)&lt;br /&gt;
HITACHI_MODELS=&amp;quot;^(HTS726060M9AT00|HTS5410..G9AT00|IC25[NT]0..ATCS0[45]|HTE541040G9AT00|HTS5416..J9(AT|SA)00)&amp;quot;&lt;br /&gt;
SEP=','           # Separator char for display&lt;br /&gt;
&lt;br /&gt;
WATCHDOG_DELAY=$(( 3 * INTERVAL ))&lt;br /&gt;
HAVE_WATCHDOG=`grep -q watchdog $IBM_ACPI/fan&lt;/div&gt;</summary>
		<author><name>WbnSts</name></author>
		
	</entry>
</feed>