make lm-sensors work with kernel 2.6.31 // ubuntu 9.10

i recently tried to get some information about the temperature of my cpu and the speeds of the fans in my pc. the programm of choice to do this with ubuntu is lm-sensors. but due to a well known bug with kernel 3.6.31 (which is part of current ubuntu karmic), lm-sensors doesn’t work flawlessly with my mainboard, an asus m3a – and it seems that other mainboards (especially asus) are also affected.
the most reliable way to fix this, is to install the most recent version of lm-sensors from the sources. it took me some time, to get all needed information to do that, so here’s a step-by-step tutorial.

you can download the sources from the download-page of the lm-sensors-project or just by typing this in a terminal window:

wget http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-3.1.2.tar.bz2

now you should unpack the archive with the sources by typing and change to the extracted directory:

tar xjf lm_sensors-3.1.2.tar.bz2<br />
cd lm_sensors-3.1.2

before you proceed, you should resolve all dependencies for the build-process by typing:

sudo apt-get install build-essential gcc flex bison librrd-dev rrdtool perl checkinstall

installing it is then relatively easy, just type:

sudo checkinstall -D

answer the first questions by just pressing enter until it your terminal looks like this:

 Das Paket wird entsprechend dieser Vorgaben erstellt:

0 -  Maintainer: [ boundaryfunctions ]
1 -  Summary: [ Package created with checkinstall 1.6.1 ]
2 -  Name:    [ lm-sensors ]
3 -  Version: [ 3.1.2 ]
4 -  Release: [ 1 ]
5 -  License: [ GPL ]
6 -  Group:   [ checkinstall ]
7 -  Architecture: [ i386 ]
8 -  Source location: [ lm_sensors-3.1.2 ]
9 -  Alternate source location: [  ]
10 - Requires: [  ]
11 - Provides: [ lm-sensors ]

Geben Sie die betreffende Nummer ein, um die Vorgaben zu ändern:

here you should type “3” and input “1:3.1.2-fromsources“. this way, the automatic updates will recognise your installation of lm-sensors as a newer version than in the ubuntu sources – and stop bothering you to “update” to that older version. however, if there will be a newer version of lm-tools in any of your packetsources, update will install it.

then you should type in “10” and answer the prompt with “perl,rrdtool“, so your packagemanagement knows,  that lm-sensors depends on perl and rrdtool to work properly.
your screen should by now look like this:

0 -  Maintainer: [ boundaryfunctions ]
1 -  Summary: [ Package created with checkinstall 1.6.1 ]
2 -  Name:    [ lm-sensors ]
3 -  Version: [ 1:3.1.2-fromsources ]
4 -  Release: [ 1 ]
5 -  License: [ GPL ]
6 -  Group:   [ checkinstall ]
7 -  Architecture: [ i386 ]
8 -  Source location: [ lm_sensors-3.1.2 ]
9 -  Alternate source location: [  ]
10 - Requires: [ perl,rrdtool ]
11 - Provides: [ lm-sensors ]

now press enter a last time and after loads of terminal-output, lm-sensors should be installed. let it detect your sensors with:

sudo sensors-detect

you  should just enter yes to all the questions it asks, especially when it’s about adding modules to your /etc/modules. if it did then one last step would be reloading the kernel-modules:

sudo /etc/init.d/module-init-tools restart

you are finally done! enter “sensors” in a terminal to let the values of your pcs inner life come to the desktop. it might be handy to use some frontend to lm-sensors like ksensors, xsensors or computertemp.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s