# Reducing fan speed

## theaks

I've just set up lm-sensors and can detect my cpu temp. I've got an amd64 system and i'm wondering how i can reduce my fans speed manually from inside linux?

Also is there a daemon that can do it for me based to the cpus temp?

----------

## imacomputa

I am also trying to find a solution to fan speed adjustment, but in my case I want to crank the fan speed up.

This is for an AMD64 notebook.

----------

## KozmoNaut

Theres a script called "fancontrol" included in the lmsensors package.

Run pwmconfig first to generate a config file (it sets up stuff like min and max temps and the corresponding fan speeds). After that you can tweak the /etc/fancontrol file, but that's probably not neccesary.

I put this in my /etc/conf.d/local.start:

```
/usr/sbin/fancontrol & > /dev/null
```

Which makes it run on startup and not stop until I kill it  :Wink: 

----------

## alkan

fancontrol works beautifully on my machine. My fans(CPU and PS) are quiet and only kick in under heavy load. I added following init script (/etc/init.d/fancontrol)

```

start() {

        ebegin "Starting fancontrol"

        start-stop-daemon --start  --background --pidfile /var/run/fancontrol.pid --exec /usr/sbin/fancontrol

        eend $? "Failed to start fancontrol"

}

stop() {

        ebegin "Stopping fancontrol"

        start-stop-daemon --stop --pidfile /var/run/fancontrol.pid

        eend $? "Failed to stop fancontrol"

}

```

```

rc-update add fancontrol default

```

Here is the my /etc/fancontrol configuration file

```

INTERVAL=10

FCTEMPS=*-0290/pwm2=*-0290/temp2_input *-0290/pwm1=*-0290/temp3_input

FCFANS=*-0290/pwm2=*-0290/fan1_input *-0290/pwm1=*-0290/fan2_input

MINTEMP=*-0290/pwm2=45 *-0290/pwm1=45

MAXTEMP=*-0290/pwm2=60 *-0290/pwm1=55

MINSTART=*-0290/pwm2=0 *-0290/pwm1=0

MINSTOP=*-0290/pwm2=0 *-0290/pwm1=0

```

That is minimum CPU fan speed at 45 degree CPU temperature, maximum CPU fan speed at 60 degree CPU temperature. Similarly minumum Power Supply (PS) fan speed at 45 degree main board temperature, maximum PS fan speed at 55 degree main board temperature.

you can also manually set the fan speeds.

```

echo 255 > /sys/bus/i2c/devices/1-0290/pwm1

```

echo 0 for minimum fan speed, echo 255 for full fan speed. pwm1(first fan) pwm2(second fan).....etc. the above path and configuration file is machine depended.

If you set CPU fan speed to a lower value manually, Cooling may not be enough, resulting overheated and burned CPU. Better use fancontrol scriptLast edited by alkan on Thu Oct 28, 2004 3:03 pm; edited 1 time in total

----------

## josh

I don't have the /sys/bus/i2c directory. How can I get that? Is it something that needs to be enabled in the kernel?

----------

## alkan

Yes, You need to enable

```

Device Drivers -->

  I2C Support -->

    <*> I2C Support

    <*> I2C DeviceInterface

      I2C Hardware Bus Support ->

         (Enable Your Bus system)

      Hardware Sensors Chip Support -->

         (Enable whatever sensor chip you have)

```

You can also enable those as modules for all the chips listed in there if you don't know what chip you have. Then try loading them one at a time to see if it works. lm_sensors does it automatically for you.

```

sensors-detect

```

----------

## FearlessSpiff

I just installed lm_sensors but am surprised, that i don't have pwm functionality on my new SN95G5/3.5AMD64/and my GeForce. The thing is, i have to absolutly turn down the GeForce Fan. It is driving me crazy. On full speed all the time. I think it is the Temp3 indicator. But how can i throttle the fan speed now?

```
it87-isa-0290

Adapter: ISA adapter

VCore 1:   +1.07 V  (min =  +1.42 V, max =  +1.57 V)   ALARM

VCore 2:   +1.46 V  (min =  +2.40 V, max =  +2.61 V)   ALARM

+3.3V:     +6.53 V  (min =  +3.14 V, max =  +3.46 V)   ALARM

+5V:       +4.87 V  (min =  +4.76 V, max =  +5.24 V)   

+12V:     +11.84 V  (min = +11.39 V, max = +12.61 V)   

-12V:     -20.36 V  (min = -12.63 V, max = -11.41 V)   ALARM

-5V:       -2.56 V  (min =  -5.26 V, max =  -4.77 V)   ALARM

Stdby:     +4.81 V  (min =  +4.76 V, max =  +5.24 V)   

VBat:      +3.04 V

fan1:      907 RPM  (min =    0 RPM, div = 16)          

fan2:        0 RPM  (min =  332 RPM, div = 16)          

fan3:     4963 RPM  (min =  664 RPM, div = 8)          

M/B Temp:    +49 C  (low  =   +15 C, high =   +40 C)   sensor = thermistor   

CPU Temp:    +22 C  (low  =   +15 C, high =   +45 C)   sensor = diode   

Temp3:       +47 C  (low  =   +15 C, high =   +45 C)   sensor = thermistor
```

Then im asking myself why i cant "modprobe ic2-isa". Maybe this is the problem, that changing Fanspeed doesn't work?

----------

## alkan

I assume it is a typo, you should modprobe i2c-isa (not ic2-isa)

Well, if your hardware doesn't support PWM. There is no easy way to speed down the fan. You can buy a quiter fan. 

I remember seeing a script which emulates the PWM by turning on-off the fan very quickly (which is what PWM does). But can't remember where and what was the name. If you have the functionalty of turning the fan on and off, you can write a simple script to do that.

----------

## FearlessSpiff

Omg, i m too stupid i enabled it in the kernel, not as module... Sorry.

----------

## orionrobots

 *alkan wrote:*   

> If you have the functionalty of turning the fan on and off, you can write a simple script to do that.

 

While this is exactly what PWM does  - I would *seriously* advice against implementing this in a script. If your script stops (for whatever reason - and sometimes they do), you could leave a system in a fan off state. Bad move - game over.

To be fair, working with a lot of PWM based robot transmissions, it is always something better implemented in a dedicated controller, which I would hope there is somewhere in the chipset...

----------

## FearlessSpiff

Yeah, i never intended to do this. The sad thing is, that the fan can be controlled. I use a utility in Windows to  do so. So i know that it could work. I also think, that this regulation of fan speeds belongs into the bios of the mainboard/graphic card and not into a piece of software running on an OS.

----------

## alkan

 *Quote:*   

> If your script stops (for whatever reason - and sometimes they do), you could leave a system in a fan off state. Bad move - game over.

 

It has the same risks as IO chips with built-in PWM (widely used today). your driver or script stops (for whatever reason), you could leave a system in a fan PWM value 0 or not enough for cooling - game over again. 

Many of the recent systems (even old systems) uses an IO chip to handle fan speeds and to read-in various sensors. Speed or status of the fan is controlled by the OS throught the ACPI. There are security measures can be taken (like set them to the max when driver stops, lm_sensors's fancontrol script does that). I have been using my system for 3 years now (linux and windoz) without single failure.

I agree a dedicated hardware would be rock-solid but it wouldn't be as customizable. That's why there is ACPI, to manage the hardware more efficiently (especially when power consumption of chips are going sky-rocket). A dedicated hardware can be a backup system on top of the software power management.

An example to the customization is my system. My PS fan sits on top of CPU, So When CPU fan is not enough, I rev-up the PS fan to help cool the CPU. Or If the ambient temperature is already high I don't force the fans as hard. I use an advandced PID feedback system to manage the hardware I have. The program I've written in C++ reads in various sensors such as temperatures, system load..., accept some paramaters such as capacity of the fans, cooling coefficients..., after some calculations it adjusts fan speeds, does CPU throttling..., in an intelligent way such that if There is nothing runing, it slows the CPU, otherwise rev-up fans and even turn-off some hardware not in use. If I am working on the computer or it is night (I am sleeping in the same room) it switches to the quiet mode and so on. It is overkill, but it was a project for just learning things.

----------

## mm/ol

This thread saved my ears. <3

----------

## Cintra

Very nice solution guys...

btw, for those who aren't aware, there are mechanical solutions which take up a pci slot's space on the back of your system, and in my case, control the rear chassis fans.

The one I use has three speeds, which I run either on max while compiling, or on low normally. It makes listening to music that much more enjoyable..  :Wink: 

regards

----------

## eqxro

Okay, a quick tip, something I noticed myself... I kept my box closed, and the fans were running @ 5000RPM, 50/40C (CPU/MB temp). opening up the case and intensive use (HL2, NFSU2), made the temp go up to 45, fans at 4000. Normal use: 35/30 @ 3200 RPM. On a cold day, i got it down to 28/24 C, 3000 RPM. Less noise  :Wink: 

----------

## Cintra

Sounds like blocked filters to me  :Wink: 

mvh

----------

## tnt

I have brand new Chaintech VNF4 Ultra board with NForce4 Ultra chipset.

In window$ I've tried "SpeedFan" and I was able to control speed of two fans connected to the board. Other two (there's four fan connectors on the board) can not be controled.

But, in gentoo I can't control fans...  :Crying or Very sad: 

I've done sensors-detect and detected IT8712F, the same one "SpeedFand" detected in window$:

```
Probing for `ITE IT8705F / IT8712F / SiS 950'

  Trying address 0x0290... Success!

    (confidence 8, driver `it87')

...

Probing for `ITE 8712F Super IO Sensors'

  Success... found at address 0x0290

```

I have /sys/devices/platform/i2c-0/0-0290/ but there's no pwm* files:

```
titan 0-0290 # ls -la

total 0

drwxr-xr-x  3 root root    0 Mar 13 00:45 .

drwxr-xr-x  4 root root    0 Mar 13 00:45 ..

-rw-r--r--  1 root root 4096 Mar 13 00:45 alarms

-rw-r--r--  1 root root 4096 Mar 13 00:45 detach_state

-rw-r--r--  1 root root 4096 Mar 13 00:45 fan1_div

-r--r--r--  1 root root 4096 Mar 13 00:45 fan1_input

-rw-r--r--  1 root root    0 Mar 13 00:45 fan1_min

-rw-r--r--  1 root root 4096 Mar 13 00:45 fan2_div

-r--r--r--  1 root root 4096 Mar 13 00:45 fan2_input

-rw-r--r--  1 root root    0 Mar 13 00:45 fan2_min

-rw-r--r--  1 root root 4096 Mar 13 00:45 fan3_div

-r--r--r--  1 root root 4096 Mar 13 00:45 fan3_input

-rw-r--r--  1 root root    0 Mar 13 00:45 fan3_min

-r--r--r--  1 root root 4096 Mar 13 00:45 in0_input

-rw-r--r--  1 root root    0 Mar 13 00:45 in0_max

-rw-r--r--  1 root root    0 Mar 13 00:45 in0_min

-r--r--r--  1 root root 4096 Mar 13 00:45 in1_input

-rw-r--r--  1 root root    0 Mar 13 00:45 in1_max

-rw-r--r--  1 root root    0 Mar 13 00:45 in1_min

-r--r--r--  1 root root 4096 Mar 13 00:45 in2_input

-rw-r--r--  1 root root    0 Mar 13 00:45 in2_max

-rw-r--r--  1 root root    0 Mar 13 00:45 in2_min

-r--r--r--  1 root root 4096 Mar 13 00:45 in3_input

-rw-r--r--  1 root root    0 Mar 13 00:45 in3_max

-rw-r--r--  1 root root    0 Mar 13 00:45 in3_min

-r--r--r--  1 root root 4096 Mar 13 00:45 in4_input

-rw-r--r--  1 root root    0 Mar 13 00:45 in4_max

-rw-r--r--  1 root root    0 Mar 13 00:45 in4_min

-r--r--r--  1 root root 4096 Mar 13 00:45 in5_input

-rw-r--r--  1 root root    0 Mar 13 00:45 in5_max

-rw-r--r--  1 root root    0 Mar 13 00:45 in5_min

-r--r--r--  1 root root 4096 Mar 13 00:45 in6_input

-rw-r--r--  1 root root    0 Mar 13 00:45 in6_max

-rw-r--r--  1 root root    0 Mar 13 00:45 in6_min

-r--r--r--  1 root root 4096 Mar 13 00:45 in7_input

-rw-r--r--  1 root root    0 Mar 13 00:45 in7_max

-rw-r--r--  1 root root    0 Mar 13 00:45 in7_min

-r--r--r--  1 root root 4096 Mar 13 00:45 in8_input

-r--r--r--  1 root root 4096 Mar 13 00:45 name

drwxr-xr-x  2 root root    0 Mar 13 00:45 power

-r--r--r--  1 root root 4096 Mar 13 00:45 temp1_input

-rw-r--r--  1 root root    0 Mar 13 00:45 temp1_max

-rw-r--r--  1 root root    0 Mar 13 00:45 temp1_min

-rw-r--r--  1 root root 4096 Mar 13 00:45 temp1_type

-r--r--r--  1 root root 4096 Mar 13 00:45 temp2_input

-rw-r--r--  1 root root    0 Mar 13 00:45 temp2_max

-rw-r--r--  1 root root    0 Mar 13 00:45 temp2_min

-rw-r--r--  1 root root 4096 Mar 13 00:45 temp2_type

-r--r--r--  1 root root 4096 Mar 13 00:45 temp3_input

-rw-r--r--  1 root root    0 Mar 13 00:45 temp3_max

-rw-r--r--  1 root root    0 Mar 13 00:45 temp3_min

-rw-r--r--  1 root root 4096 Mar 13 00:45 temp3_type
```

I'm using "stable" gentoo-dev-sources 2.6.9-r14 on amd64.

Should I use some more recent kernel or what?

 :Rolling Eyes: 

----------

## Small_Penguin

 *tnt wrote:*   

> Probing for `ITE 8712F Super IO Sensors'
> 
>   Success... found at address 0x0290

 

Maybe, this problem can be solved by using lm_sensors-2.9.1, which you probably have to compile and install by yourself (no ebuild for my arch).

----------

## skakz

hi all

i have this i2c modules build in the kernel: eeprom i2c-isa it87 i2c-viapro, so i don't modpbore anything!

sensors works fine:

```

omega linux # sensors

it8712-isa-0290

Adapter: ISA adapter

VCore 1:   +1.66 V  (min =  +1.42 V, max =  +1.57 V)   ALARM

VCore 2:   +0.00 V  (min =  +2.40 V, max =  +2.61 V)   ALARM

+3.3V:     +3.66 V  (min =  +3.14 V, max =  +3.46 V)   ALARM

+5V:       +5.05 V  (min =  +4.76 V, max =  +5.24 V)

+12V:     +12.03 V  (min = +11.39 V, max = +12.61 V)

-12V:     -17.36 V  (min = -12.63 V, max = -11.41 V)   ALARM

-5V:      -6.64 V  (min =  -5.26 V, max =  -4.77 V)   ALARM

Stdby:     +5.08 V  (min =  +4.76 V, max =  +5.24 V)

VBat:      +4.08 V

fan1:     3590 RPM  (min =    0 RPM, div = 8)

fan2:     3276 RPM  (min = 2657 RPM, div = 2)

fan3:        0 RPM  (min = 2657 RPM, div = 2)          ALARM

CPU Temp:    +42°C  (low  =   +15°C, high =   +40°C)   sensor = thermistor

CPU Temp:    +40°C  (low  =   +15°C, high =   +45°C)   sensor = thermistor

Temp3:        -1°C  (low  =   +15°C, high =   +45°C)   sensor = disabled

eeprom-i2c-1-52

Adapter: SMBus Via Pro adapter at e800

Memory type:            DDR SDRAM DIMM

Memory size (MB):       512

```

i have a7v600-x MB 

sensors version 2.9.0 with libsensors version 2.9.0

2.6.11 kernel

CoolerMaster ASBV83 JET 7 with fan control knob that controls fan speeds from my frontal plate

now i want to configure dynamic fan speed so i do:

```

omega root # pwmconfig

This program will search your sensors for pulse width modulation (pwm)

controls, and test each one to see if it controls a fan on

your motherboard. Note that many motherboards do not have pwm

circuitry installed, even if your sensor chip supports pwm.

We will attempt to briefly stop each fan using the pwm controls.

The program will attempt to restore each fan to full speed

after testing. However, it is ** very important ** that you

physically verify that the fans have been to full speed

after the program has completed.

Found the following PWM controls:

   0-0290/pwm1

   0-0290/pwm2

   0-0290/pwm3

Found the following fan sensors:

   0-0290/fan1_input     current speed: 3668 RPM

   0-0290/fan2_input     current speed: 3276 RPM

   0-0290/fan3_input     current speed: 0 ... skipping!

Warning!!! This program will stop your fans, one at a time,

for approximately 5 seconds each!!!

This may cause your processor temperature to rise!!!

If you do not want to do this hit control-C now!!!

Hit return to continue:

Testing pwm control 0-0290/pwm1 ...

  0-0290/fan1_input ... speed was 3668 now 3668

    no correlation

  0-0290/fan2_input ... speed was 3276 now 3276

    no correlation

No correlations were detected.

There is either no fan connected to the output of 0-0290/pwm1,

or the connected fan has no rpm-signal connected to one of

the tested fan sensors. (Note: not all motherboards have

the pwm outputs connected to the fan connectors,

check out the hardware database on http://www.almico.com/forumindex.php)

Did you see/hear a fan stopping during the above test (n)? n

...

```

yes.. i didn't hear anything...

```

...

Testing pwm control 0-0290/pwm2 ...

  0-0290/fan1_input ... speed was 3668 now 3668

    no correlation

  0-0290/fan2_input ... speed was 3276 now 3276

    no correlation

No correlations were detected.

There is either no fan connected to the output of 0-0290/pwm2,

or the connected fan has no rpm-signal connected to one of

the tested fan sensors. (Note: not all motherboards have

the pwm outputs connected to the fan connectors,

check out the hardware database on http://www.almico.com/forumindex.php)

Did you see/hear a fan stopping during the above test (n)? n

...

```

same...

```

....

Testing pwm control 0-0290/pwm3 ...

  0-0290/fan1_input ... speed was 3668 now 3668

    no correlation

  0-0290/fan2_input ... speed was 3276 now 3308

    no correlation

No correlations were detected.

There is either no fan connected to the output of 0-0290/pwm3,

or the connected fan has no rpm-signal connected to one of

the tested fan sensors. (Note: not all motherboards have

the pwm outputs connected to the fan connectors,

check out the hardware database on http://www.almico.com/forumindex.php)

Did you see/hear a fan stopping during the above test (n)? n

...

```

did you trust? same...

```

...

Testing is complete.

Please verify that all fans have returned to their normal speed.

The fancontrol script can automatically respond to temperature changes

of your system by changing fanspeeds.

Do you want to set up its configuration file now (y)? y

What should be the path to your fancontrol config file (/etc/fancontrol)?

/etc/fancontrol does not exist, shall I create it now (y)? y

chown: `root.root' syntax is obsolete; use `:' since this will be removed in the future

Loading configuration from /etc/fancontrol ...

Select fan output to configure, or other action:

1) Change INTERVAL     3) Save and quit

2) Just quit           4) Show configuration

select (1-n): 4

Common Settings:

INTERVAL=10

select (1-n):

omega root #

```

WTF?? my config is 1 line????

so  i decided to make my own config...

here it is:

```

omega root # cat /etc/fancontrol

INTERVAL=10

FCTEMPS=*-0290/pwm2=*-0290/temp2_input *-0290/pwm1=*-0290/temp1_input

FCFANS=*-0290/pwm2=*-0290/fan2_input *-0290/pwm1=*-0290/fan1_input

MINTEMP=*-0290/pwm2=38 *-0290/pwm1=40

MAXTEMP=*-0290/pwm2=50 *-0290/pwm1=55

MINSTART=*-0290/pwm2=0 *-0290/pwm1=0

MINSTOP=*-0290/pwm2=0 *-0290/pwm1=0

```

but running fancontrol doesn't produce any effect on my fans  :Sad:   :Sad:   :Sad:   :Sad:   :Sad:   :Sad:   :Sad:   :Sad: 

```

omega root # fancontrol

Loading configuration from /etc/fancontrol ...

Common settings:

  INTERVAL=10

Settings for *-0290/pwm2:

  Depends on *-0290/temp2_input

  Controls *-0290/fan2_input

  MINTEMP=38

  MAXTEMP=50

  MINSTART=0

  MINSTOP=0

Settings for *-0290/pwm1:

  Depends on *-0290/temp1_input

  Controls *-0290/fan1_input

  MINTEMP=40

  MAXTEMP=55

  MINSTART=0

  MINSTOP=0

Enabling PWM on fans...

Starting automatic fan control...

```

even if i force 0 in pwm1 or pwm2 nothing happened  :Crying or Very sad: 

```

omega root # cat /sys/bus/i2c/devices/0-0290/pwm1

255

omega root # echo 0 > /sys/bus/i2c/devices/0-0290/pwm1

omega root # sensors | grep fan1

fan1:     3590 RPM  (min =    0 RPM, div = 8)

omega root #

```

This is a campaign in favor of my ears.

We plead you to participate

----------

## skakz

*cabunk*

----------

## <3

 *alkan wrote:*   

> fancontrol works beautifully on my machine. My fans(CPU and PS) are quiet and only kick in under heavy load. I added following init script (/etc/init.d/fancontrol)
> 
> ```
> 
> start() {
> ...

 

Sorry for the newb question but I don't know how to get this init script working. I made a file called /etc/init.d/fancontrol and copied/pasted your code into that file then I did a 

```

rc-update add fancontrol default

```

and I get this error

```
#rc-update add fancontrol default

 * fancontrol not executable; skipping

```

 can someone tell me what this means?

----------

## PaulBredbury

 *<3 wrote:*   

>  * fancontrol not executable; skipping

 

To make it executable:

```
chmod +x /etc/init.d/fancontrol
```

----------

## <3

thx

----------

## blossa

 *alkan wrote:*   

> fancontrol works beautifully on my machine. My fans(CPU and PS) are quiet and only kick in under heavy load. I added following init script (/etc/init.d/fancontrol)
> 
> ```
> 
> start() {
> ...

 

I don't get it... The init script don't work. If I try to start it nothing happens, no error messages, nothing. But if I run /usr/sbin/fancontrol fancontrol starts and works great.

Any hints?

Thnx!

/Anders

----------

## <3

are you sure you did a

```
rc-update add fancontrol default
```

if so what happens when you do a

```
/etc/init.d/fancontrol start
```

----------

## blossa

Yes, I did:

```
rc-update add fancontrol default
```

rc-update -s confirms it.

and here is the output:

```

# /etc/init.d/fancontrol start

#

```

but if I do:

```
 # /usr/sbin/fancontrol

Loading configuration from /etc/fancontrol ...

Common settings:

  INTERVAL=10

Settings for *-0290/pwm2:

  Depends on *-0290/temp2_input

  Controls *-0290/fan2_input

  MINTEMP=45

  MAXTEMP=60

  MINSTART=0

  MINSTOP=0

Settings for *-0290/pwm1:

  Depends on *-0290/temp1_input

  Controls *-0290/fan1_input

  MINTEMP=45

  MAXTEMP=60

  MINSTART=0

  MINSTOP=0

Enabling PWM on fans...

Starting automatic fan control...

```

----------

## blossa

I don't know if it helps but here is the output from rc-status:

```
 # rc-status

Runlevel: default

 xdm                                                                 [ started ]

 cupsd                                                               [ started ]

 local                                                               [ started ]

 mysql                                                               [ started ]

 samba                                                               [ started ]

 lm_sensors                                                          [ started ]

 domainname                                                          [ started ]

 net.lo                                                              [ started ]

 net.eth0                                                            [ started ]

 splash                                                              [ started ]

 apache2                                                             [ started ]

 fancontrol                                                          [ stopped ]

#

```

----------

## Deepak420

This line needs to be added to the top of the script:

```
#!/sbin/runscript
```

----------

## fly-a-lot

Hi guys,

I hope somebody is still watching this topic  :Smile: 

After quite some time and after following a couple of tricks I finally got the PWM interface for the fans running on my mainboard (Asus A8N-E). After taking that hurdle I founf this thread and liked the idea to start fancontrol with the start-stop-daemon as suggested before.

Unfortunately I ran into some unexpected problems. But let me first show you my /etc/init.d/fancontrol

```
#!/sbin/runscript

start() {

   ebegin "Starting fancontrol"

   start-stop-daemon --start --background --pidfile /var/run/fancontrol.pid --exec /usr/sbin/fancontrol

   eend $? "Failed to start fancontrol"

}

stop() {

   ebegin "Stopping fancontrol"

   start-stop-daemon --stop --pidfile /var/run/fancontrol.pid

   eend $? "Failed to stop fancontrol"

}
```

That is pretty staightforward and basically what has been suggested before.

Now, when I start fancontrol with 

```
/etc/init.d/fancontrol start
```

 fancontrol starts and works fine. The fan speed is reduced and everything works as expected. Stopping fancontrol sets the fan to full speed - everything is working fine so far.

But when I do  *Quote:*   

> rc-update add fancontrol default

  and reboot the system, the following happens.

- on the boot screen a message appears that fancontrol starts ok

- immediately after booting I do the following checks:

     1. fan is running at full speed: fancontrol appears to be not running

     2. /var/run/fancontrol.pid contains a different pid than the one I checked before I rebooted the system

     3. can't find a process with the pid shown in fancontrol.pid

Conclusion: fancontrol started but aborted immediately for some reason. No error message, nothing.

Has anybody an idea what is going on here?

Thanks!!!

----------

## r8dhex

I modified the init script like this. This was because when booting, fancontrol would fail since lm_sensors wasn't running yet, adding depend() makes sure that lm_sensors starts first before fancontrol

```
#!/sbin/runscript

depend() {

        need lm_sensors

}

start() {

        ebegin "Starting fancontrol"

        start-stop-daemon --start  --background --pidfile /var/run/fancontrol.p$

        eend $? "Failed to start fancontrol"

}

stop() {

        ebegin "Stopping fancontrol"

        start-stop-daemon --stop --pidfile /var/run/fancontrol.pid

        eend $? "Failed to stop fancontrol"

}

```

----------

## fly-a-lot

Oh, you are right, r8dhex!

depend() was indeed missing   :Embarassed: 

Just to close the case, after adding depend() to /etc/init.d/fancontrol

```
/sbin/depscan.sh --update
```

needs to be run.

----------

## fataki

I managed to get fancontrol to work, but the fan keeps stopping for few seconds once a minute or so. I would like the fan to always stay at least around 1000rpm. I tried to set MINTEMP to very low and adjust MINSTART and MINSTOP, but the fan always wants to stop.

My normal idle temperature is 45 degrees when the fan spins at around 1000rpm (and for a second once in a while) and <38 when fan's at full speed.

Here's /etc/fancontrol

```
INTERVAL=10

FCTEMPS= 9191-0290/pwm1=9191-0290/temp1_input

FCFANS= 9191-0290/pwm1=9191-0290/fan1_input

MINTEMP= 9191-0290/pwm1=35

MAXTEMP= 9191-0290/pwm1=100

MINSTART= 9191-0290/pwm1=100

MINSTOP= 9191-0290/pwm1=0
```

----------

## alkan

run the fancotrol script manually like:

```
DEBUG=1 /usr/sbin/fancontrol
```

and watch what is going on with some values. 

Your fan might want to stop if your temperature goes below minimum temperature. quoting from /usr/sbin/fancontrol script

```
 if (( $tval <= $mint ))

                  then pwmval=0 # at specified mintemp shut fan off

                elif (( $tval >= $maxt ))

                  then pwmval=255 # at specified maxtemp switch to 100%

                else

                  # calculate the new value from temperature and settings 

                   ....

                   ....

```

You see if temperature goes below minimum temp, it shuts down the fan and vice versa. You said you tried setting the min temperature to very low, there might be a glitch reading the temperature, so you watch temperature output with DEBUG=1.

----------

## fataki

 *fataki wrote:*   

> I managed to get fancontrol to work, but the fan keeps stopping for few seconds once a minute or so. I would like the fan to always stay at least around 1000rpm. I tried to set MINTEMP to very low and adjust MINSTART and MINSTOP, but the fan always wants to stop.
> 
> 

 

I forgot to mention, that fancontrol didn't start up correctly after doing 'rc-update add fancontrol default' and I had to start it manually. After I did 'killall -9 fancontrol' the manually started fancontrol started to work perfectly, so there must have been multiple fancontrol prosesses running.

----------

