Lm sensors

This guide describes how to access and display temperature, fan speeds and power voltage information available on most motherboards. The application that makes this possible is lm_sensors.

Refer to your hardware's specific wiki page or the forum for more information.

Setup
To use sensors, there are two components you will require, the userspace tools, lm_sensors, and some kernel modules.

The usual install procedure goes as follows:


 * 1) Install all of the modules into the kernel
 * 2) Install lm_sensors
 * 3) Use the lm_sensors auto-detect script to determine required modules
 * 4) Un-install non-required modules
 * 5) Configure sensor names and properties

Kernel
Unless you know exactly which drivers are needed (You can check supported chipsets at lm_sensors home page), activate everything under 'I2C support' and 'Hardware Monitoring Support' for now. The sensors-detect will let you know which ones you need:

Radeon Cards
See the radeon guide for information.

Userspace
Install lm_sensors:

If you would like to use monitoring programs, add the USE flag lm_sensors to your /etc/make.conf:

You may have to update your system. Programs like ksysguard utilize lm_sensors:

Detection
Log in as root and run:

Go through the detection process. At the end sensors-detect writes a new. There you find most modules you need; the rest can be removed again from the kernel. Some modules are not automatically detected, such as coretemp for more recent processors.

You start sensor monitoring by starting the init script:

sensors shows you now the temp, fan speed etc. If you see nothing, look at the troubleshooting section.

If you want to start at sensor monitoring at boot time, add lm_sensors to your runlevel:

Configuration
By default, lm_sensors does not use any English names for any of the sensors - or it may only have English names for some of them. You can change the names, as well as disable sensors, and change the mathematics that are used by editing the configuration file. This file contains a lot of comments.

The easiest way change your settings, is to run sensors, and note down the top line returned (the sensor chip), then edit /etc/sensors.conf, and search for the first part of the name. For example, if your sensor chip is a w83781d-isa-0290, a search for w83781d, will return something like:

Search Result

then below this line, will be the config lines for that chip.

An example config is:

This configuration sets some English names, sets ignore on the unused fans, and contains the default calculations for some of the voltages. Most of these values were not changed, except the addition of the labels for CPU temp and CPU fan, and the ignore lines for the fans and temps not in use.

pwmconfig
Once you have lm sensors properly configured, run pwmconfig to test and configure speed control of your fans:

Follow the instructions in pwmconfig to set up basic speeds.

The default configuration options should create a new file,.

Follow the instructions in pwmconfig to set up speeds.

Tweaking
If you want more control, you will probably need to tweak the generated configuration. Here is a sample configuration file:

The rest of the configuration file is split into (at least) two values per configuration option. Each configuration option first points to a PWM device which is written to which sets the fan speed. The second "field" is the actual value to set. This allows you to monitor and control multiple fans and temperatures (if your pc supports it).
 * INTERVAL: how often the daemon should poll cpu temps and adjust fan speeds. Interval is in seconds.
 * FCTEMPS: The temperature input device to read for cpu temperature. The above example corresponds to.
 * FCFANS: The current fan speed, which can be read (like the temperature) in
 * MINTEMP: The temperature (&deg;C) at which to SHUT OFF the cpu fan. Efficicent CPU's often will not need a fan while idling.  Be sure to set this to a temperature that you know is safe.  Setting this to 0 is not reccommended, use a sane value.
 * MAXTEMP: The temperature (&deg;C) at which to spin the fan at it's MAXIMUM speed. This should be probably be set to perhaps 10 or 20 degrees (&deg;C) below your CPU's critical/shutdown temperature.  Setting it closer to MINTEMP will result in higher fan speeds overall.
 * MINSTOP: The PWM value at which your fan stops spinning. Each fan is a little different.  Power tweakers can:

and then watch the cpu fan. When it stops, use this value. There are also two settings fancontrol needs to verify the configuration file is still up to date. The lines start with the setting name and a equality sign, followed by groups of hwmon-class-device=setting, seperated by spaces. You need to specify each setting for each hwmon class device you use anywhere in the config, or fancontrol wont work.
 * MINSTART: The PWM value at which your fan starts to spin again. This is often a higher value than MINSTOP as more voltage is required to overcome inertia.
 * DEVPATH: Sets the physical device. You can determine this by executing the command


 * DEVNAME: Sets the name of the device. Try

fancontrol
Try to run fancontrol:

Fine tune fan speed
If you'd like to see how various pwm values translate into fan RPM. As you can see, this script assumes that you have fancontrol running and disables it for you, then re-enables it when you're finished. Enjoy.

Run this script:

Monitoring
If you would like regular status reports, you will need a monitoring daemon.

Sensord
sensord is a daemon that logs the monitoring output from lm_sensors to syslog. To enable building lm_sensors with sensord, enable the USE flag:

Then run:

To start sensord and add it to start at boot:

Unfortunately, this adds unwanted clutter to. Assuming that you are using the gentoo's default logger syslog-ng, the following recipe will filter out the events into their own log file :

It's recommended that each line be placed in the appropriate area in the file for consistency sake. It is evident what this means after reviewing the  file. Daemon is now the default facility that is used by sensord. This used to be local4. Additional information is in the man page for sensord.

If you have added rules to the syslog-ng.conf file and want to enable them and start logging to  immediately, restart syslog-ng (this should automatically also restart sensord):

For more information on configuration of sensord, such as changing the logging interval time or reporting facility, refer to the manual pages on the sensord command.

KDE

 * SuperKaramba
 * KSim
 * KSensors
 * Kima
 * KSysGuard

Gnome

 * hardware-monitor
 * ComputerTemp
 * GAI Temp

Other

 * Conky
 * GKrellM

"My sensors do not show up!" or "My sensors are not detected!"

 * Check the bug reports. If this won't help, you can try experimenting with the modules and their parameters or send the lm_sensors' guys a bug report.

My sensors always show 10 degrees too much!

 * You may need to edit /etc/sensors.conf as appropriate.

My sensor data needs to be divided by 2!

 * Edit /etc/sensors.conf and find uncommented compute temp for cpu appropriate for your chip, then replace 2 with 1 after the letters @* in the same line.

sensors-detect spits out No i2c device files found. Use prog/mkdev/mkdev.sh to create them!

 * Try running modprobe i2c-dev; sensors-detect, if that fails, try google.

sensors-detect is unable to find some modules! Why are these modules missing?

 * Make sure you activated the according option when configuring the kernel and be sure to read point 1.!

The w83627hf module triggers high fan speed.

 * Try to solve this by modprobe w83627hf init=0

sensord won't start. In /var/log/syslog it says 'GPIO5 disabled, no VID function'

 * Add ignore vid to /etc/sensors.conf.

Sensor device detected by sensors-detect but not displayed with sensors

 * You might need correct I2C adapter layer driver which provides access to I2C bus to which sensor device is connected (e.g. some manufacturers connect sensor device on the same I2C bus which used by graphic card driver). Please check kernel configuration.

LM-Sensors