Looking for Thinkpad Fan control (tpfancontrol) for Linux

Solaris, RedHat, FreeBSD and the like
Post Reply
Message
Author
indessen
Freshman Member
Posts: 58
Joined: Thu May 11, 2006 7:26 am

Looking for Thinkpad Fan control (tpfancontrol) for Linux

#1 Post by indessen » Tue Aug 29, 2006 7:16 pm

Hello,

I am looking for Thinkpad Fan control (tpfancontrol) for Linux... so that in the same way I can start the program and control the fan. I dont use Linux very often and am a total novice, i.e. I cant program or enter anything at the command line, i.e. use it like Windows.

Appreciate any help.

Louis

yossarian
Freshman Member
Posts: 119
Joined: Mon Sep 12, 2005 11:48 pm
Location: Auckland, New Zealand

#2 Post by yossarian » Tue Aug 29, 2006 11:59 pm

This link may be of service to you:
http://www.thinkwiki.org/wiki/ACPI_fan_control_script

indessen
Freshman Member
Posts: 58
Joined: Thu May 11, 2006 7:26 am

#3 Post by indessen » Wed Aug 30, 2006 5:52 am

yossarian wrote:This link may be of service to you:
http://www.thinkwiki.org/wiki/ACPI_fan_control_script
thanks!

I went there, downloaded the file, saved it on my HDD on C:\ , once as "tpfancontrol" and once as "tpfancontrol.php", as I wasnt sure which is right... (and *.php was the standard save option).

when I rant Knoppix, I clicked on the file, nothing happened.

I presume from what I saw on the webpage that it needs to be run from a command line with some knowledge of how Linux works? As I mentioned, I am totally clueless w.r.t. Linux....

Any other ideas?

Dead1nside
Senior Member
Senior Member
Posts: 780
Joined: Mon Jul 24, 2006 8:32 pm
Location: Reading, UK
Contact:

#4 Post by Dead1nside » Wed Aug 30, 2006 11:05 am

I highly doubt the script will be in PHP so it's extension probably shouldn't be that.

indessen
Freshman Member
Posts: 58
Joined: Thu May 11, 2006 7:26 am

#5 Post by indessen » Wed Aug 30, 2006 11:26 am

Dead1nside wrote:I highly doubt the script will be in PHP so it's extension probably shouldn't be that.
I thought so too, which is why I saved it without extension as well... but that didnt do anything either... :(

djpharoah
Junior Member
Junior Member
Posts: 472
Joined: Fri Feb 03, 2006 7:25 pm
Location: Irvine, California
Contact:

#6 Post by djpharoah » Wed Aug 30, 2006 11:31 am

since its a script you have to first make it exectuable. Secondly you have to make sure your kernel is compiled properly with the right modules.
T400 14.1" WXGA+ LCD / T9400 / 4GB / 160gb / ATi+Intel GFX / 9C / W7 64
T42p 14" SXGA+ / 2.0GHz / 1.5GB / 60GB / 2 x 6C / XP
T40 14" XGA / 1.7GHz / 1GB / 40GB / 9C / XP
T40 14" SXGA+ / 1.7GHz / 1GB / 40GB / 6C / XP
Sold: A31, A31p, A20m, T20, T23

Dead1nside
Senior Member
Senior Member
Posts: 780
Joined: Mon Jul 24, 2006 8:32 pm
Location: Reading, UK
Contact:

#7 Post by Dead1nside » Wed Aug 30, 2006 11:35 am

But is it a PHP script? Or is it something more conventional? I didn't think PHP scripts had access to hardware monitoring etc.

indessen
Freshman Member
Posts: 58
Joined: Thu May 11, 2006 7:26 am

#8 Post by indessen » Wed Aug 30, 2006 11:50 am

djpharoah wrote:since its a script you have to first make it exectuable. Secondly you have to make sure your kernel is compiled properly with the right modules.

rriiiight... ;)

you mean to say I cannot just click and go? I'll repeat: I know nothing about Linux, but have a Knoppix CD that I would like to use to get to know Linux... but without the fan going constantly... ;)

Dead1nside
Senior Member
Senior Member
Posts: 780
Joined: Mon Jul 24, 2006 8:32 pm
Location: Reading, UK
Contact:

#9 Post by Dead1nside » Wed Aug 30, 2006 4:47 pm

Err... surely the nature of script is that it doesn't need to be compiled. Usually scripts are dynamic.

techflavor
Freshman Member
Posts: 119
Joined: Sun Jan 29, 2006 1:55 am
Location: Baton Rouge, LA
Contact:

#10 Post by techflavor » Thu Aug 31, 2006 8:45 am

Yes but if he is having problems running the script, chances are he needs to make it executable -- chmod +x scriptname

piquadrat
Posts: 12
Joined: Fri Apr 14, 2006 2:24 pm

#11 Post by piquadrat » Thu Aug 31, 2006 9:02 am

indessen wrote:I'll repeat: I know nothing about Linux
If I was you, I'd make myself a little more familiar with Linux before I'd start playing around with the hardware.

Anyway, the BIOS controls the fan even under Linux. I have around 3500rpm, which is more or less the same as in Windows. The tpfancontrol script doesn't lower the rpm.

Dead1nside
Senior Member
Senior Member
Posts: 780
Joined: Mon Jul 24, 2006 8:32 pm
Location: Reading, UK
Contact:

#12 Post by Dead1nside » Thu Aug 31, 2006 10:08 am

Surely the only way to get to know Linux is by playing around.

piquadrat
Posts: 12
Joined: Fri Apr 14, 2006 2:24 pm

#13 Post by piquadrat » Thu Aug 31, 2006 4:16 pm

Yes, sure, but that's not my point. It's just that I don't think that software that could brick your laptop is a good place to start learning. Quote from the thinkwiki article linked above:
These scripts rely on undocumented hardware features and override nominal hardware behavior. They may thus cause arbitrary damage to your laptop or data. Watch your temperatures!

Dead1nside
Senior Member
Senior Member
Posts: 780
Joined: Mon Jul 24, 2006 8:32 pm
Location: Reading, UK
Contact:

#14 Post by Dead1nside » Fri Sep 01, 2006 10:14 am

Yer, good point.

yossarian
Freshman Member
Posts: 119
Joined: Mon Sep 12, 2005 11:48 pm
Location: Auckland, New Zealand

#15 Post by yossarian » Sat Sep 02, 2006 12:21 am

The first line of the script reads:

Code: Select all

#!/bin/bash 
This means it's a bash script.

Linux doesn't differentiate suffixes so you can leave it as a .php if you want, but it would just look strange considering it's a bash script.

As techflavor said, you also need to give it execution permissions by issuing something along the lines of:
chmod +x scriptfilename

Zak Smith
Posts: 6
Joined: Tue Sep 05, 2006 4:41 pm
Location: USA

#16 Post by Zak Smith » Wed Sep 06, 2006 10:54 am

Here's what I did--

saved tp-fancontrol to /usr/local/sbin/tp-fancontrol
chmod 755 /usr/local/sbin/tp-fancontrol
added it to /etc/inittab so it always runs, and is restarted if it dies

Code: Select all

fc:2345:respawn:/usr/local/sbin/tp-fancontrol
Note that I did NOT use the /etc/init.d and tp-fancontrol.conf setup.

Also, here is a script which reports on the current CPU frequencies, CPU temperature, and fan speed:

Code: Select all

#!/bin/sh
FAN=`grep speed /proc/acpi/ibm/fan | cut -d: -f2`

extra=`perl -ne 'm/^EC 0xc0: .(..) .(..) .(..) / or next; print hex($1)." ".hex($2)." ".hex($3)."\n"' < /proc/acpi/ibm/ecdump`

CPUT0=`cut -d: -f2 /proc/acpi/ibm/thermal| cut -d' ' -f1`

C0F=`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq`
C0FG=`expr $C0F / 1000000`
C0FS=`printf "%3.1f" $C0FG`

C1F=`cat /sys/devices/system/cpu/cpu1/cpufreq/scaling_cur_freq`
C1FG=`expr $C1F / 1000000`
C1FS=`printf "%3.1f" $C1FG`

echo $C0FS $C1FS
echo $CPUT0 C
echo $FAN rpm
On my Z61t, tp-fancontrol lowers the normal fan rate of around 2800 rpm to imperceptible (reported as about 1600rpm) when it's not running hot.

cb474
Sophomore Member
Posts: 128
Joined: Thu Jan 04, 2007 10:04 pm
Location: Washington, DC

#17 Post by cb474 » Mon Feb 26, 2007 1:01 am

I just tried running tp-fancontrol on my T60 and it made the fan run much faster. Any thoughts about what's going on? Is there some way it needs to be configured? I'm pretty new to this Linux stuff.

Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Return to “Linux Questions”

Who is online

Users browsing this forum: No registered users and 1 guest