Jump to content

software fan control


Guest giggione666
 Share

Recommended Posts

Guest giggione666

hi there

i would know if is possible setting the fan speed on a laptop.

 

iam runnig an home coocked kernel 2.4.20 with acpi support enabled (and finally i can ear my laptop playing music),

now the second problem is the fan alwais sound-speed rotating

can I disable or set the speed of the fan via software:

- accessing the bios?

- throght acpi functions?

- something else?

laptop is FIC 380 A

my chipset is: Via Apollo pro 133A

 

any suggestion is welcome

 

and thanx in advance for response

Link to comment
Share on other sites

Guest dbezona

I had the same issue with my desktop machine - under Linux the fans would always be on full-blast, which is pretty loud. This is a seemingly long process, but it's actually fairly easy, and works well (for me). I have yet to find a more automatic solution, and would be happy to hear one if anyone has suggestions.

 

The answer was to install the lm_sensors package, which is available on your install CD's, or in any of the base RPM repositories. Note that the packages aren't the absolute latest version, so if your chipset isn't supported, you may need to build a newer version from source.

 

Information can be found here:

http://secure.netroedge.com/~lm78/

 

Basically, it gives access, via /proc to various sensors and settings of your motherboard, including temperature settings and fan speed (amongst other things).

 

The documentation at the site is pretty good for getting it configured. Basically you run a setup program (sensors-detect) which detects your chipset, and tells you what settings you need to add to a couple of config files to get it up and running.

 

Once it's working, you will have entries under /proc/sys/dev/sensors/<your_chipset> that you can see various values. Some of these values you can set. This is where you can change the fan speed.

 

lm_sensors is JUST giving you an interface to the sensors. You will need another method to actually do something with them.

 

What I do is use gkrellm, which is a nifty, skinnable system monitoring tool with nifty visuals. It will show you the values of your sensors, and (and this is key), allow you to do things like run scripts if a particular sensor gets out of a given range. For example, if one of your temperature values gets too high, you can have the alarm run a script to bump up the speed of your fan.

 

So, let's put it all together:

 

1) Install and configure lm_sensors. I will leave it to the documentation to get you through this part.

 

2) go into /proc/sys/dev/sensors/<your_chipset> and look at "tempx" (where x is a number, usually more than one temp entry), and "pwmx" (also, x is a number). You will also see "fan" entries - these only show you the fan speed, whereas the pwm entries actually let you give it values to change the fan speed.

 

3) to get a sense for how the pwm settings work in your system do

cat > pwmx

You can then put in values (from 0 to 255 I believe) you should be able to hear the fan speed change as you change the value. You can also CTRL-C

 

4) Once you have a feel for how the pwm entry effects the fan speed, you need to make a couple of scripts to control this automagically.

 

Here is the two lines I put in my /etc/rc.local file to set my fans to a low speed at boot time:

 

echo 50 | cat > /proc/sys/dev/sensors/w83627hf-isa-0290/pwm1

echo 100 | cat > /proc/sys/dev/sensors/w83627hf-isa-0290/pwm2

 

Then I have two files that look pretty much the same for gkrellm to use if the temps get too high:

 

#!/bin/bash

echo 150 | cat > /proc/sys/dev/sensors/w83627hf-isa-0290/pwm1

echo 150 | cat > /proc/sys/dev/sensors/w83627hf-isa-0290/pwm2

 

This spins the fans a bit faster to give more cooling. I have an "emergency" script that puts them up full blast, but haven't ever had my box get hot enough to need it.

 

Note that you have to have root access to change the sensor settings. How you go about making that work as far as running the scripts and such is up to you - I simply have my non-root user in my sudoers file with the NOPASSWD setting, so I simply put 'sudo <scriptname>' to run the script in grkellm. There are other ways to accomplish it, so do what makes you happy.

 

I hope this helps. If anyone has an easier way, I am all ears!

Link to comment
Share on other sites

  • 7 months later...
Guest chisquare

Hello, I'm trying to implement the solution described below to get my cooling fan under control (right now it's running full blast), and can't get past the first step. (I just installed 9.1 from CDs two days ago, and am still getting familiar with everthing.)

 

I installed the lm_sensors program from the 9.1 CDs using the Mandrake control (software install) window. However, after installing, there does not seem to be a /sensors/ directory under /proc/sys/dev/. Did I miss a step? or should I look in another path?

 

Thanks in advance.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...