# Fan control via lm_sensors and pwmconfig

## certem

Hi all

I couldn't engage pwmconfig with my fans

sensors-detect

```
baks ~ # sensors-detect

# sensors-detect revision 5984 (2011-07-10 21:22:53 +0200)

This program will help you determine which kernel modules you need

to load to use lm_sensors most effectively. It is generally safe

and recommended to accept the default answers to all questions,

unless you know what you're doing.

Some south bridges, CPUs or memory controllers contain embedded sensors.

Do you want to scan for them? This is totally safe. (YES/no): y

Silicon Integrated Systems SIS5595...                       No

VIA VT82C686 Integrated Sensors...                          No

VIA VT8231 Integrated Sensors...                            No

AMD K8 thermal sensors...                                   No

AMD Family 10h thermal sensors...                           No

AMD Family 11h thermal sensors...                           No

AMD Family 12h and 14h thermal sensors...                   No

AMD Family 15h thermal sensors...                           No

AMD Family 15h power sensors...                             No

Intel digital thermal sensor...                             No

Intel AMB FB-DIMM thermal sensor...                         No

VIA C7 thermal sensor...                                    No

VIA Nano thermal sensor...                                  No

Some Super I/O chips contain embedded sensors. We have to write to

standard I/O ports to probe them. This is usually safe.

Do you want to scan for Super I/O sensors? (YES/no): y

Probing for Super-I/O at 0x2e/0x2f

Trying family `National Semiconductor/ITE'...               No

Trying family `SMSC'...                                     No

Trying family `VIA/Winbond/Nuvoton/Fintek'...               No

Trying family `ITE'...                                      Yes

Found `ITE IT8705F Super IO Sensors'                        Success!

    (address 0x290, driver `it87')

Probing for Super-I/O at 0x4e/0x4f

Trying family `National Semiconductor/ITE'...               No

Trying family `SMSC'...                                     No

Trying family `VIA/Winbond/Nuvoton/Fintek'...               No

Trying family `ITE'...                                      Yes

Found `ITE IT8705F Super IO Sensors'                        Success!

    (address 0x290, driver `it87')

Some systems (mainly servers) implement IPMI, a set of common interfaces

through which system health data may be retrieved, amongst other things.

We first try to get the information from SMBIOS. If we don't find it

there, we have to read from arbitrary I/O ports to probe for such

interfaces. This is normally safe. Do you want to scan for IPMI

interfaces? (YES/no): y

Probing for `IPMI BMC KCS' at 0xca0...                      No

Probing for `IPMI BMC SMIC' at 0xca8...                     No

Some hardware monitoring chips are accessible through the ISA I/O ports.

We have to write to arbitrary I/O ports to probe them. This is usually

safe though. Yes, you do have ISA I/O ports even if you do not have any

ISA slots! Do you want to scan the ISA I/O ports? (yes/NO): y

Probing for `National Semiconductor LM78' at 0x290...       No

Probing for `National Semiconductor LM79' at 0x290...       No

Probing for `Winbond W83781D' at 0x290...                   No

Probing for `Winbond W83782D' at 0x290...                   No

Lastly, we can probe the I2C/SMBus adapters for connected hardware

monitoring devices. This is the most risky part, and while it works

reasonably well on most systems, it has been reported to cause trouble

on some systems.

Do you want to probe the I2C/SMBus adapters now? (YES/no): y

Using driver `i2c-viapro' for device 0000:00:11.0: VIA Technologies VT8237 South Bridge

Next adapter: SMBus Via Pro adapter at 0500 (i2c-0)

Do you want to scan it? (yes/NO/selectively): y

Client found at address 0x50

Probing for `Analog Devices ADM1033'...                     No

Probing for `Analog Devices ADM1034'...                     No

Probing for `SPD EEPROM'...                                 Yes

    (confidence 8, not a hardware monitoring chip)

Probing for `EDID EEPROM'...                                No

Client found at address 0x51

Probing for `Analog Devices ADM1033'...                     No

Probing for `Analog Devices ADM1034'...                     No

Probing for `SPD EEPROM'...                                 Yes

    (confidence 8, not a hardware monitoring chip)

Now follows a summary of the probes I have just done.

Just press ENTER to continue: 

Driver `it87':

  * ISA bus, address 0x290

    Chip `ITE IT8705F Super IO Sensors' (confidence: 9)

Do you want to overwrite /etc/conf.d/lm_sensors? Enter s to specify other file name?

  (yes/NO/s): y

Done.

You should now start the lm_sensors service to load the required

kernel modules.

baks ~ # 

```

sensors (I don't why it's done in user but since the guides did it that way I also ran it in user)

```
yavuz@baks /root $ sensors

acpitz-virtual-0

Adapter: Virtual device

temp1:        +19.0 C  (crit = +85.0 C)

it87-isa-0290

Adapter: ISA adapter

in0:          +1.50 V  (min =  +0.00 V, max =  +4.08 V)

in1:          +1.58 V  (min =  +0.00 V, max =  +4.08 V)

in2:          +3.18 V  (min =  +0.00 V, max =  +4.08 V)

in3:          +2.96 V  (min =  +0.00 V, max =  +4.08 V)

in4:          +2.61 V  (min =  +0.00 V, max =  +4.08 V)

in5:          +1.58 V  (min =  +0.00 V, max =  +4.08 V)

in6:          +1.79 V  (min =  +0.00 V, max =  +4.08 V)

in7:          +2.80 V  (min =  +0.00 V, max =  +4.08 V)

Vbat:         +3.22 V  

fan1:        11250 RPM  (min =    0 RPM)

fan2:           0 RPM  (min =    0 RPM)

temp1:        +19.0 C  (low  = +127.0 C, high = +86.0 C)  sensor = thermal diode

temp2:        +30.0 C  (low  =  -1.0 C, high = +127.0 C)  sensor = thermistor

temp3:        +30.0 C  (low  =  -1.0 C, high = +127.0 C)  sensor = thermistor

intrusion0:  OK

yavuz@baks /root $ 
```

pwmconfig (because I hear no stop or slowdown I hit "n")

```

baks ~ # pwmconfig

# pwmconfig revision 5857 (2010-08-22)

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 devices:

   hwmon0 is acpitz

   hwmon1/device is it87

Found the following PWM controls:

   hwmon1/device/pwm1

   hwmon1/device/pwm2

   hwmon1/device/pwm3

Giving the fans some time to reach full speed...

Found the following fan sensors:

   hwmon1/device/fan1_input     current speed: 11250 RPM

   hwmon1/device/fan2_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 hwmon1/device/pwm1 ...

  hwmon1/device/fan1_input ... speed was 11250 now 11250

    no correlation

No correlations were detected.

There is either no fan connected to the output of hwmon1/device/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

Testing pwm control hwmon1/device/pwm2 ...

  hwmon1/device/fan1_input ... speed was 11250 now 11250

    no correlation

No correlations were detected.

There is either no fan connected to the output of hwmon1/device/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

Testing pwm control hwmon1/device/pwm3 ...

  hwmon1/device/fan1_input ... speed was 11250 now 11250

    no correlation

No correlations were detected.

There is either no fan connected to the output of hwmon1/device/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

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)? 

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): 3

Saving configuration to /etc/fancontrol...

Configuration saved

baks ~ # 

```

boot.conf (I had to add acpi_enforce_resources=lax)

```
title Gentoo Linux 3.10.7

root (hd0,0)

kernel /boot/kernel-3.10.7-gentoo root=/dev/sda3 acpi_enforce_resources=lax

#initrd /boot/initramfs-genkernel-x86-2.6.24-gentoo-r5
```

/etc/fancontrol

```
# Configuration file generated by pwmconfig, changes will be lost

INTERVAL=10

DEVPATH=

DEVNAME=

FCTEMPS=

FCFANS=

MINTEMP=

MAXTEMP=

MINSTART=

MINSTOP=

```

The kernel: (cat "/boot/config-`uname -r`" | wgetpaste) (This is a wrong output. The correct kernel output is below)

http://bpaste.net/show/147664/

The kernel: (cat /usr/src/linux/.config |wgetpaste )

http://bpaste.net/show/147910/

The dmidecode (dmidecode |wgetpaste)

http://bpaste.net/show/147665/

Edit: I added the kernel and dmidecode outputs to pastebin.

Edit: 2 The kernel output was wrong. I added the correct output.Last edited by certem on Fri Nov 08, 2013 4:25 pm; edited 1 time in total

----------

## mgranet

 *certem wrote:*   

> # CONFIG_SENSORS_IT87 is not set

 

I would start there. And while you are in there, you may want to enable your cpu thermal driver.

EDIT: I am also guessing you have hyperthreading disabled for overclocking? 1.5 to 2.8? Dayum.

----------

## certem

mgranet thank you for your answer.

I checked the  *Quote:*   

> CONFIG_SENSORS_IT87

  and it's already set to "y". Sorry.  I guess there must be some action to be done before (

```
cat "/boot/config-`uname -r`" | wgetpaste
```

).

Therefore I tried to produce correct output of my kernel with   

```
cat /usr/src/linux/.config |wgetpaste 
```

and it's below.

http://bpaste.net/show/147910/

Not for overclocking but I didn't enable "symmetric multi-processing support" in my kernel. 

As far as I got from what I read in the internet my cpu doesn't support lm_sensors but I should be able to use lm_sensors through  *Quote:*   

> PC I2C/SMBUS BUS DRIVERS

 .

Note: I added the correct kernel output to the original post and I marked the previous kernel output as wrong.

----------

## BitJam

I think this is the problem: *certem wrote:*   

> acpi_enforce_resources=lax 

 

I went through the same thing with my ASUS M4A78 PLUS motherboard.  Some years ago I added that boot option so I could still control the fans myself.  With newer kernels I've had to give up that boot option and I now let BIOS control my fans.  So far it seems fine temperature-wise.  I had to give up using the module that gave me pwm control (I forget what it was called) and I'm using asus_atk0110 instead which does not provide pwm.

My guess is that they added the acpi_enforce_resources=lax boot parameter before it was really needed or really dangerous to give people time to make a transition.  But that was some years ago so maybe they are now figuring people have made the transition so using that boot parameter has more of a negative impact.

----------

