Difference between revisions of "Talk:Fan control scripts"
(init script) |
(→init script: who wrote it) |
||
Line 238: | Line 238: | ||
# | # | ||
#PIDFILE=/var/run/tp-fancontrol.pid | #PIDFILE=/var/run/tp-fancontrol.pid | ||
+ | |||
+ | -- [[User:Raigner|Raigner]] 11:09, 26 July 2006 (CEST) |
Revision as of 10:09, 26 July 2006
Wyrfel, are you sure the recent (19:54, 27 Oct 2005) cosmetic change was a good idea? The extensive chunks of code make it hard to grok the structure of the article in the absense of separator lines (which "===" doesn't have). --Thinker 22:10, 27 Oct 2005 (CEST)
We can discuss this. From my point of view, the chunks of code distinguish themselves from each other quite well, because they are each in one code block.
I do not like the = section level - and so far we avoided them on all pages - because
- it generates H1 headings, which is the same as the page heading,
- having more than one level with the hbars is confusing/less readable, because they are not very well distinguishable. This way i.e. the "Other" section looked like a separate empty secion.
I think the way it's now, the separator lines make it possible to easily distinguish the different main sections, while when you have both levels with separator lines, an additional task of distinguishing H1 and H2 separators is necessary.
However, i see your point as well and would like to hear more opinions/arguments.
Wyrfel 22:31, 27 Oct 2005 (CEST)
Contents
bash script with fine control over fan speed (for unpatched kernels)
Moved to the article page, after joint development by Spiney and Thinker.
Note that the fan levels, thresholds and anti-pulsing hacks are system-specific, so you may need to adjust them.
I think it'd probably be nice to have a table of the suggested values here. Those in the "unpatched kernels" script seems to work fine on my R52, but the other scripts all have different values.
--Micampe 08:19, 12 Nov 2005 (CET)
Sensor-specific variable-speed script
Here's a new variable-speed control script that lets you define the temperature range separately for each sensor. To keep things simple, it auto-computes the trip points (unlike the current script). Works well on a T43, and (just barely) keeps the fan off most of the time with CPU undervolting and fglrx set to maximum power saving. Feedback on other machines would be appreciated.
Any idea what are the sensors at EC offsets 0x79, 0x7A, 0xC0, 0xC1, 0xC2? On the T43, 0x79 seems to be the same as the HDAPS sensor (it never deviates by more than one degree from what the HDAPS sensor tells directly), but I don't know where it's located. Sensor 0x7A is uncorrelated with disk temperature and activity, so it can't be HDD like reported ofor R52. Sensor 0xC1 seems to be under the palm-rest (see discussion in Talk:Problem_with_fan_noise).
This version also lets the EC read the RPM sensor every few minutes even when the anti-pulsing hack (which normally prevents this) is in use.
Script moved to the article page.
Feedback very much welcome.
--Thinker 23:08, 27 Nov 2005 (CET)
- I use the script on my T41 and it works great, it doesn't crash like the windows fancontrol (check sourceforge).
- Some remarks: I removed the anti pulsing section because it didn't do anything useful on my laptop. I also raised some temperatures and removed the speed '1', because it barely cools my laptop and makes only slightly less noise than speed '3', which now replaces speed '1'. SirB 18:55, 20 July 2006 (CEST)
Fan enable/disable scripts
We currently have two types of scripts -- the old ones which only enable/disable the fan, and the new ones which control the fan speed. Do the latter supercede the former, or do we know of models on which only enable/disable works? Maybe eventually the enable/disable scripts should be "archived" in the talk page to reduce clutter in the article?
--Thinker 00:08, 28 Nov 2005 (CET)
Things seem pretty stable for the variable-speed script and the list of working models looks good. Since it is superior to the enable/disable scripts in regard to both the annoyance and the impact on hardware, I'll change the organization of the page to put that script first (unless someone objects)..
--Thinker 16:07, 7 Dec 2005 (CET)
I don't see the point in having the enable/disable scripts when the variable speed one works fine. I'd vote for moving the old scripts here and only keep the better ones in the article, unless somebody has a sane use case for which those are bettere than the new scripts.
--Micampe 16:19, 7 Dec 2005 (CET)
working on a thinkpad X20?
hello! my /proc/acpi/ibm directory looks like this:
m@homebase:/proc/acpi/ibm$ ls bay bluetooth dock driver hotkey light video
so the scripts don´t work, because i do not hat a /proc/acpi/ibm/thermal or a /proc/acpi/ibm/fan directory! do you have any ideas whats wrong?
--Manfreeed
What version of ibm_acpi are you using ("cat /proc/acpi/ibm/driver")? Did you load it with the "experimental=1" module parameter?
--Thinker 19:30, 26 Dec 2005 (CET)
- hallo agian, i use IBM ThinkPad ACPI Extras version:0.8 on a Ubuntu Linux with kernel: 2.6.12-10-386. i didn´t change any module parameter. how can i do this? thanks for your help! --Manfreeed 22:14, 27 Dec 2005 (CET)
You need a newer kernel 2.6.14 or newer, or to manually install ibm_api 0.12. It's all explained in ibm-acpi.
--Thinker 06:43, 28 Dec 2005 (CET)
There is no 0.12 available as a separate download, it is only included in 2.6.14. But 0.11 from the website works just fine for me with the stock Ubuntu kernel.
--Micampe 11:11, 28 Dec 2005 (CET)
Question on temperatures
I've been testing the 'script with fine control over fan speed' on my r50e, kernel 2.6.15, which still contains version 0.12a of the ibm_acpi module. The script works fine but I notice two things:
1. The seven speed levels don't seem to correspond with seven actual speeds but rather with only three. I also notice that only 3 levels, 2, 4 and 7 are actually used in the script.
2. The given range of temperatures - 52, 60, 68 - causes the fan in my Thinkpad to run even more often than under embedded control, so I would naturally like to raise them. As the maximum core temperature is 100°C, I wonder why I shouldn't use, say 72, 80, 88 instead. - How (im)precise are the temperature data in /proc/acpi/ibm/thermal?
antonix
1. On all models I'm aware of, some of the levels are equivelent. So the script only bothers with the different ones. You can test your model manually using How to control fan speed.
2. Yes, in the script you used (the "simple" one), the threshold for highest fan speed is set fairly low, because the same threshold is used for all components and some are more sensitive than others. The "comprehensive" script, also on the article page, lets you control each component separately, so you can raise the threshold for the CPU and GPU without risking burning something else. But note that the thresholds listed there were chosen for a T43, which probably has different thermal sensors than your R50e.
--Thinker 10:00, 14 March 2006 (CET)
init script
I wrote an init script for my Debian system, which also allows to configure some options using a config file. It requires to move the tp-fancontrol script to /usr/bin/, but that can be adopted easily:
#! /bin/sh ### BEGIN INIT INFO # Provides: tp-fancontrol # Default-Start: 2 3 4 5 # Default-Stop: S 0 1 6 ### END INIT INFO # Copyright (c) 2006 Ronald Aigner <ra3@os.inf.tu-dresden.de> set -e DAEMON=/usr/bin/tp-fancontrol NAME=tp-fancontrol DAEMONUSER=root PIDDIR=/var/run PIDFILE=$PIDDIR/tp-fancontrol.pid DESC="Thinkpad CPU fan control" test -x $DAEMON || exit 0 # source config file; edit that file to configure this script TEMP_SHIFT=0 LOG_SYSLOG=1 QUIET=1 if [ -e /etc/tp-fancontrol.conf ]; then . /etc/tp-fancontrol.conf fi start_it() { PARAMS=-d if [ -e $PIDFILE ]; then echo "$DESC already running. Stop first." exit 1 fi if [ "$TEMP_SHIFT" != "0" ]; then PARAMS=$PARAMS -s $TEMP_SHIFT fi if [ "$LOG_SYSLOG" = "1" ]; then PARAMS=$PARAMS" -l" else if [ "$QUIET" = "1" ]; then PARAMS=$PARAMS" -q" fi fi PARAMS=$PARAMS" -p $PIDFILE" echo -n "Starting $DESC: $NAME ... " $DAEMON $PARAMS if [ "$?" = "0" ]; then echo "Success." else echo "Error while starting: $?" fi } stop_it() { if [ -e $PIDFILE ]; then echo -n "Stopping $DESC ... " $DAEMON -k if [ "$?" = "0" ]; then echo "Success." else echo "Error while stopping: $?" fi else echo "$DESC not running." fi } restart_it() { if [ -e $PIDFILE ]; then stop_it sleep 2 fi start_it } case "$1" in start) start_it ;; stop) stop_it ;; reload|force-reload|restart) restart_it ;; *) echo "Usage: /etc/init.d/$NAME {start|stop|reload|restart|force-reload}" >&2 exit 1 ;; esac exit 0
The config script could look like this:
# config file for tp-fancontrol # # The temparature shift will shift the trip points for different fan speeds. # # A positive value means that the trip-point is at a higher temperature and # thus the fan is less noisy. A negative shift lets the fan start earlier. # The default value is 0. # #TEMP_SHIFT=10 # # True if logging to syslog should be enabled. If zero no logging to syslog # is enabled. All output will appear on console. This option implies QUIET=1. # The default value is 1. # #LOG_SYSLOG=0 # # If no logging to syslog is on, the output will be verbose. To be less # verbose set QUIET to 1. The default value is 1. # #QUIET=1 # # The file to store the pid of the currently running fan-control daemon in. # The default value is /var/run/tp-fancontrol.pid # #PIDFILE=/var/run/tp-fancontrol.pid
-- Raigner 11:09, 26 July 2006 (CEST)