ibm acpi kernel 2.6.23

Solaris, RedHat, FreeBSD and the like
Post Reply
Message
Author
amwus
Freshman Member
Posts: 70
Joined: Mon Feb 05, 2007 11:10 am
Location: Belgium

ibm acpi kernel 2.6.23

#1 Post by amwus » Wed Oct 31, 2007 3:42 pm

Is it me or fancontrol doesn't work with linux 2.6.23 ??? Can't find /proc/acpi/ibm/ecdump !!
Thinkpad T400

amwus
Freshman Member
Posts: 70
Joined: Mon Feb 05, 2007 11:10 am
Location: Belgium

#2 Post by amwus » Sat Nov 03, 2007 10:04 am

Ok, i found the problem... Acutally, this is not a problem. Thinkpad-acpi was updated, and now it does not use /proc/acpi/ibm/ecdump.

If you wan't to control your fan speed, you have to load thinkpad-acpi with fan_control=1 option.

The commands to control fan speed are now :
echo level x > /proc/acpi/ibm/fan

and x can be 0-7, auto, disengaged or fullspeed.
But now, the acpi fan control script on think wiki does not work anymore in a recent kernel. And i do not really understand how to get it working. I'm writing a program in C to control fan speed, but it's still in developpement.

So, if anyone knows how to modify the fan control script, or have a new fan control script, it will be welcomed !
Thinkpad T400

lightweight
Sophomore Member
Posts: 234
Joined: Sat Jun 30, 2007 10:56 pm
Location: L. A.

#3 Post by lightweight » Mon Nov 05, 2007 5:01 am

Why not add a function in ~/.bashrc?

Code: Select all

function fan() { echo level $* > /proc/acpi/ibm/fan; }
After sourcing ~/.bashrc or opening a new term, call with # fan x like:

Code: Select all

fan 7
Have: x60s ultralight 1705-CTO, Debian SiD, Linux 2.6.25-2 | x61s ultralight 7668-CTO, Debian SiD/Experimental, Linux 2.6.27-git5 | Model M 1391401, white label, 07-17-91
Had: x22, Debian Testing/SiD, Linux 2.6.18-22

amwus
Freshman Member
Posts: 70
Joined: Mon Feb 05, 2007 11:10 am
Location: Belgium

#4 Post by amwus » Thu Nov 08, 2007 3:03 am

I don't understand... according to thinkwiki, the actual fan script should work fine if you load thinkpad_acpi fan_control=1... But it does not work for me... And my program is not totally finished...
Thinkpad T400

Harryc
Moderator Emeritus
Moderator Emeritus
Posts: 13228
Joined: Thu Apr 12, 2007 8:23 am
Location: Upstate New York

#5 Post by Harryc » Sat Nov 10, 2007 4:18 pm

Same problem here, but I definitely get an error while running the fan control script from the wiki -

Code: Select all

tp-fancontrol.sh: line 202: syntax error near unexpected token `<'
tp-fancontrol.sh: line 202: `    read X Y1 Y2 Y3 Y4 Y5 Y6 Y7 Y8 Z1 Z2 Z3 JNK < <(echo "$THERMAL") '
thinkpad_acpi fan_control=1 runs fine, and I can manually control the fan from console, but the script bombs. Running OpenSUSE 10.3, kernel 2.6.22. Any ideas?

amwus
Freshman Member
Posts: 70
Joined: Mon Feb 05, 2007 11:10 am
Location: Belgium

#6 Post by amwus » Sat Nov 10, 2007 5:07 pm

The script worked fine on 2.6.22 with option experimental=1 and fan_control=1 for thinkpad_acpi.

Does not work with 2.6.23 but i wrote a C program that control the fan... I'm testing it right now... It seems to work but it still not totally finished...

Well... no, it's still not working !
Thinkpad T400

Harryc
Moderator Emeritus
Moderator Emeritus
Posts: 13228
Joined: Thu Apr 12, 2007 8:23 am
Location: Upstate New York

#7 Post by Harryc » Sat Nov 10, 2007 5:16 pm

amweus, am interested in your work on the script. Please keep us posted. Meanwhile, if anyone knows why I am getting the above error, post here. Thanks.

Harryc
Moderator Emeritus
Moderator Emeritus
Posts: 13228
Joined: Thu Apr 12, 2007 8:23 am
Location: Upstate New York

#8 Post by Harryc » Sat Nov 10, 2007 5:19 pm

Disregard the error post. I was running the script incorrectly. Now works.

amwus
Freshman Member
Posts: 70
Joined: Mon Feb 05, 2007 11:10 am
Location: Belgium

#9 Post by amwus » Sun Nov 11, 2007 5:52 am

What was wrong ? have you tried it on 2.6.23 ?

My program is not a simple script, it's a program written in C that will control the fan acording ton a config file similar to tpfancontrol in windows. I want to develop a "Thinkpad Control Center" for Linux.
It would control the fan, battery tresholds using tp smapi, ati powerplay and other optimisations options.

For now, only the fancontrol seems to be working. It uses the same algorithm as TpFanControl in windows. If one temperature is above the limit, the fan is enabled at a defined speed, and it slows down only when the temperatures get back to a smaller temperature limit.

At the moment, the temperatures limits are defined directly in the source code but in a near future, i plan to define them in a config file.

I'll keep you posted...
Thinkpad T400

Harryc
Moderator Emeritus
Moderator Emeritus
Posts: 13228
Joined: Thu Apr 12, 2007 8:23 am
Location: Upstate New York

#10 Post by Harryc » Sun Nov 11, 2007 7:03 am

amwus wrote:What was wrong ? have you tried it on 2.6.23 ?
I'll keep you posted...
Nothing was wrong, I made a rookie mistake using bash. I have not tried this particular script on 2.6.23. Thanks for keeping us updated on your progress.

lightweight
Sophomore Member
Posts: 234
Joined: Sat Jun 30, 2007 10:56 pm
Location: L. A.

#11 Post by lightweight » Sun Nov 11, 2007 10:20 pm

amwus,

One can create a function for one's bash shell to execute simple commands, such as using the command "fan" to execute the echo statement in the example above. One can define functions in their user's .bashrc to load each time a terminal is opened instead of writing a quick script. For example, I use an alias called "maxbatt" to turn off USB, syslogd, and unload a bunch of modules when I am low on battery.

Not posting a links to be an [censored], but because they explain better than I can: http://www.faqs.org/docs/Linux-HOWTO/Ba ... TO.html#s8
http://www.novell.com/coolsolutions/tools/17142.html

Post your program? Maybe we can help. Cool project.
Have: x60s ultralight 1705-CTO, Debian SiD, Linux 2.6.25-2 | x61s ultralight 7668-CTO, Debian SiD/Experimental, Linux 2.6.27-git5 | Model M 1391401, white label, 07-17-91
Had: x22, Debian Testing/SiD, Linux 2.6.18-22

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