Page 1 of 1
Anyone using fan control in Ubuntu 7.04 (feisty) ??
Posted: Fri Apr 20, 2007 10:51 pm
by mattster
I just installed 7.04 on my T43p tonight and am completely amazed at how far things have come. Everything just works!!
Anyways, the only thing so far that I am missing from Windows XP is something to control the fan. I used NHC + ACPI fan control there. I see there are things available for linux, but I am not quite sure where to start with that.
Any help appreciated. I dabble with Linux from time to time, but its been a while since I dove in head first
Thanks!
Matt
Posted: Sat Apr 21, 2007 2:20 pm
by e_tank
fan control is provided by the
ibm_acpi kernel module. feisty comes with a 2.6.20 kernel, so i don't think you'll need to patch the kernel to get fan control. to see if you have fan control use the following commands as root (or using sudo) (note: i'm not sure you still need to set experimental for fan control, but it shouldn't hurt to do so anyway)
Code: Select all
modprobe ibm_acpi experimental=1
cat /proc/acpi/ibm/fan
that last command should display the current status and speed of your fan, provided ibm_acpi was loaded successfully and it has fan control support.
from here to set the fan speed manually you can do the following (as root or sudo) (here i set the fan speed to 7 which is the maximum level)
to set it back to auto just use
Code: Select all
echo level auto > /proc/acpi/ibm/fan
for more information visit
this page.
Re: Anyone using fan control in Ubuntu 7.04 (feisty) ??
Posted: Mon Apr 23, 2007 8:48 pm
by axiom
the fan control script tp-fancontrol from thinkwiki takes care of everything for you.
Feisty loads ibm_acpi with experimental flag already, so all you need is just that automation script
mattster wrote:I just installed 7.04 on my T43p tonight and am completely amazed at how far things have come. Everything just works!!
Anyways, the only thing so far that I am missing from Windows XP is something to control the fan. I used NHC + ACPI fan control there. I see there are things available for linux, but I am not quite sure where to start with that.
Any help appreciated. I dabble with Linux from time to time, but its been a while since I dove in head first
Thanks!
Matt
Posted: Tue Apr 24, 2007 7:08 pm
by mattster
I was thinking of running this script, with the same values I have setup for the ACPI control script I have running in Windows with NHC. I have noticed that Linux tends to run things a bit hotter for some reason (CPU seems to run about 4 degrees F warmer than in XP ... 109F vs. 113F)...
I should be able to follow the instructions from the Wiki to get this implemented. Are there any gotchas that I need to know about before going down this path??
Thanks guys!
Matt
Posted: Wed Apr 25, 2007 9:34 pm
by nmuntz
One thing that does tend to run hotter in Linux is the GPU. The default feisty install uses the open source R300 driver with no power saving enabled by default.
If you use the proprietary ATI driver, fglrx, you can really tweak things.
I use the tp-fancontrol script. It makes quite a difference in reducing fan noise.
Posted: Fri Apr 27, 2007 10:07 pm
by mattster
I actually used Axiom's custom built packages, which included the video driver. I've poked around with it a bit, but other than adjusting the clock speed, what else is there I can do with it?
Also, I configured my system with the fancontrol script. What's the easiest way to tell if it is actually enabled?
Thanks!
Matt
nmuntz wrote:One thing that does tend to run hotter in Linux is the GPU. The default feisty install uses the open source R300 driver with no power saving enabled by default.
If you use the proprietary ATI driver, fglrx, you can really tweak things.
I use the tp-fancontrol script. It makes quite a difference in reducing fan noise.
Posted: Mon Aug 20, 2007 4:13 am
by dansu
This is the error message I get when I try to change the fan speed.
Code: Select all
dansu@dansu-laptop:~$ cat /proc/acpi/ibm/fan
status: enabled
speed: 3693
level: auto
commands: level <level> (<level> is 0-7, auto, disengaged)
commands: enable, disable
commands: watchdog <timeout> (<timeout> is 0 (off), 1-120 (seconds))
dansu@dansu-laptop:~$ echo level 7 > /proc/acpi/ibm/fan
bash: /proc/acpi/ibm/fan: Permission denied
Running Feisty Fawn.
Posted: Mon Aug 20, 2007 7:20 am
by K0LO
dansu wrote:echo level 7 > /proc/acpi/ibm/fan
Try?
Code: Select all
sudo echo level 7 > /proc/acpi/ibm/fan
Posted: Mon Aug 20, 2007 2:58 pm
by dansu
Code: Select all
dansu@dansu-laptop:/proc/acpi/ibm$ sudo echo level 7 > /proc/acpi/ibm/fan
bash: /proc/acpi/ibm/fan: Permission denied
what's strange is that it doesn't even prompt for my password..
Posted: Mon Aug 20, 2007 3:23 pm
by Volker
[quote="dansu"]
Code: Select all
dansu@dansu-laptop:/proc/acpi/ibm$ sudo echo level 7 > /proc/acpi/ibm/fan
bash: /proc/acpi/ibm/fan: Permission denied
This command redirects (as user, not as root) the output of "sudo echo level 7" (that is, it prints "level 7" if you have enough sudo rights) into /proc/acpi/ibm/fan. Probably not what you want.
Try something like this:
Code: Select all
sudo "echo level 7 > /proc/acpi/ibm/fan"
Posted: Mon Aug 20, 2007 3:35 pm
by dansu
I'm just following the directions from the 2nd post.
Code: Select all
dansu@dansu-laptop:~$ sudo "echo level 7 > /proc/acpi/ibm/fan"
sudo: echo level 7 > /proc/acpi/ibm/fan: command not found
Posted: Mon Aug 20, 2007 5:27 pm
by K0LO
OK; got it:
Code: Select all
sudo su
echo level 7 > proc/acpi/ibm/fan
exit
This works on my machine. The first command gets you root privileges. The last exits root and back to normal user. Once you are root you can do the "echo" statements and you will not be denied permission.
If you're playing with the fan settings, change to the directory first to save repetitious typing:
Code: Select all
sudo su
cd /proc/acpi/ibm
echo level 7 > fan
echo level 0 > fan
echo level auto > fan
exit
Posted: Mon Aug 20, 2007 6:31 pm
by dansu
^
you're a genius, it worked!!
now here's a more complicated issue.. The reason I'm trying to change my fan speed in the first place is that the fan never runs at maximum when in auto mode. Even when CPU is under full load and the bottom of the laptop gets real hot, the fan still runs around 3400 rpm, this is level 3 or 4. It then takes a while to cool down since the fan is only running half capacity. I just want the fan to spin all the way up automatically so it cools down faster.
I haven't had any problems with overheating so it's more of an annoyance than a problem though.
Posted: Mon Aug 20, 2007 7:01 pm
by K0LO
I haven't tried this personally, but in replies 2 and 3 above there are
references to a
tp-fancontrol script on ThinkWiki that may do what you want.
Many people want the opposite behavior (quieter fan) than you want (fan speed higher) but you can probably fiddle with the temperature thresholds in the script to achieve what you want.
Posted: Fri Jan 04, 2008 4:56 pm
by Paul Unger
k0lo wrote:OK; got it:
Code: Select all
sudo su
echo level 7 > proc/acpi/ibm/fan
exit
This works on my machine. The first command gets you root privileges. The last exits root and back to normal user. Once you are root you can do the "echo" statements and you will not be denied permission.
If you're playing with the fan settings, change to the directory first to save repetitious typing:
Code: Select all
sudo su
cd /proc/acpi/ibm
echo level 7 > fan
echo level 0 > fan
echo level auto > fan
exit
I receive an 'invalid argument level 7' error when I try this . . . Any hints?
Posted: Fri Jan 04, 2008 7:45 pm
by K0LO
Paul:
What do you see when typing:
The console output should display the allowable commands and their range.
For example, on my hardware the output of that command is:
status: enabled
speed: 0
level: auto
commands: level <level> (<level> is 0-7, auto, disengaged)
commands: enable, disable
commands: watchdog <timeout> (<timeout> is 0 (off), 1-120 (seconds))
commands: speed <speed> (<speed> is 0-65535)
Posted: Fri Jan 04, 2008 10:53 pm
by Paul Unger
k0lo wrote:Paul:
What do you see when typing:
The console output should display the allowable commands and their range.
I see:
Code: Select all
~$ cat /proc/acpi/ibm/fan
status: enabled
speed: 2983
level: auto
None of the 'command' lines show up . . . Forgive me, but I'm quite new to this.

But I sure appreciate your help!
Posted: Fri Jan 04, 2008 11:10 pm
by K0LO
Paul:
Either our hardware is different and has differing commands, or we're using different Linux kernels.
I am running Kubuntu 7.10 and using kernel 2.6.20-16-386. In newer kernels the registers for fan control may have been moved. Which Linux distro and kernel are you using? You could hunt around in /proc/acpi to see if there is another branch with a different name, for example, ThinkPad instead of ibm...
Posted: Fri Jan 04, 2008 11:34 pm
by Paul Unger
I'm running Ubuntu 7.10 kernel . . . ummm . . . kernel . . . geez, where do you find the kernel #?! . . . FOUND IT! (System > Admin > System Monitor): kernel 2.6.22-14-generic. As for "another branch", all I see in /proc/acpi is ibm (not ThinkPad, or anything else 'suspicious'). What /is/ suspicious is that when I try to open /proc/acpi/ibm/fan with 'Text Editor' (via right-click) I get the message: "The file proc/acpi/ibm/fan changed on disk. Do you want to reload the file?" When I click "Reload", the file is empty. I don't think that's a good thing.

Posted: Fri Jan 04, 2008 11:42 pm
by K0LO
Paul:
I have a copy of kernel 2.6.22-14 also. I will fire it up and take a look first thing tomorrow morning (it's late here now). I'll get back to you...
Posted: Sat Jan 05, 2008 10:12 am
by K0LO
Paul:
You are so right. The newer kernel has fan control disabled by default, so the register /proc/acpi/ibm/fan is not able to control the fan; you can only monitor it. I see the same result as you did when doing
and any attempts at writing to this location fail.
By the way, don't try to open this location with a text editor; it is linked directly to hardware registers.
You can do a couple of things. First, you could enable fan control in the kernel module to make the register behave like it did on earlier kernels. To do this, edit (as root) the file /etc/modprobe.d/thinkpad_acpi.modprobe:
Code: Select all
sudo nano /etc/modprobe.d/thinkpad_acpi.modprobe
At the end of the "options" line, right after "experimental=1", add "fan_control=1" (without the quotes). Reboot and now you should be able to write to /proc/acpi/ibm/fan.
Another solution is to do fan control differently. Check out
this page on ThinkWiki, under "Using a stock kernel" for writing directly to registers on the Embedded Controller. Just be aware that the instructions below that (On/Off control using a stock kernel) will not work with kernel 2.6.22 unless you add the "fan_control=1) line as above.
Posted: Sat Jan 05, 2008 10:52 am
by Paul Unger
I now have:
Code: Select all
options thinkpad_acpi hotkey=enable,0xffff8f experimental=1 fan_control=1
in /proc/acpi/ibm/fan. I still do not get any 'command' lines when I run:
I'm going to spend some time on the ThinkWiki page you referenced (though my abilities are rather limited; I had to google how to 'save' in nano

). Thanks for your help!
Posted: Sat Jan 05, 2008 10:55 am
by K0LO
Paul:
Did you reboot after making the changes?
Posted: Sat Jan 05, 2008 12:35 pm
by Paul Unger
I did Ctrl+Alt+Backspace. Is that the same thing?
EDIT: evidently not . . . I 'Restarted' and I now have the 'command' lines as shown here:
Code: Select all
cat /proc/acpi/ibm/fan
status: enabled
speed: 2981
level: auto
commands: level <level> (<level> is 0-7, auto, disengaged, full-speed)
commands: enable, disable
commands: watchdog <timeout> (<timeout> is 0 (off), 1-120 (seconds))
Thanks!
Posted: Sat Jan 05, 2008 12:45 pm
by K0LO
No; that only restarts the X-server. You need to reload the thinkpad_acpi kernel module and one easy way to do this is to restart the computer.
Posted: Sat Jan 05, 2008 4:16 pm
by Paul Unger
Thanks for your help, K0lo. I'm running Sebastian Urban's ThinkPad Fan Control 0.82--and loving it! Thanks for walking me through this.
Posted: Sat Jan 05, 2008 4:27 pm
by K0LO
Paul:
You're quite welcome. I think that this exercise has had a secondary benefit. I note that if I boot Kubuntu 7.10 with its default kernel 2.6.22-14 then the kernel module used for acpi is thinkpad_acpi, whereas if I boot it with the older kernel 2.6.20-16 used in Kubuntu 7.04 then it uses ibm_acpi instead. Perhaps thinkpad_acpi is the wrong module for my hardware??
I have been using the older kernel because suspend-to-disk no longer works on my machine with the newer kernel but works great with the older kernel, and I've been scratching my head for weeks trying to figure out why. I think you may have caused me to stumble upon the reason.
Off to see if I can get the new kernel to load the ibm_acpi module instead of the thinkpad_acpi module...
Posted: Sat Jan 05, 2008 5:21 pm
by Paul Unger
Well, that prompts another question . . . ! I've tried both 'Suspend' and 'Hibernate' from the shut-down menu, but all I get is a dark screen with a flashing cursor, solid power and battery leds, and a flashing 'moon' led. Nothing will take it out of this state except a hard shutdown. But maybe this is fodder for a new thread!