LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 08-15-2006, 05:49 AM   #1
krussell
Member
 
Registered: Jul 2003
Location: dhaka
Distribution: Slackware 11 (fixed), MEPIS
Posts: 241

Rep: Reputation: 30
Enabling lm-sensors in Dapper Drake


Hello :-)
Anybody used lm-sensors in Ubuntu Dapper? i need some help on it.
firstly, while botting the 'settingup sensor limit" fails.
secondly, when i try "sensors-detect" the system suggests that i use mknod/mkdev to create /dev/something (i am in a window$ pc now).
what should i do to enable lm-sensors?
 
Old 08-15-2006, 10:52 PM   #2
BrianK
Senior Member
 
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Rep: Reputation: 51
I'd like to take credit for this, but I found it on the Ubuntu forum:

Quote:
Howto Install and Configure lm-sensors on Ubuntu
========================

1. Install lm-sensors using apt-get or the Synaptic GUI.

sudo apt-get install lm-sensors


2. Run the mkdev.sh script in the lm-sensors source. It is extacted below:

a. Copy the script file below to a text editor and save it to a file named mkdev.sh.

#!/bin/bash

# Here you can set several defaults.

# The number of devices to create (max: 256)
NUMBER=32

# The owner and group of the devices
OUSER=root
OGROUP=root
# The mode of the devices
MODE=600

# This script doesn't need to be run if devfs is used
if [ -r /proc/mounts ] ; then
if grep -q "/dev devfs" /proc/mounts ; then
echo "You do not need to run this script as your system uses devfs."
exit;
fi
fi

i=0;

while [ $i -lt $NUMBER ] ; do
echo /dev/i2c-$i
mknod -m $MODE /dev/i2c-$i c 89 $i || exit
chown "$OUSER:$OGROUP" /dev/i2c-$i || exit
i=$[$i + 1]
done
#end of file

b. Make the file executable:

chmod 755 mkdev.sh

c. Run mkdev.sh from the current directory

sudo ./mkdev.sh


3. Now run sensors-detect and answer YES to all YES/no questions. I generally use the ISA bus rather than the SMBus bus, your choice to this question!. At the end of the detection phase, a list of modules that needs to be loaded will displayed. You will need to write these down or print the list for the next steps.

sudo sensors-detect

Below is an example of results from sensors-detect:
#************************************************* *****************************
To make the sensors modules behave correctly, add these lines to
/etc/modules:

#----cut here----
# I2C adapter drivers
i2c-viapro
i2c-isa
# I2C chip drivers
eeprom
it87
#----cut here----

Then, run /etc/init.d/module-init-tools

To make the sensors modules behave correctly, add these lines to
/etc/modprobe.d/local and run update-modules:

#----cut here----
# I2C module options
alias char-major-89 i2c-dev
#----cut here----
#************************************************* *******************************


4. In this example, we add the modules in reverse order (order is critical!) in "/etc/modules".

#************************************************* ***********************
# /etc/modules: kernel modules to load at boot time.
#
# This file should contain the names of kernel modules that are
# to be loaded at boot time, one per line. Comments begin with
# a "#", and everything on the line after them are ignored.

psmouse
mousedev
ide-cd
ide-disk
ide-generic
lp

#For lm-sensors, i2c modules
it87
i2c-viapro
i2c-isa

#end of file!
#************************************************* ****************


4. I found that there was no "/etc/modprobe.d/local" and that "alias char-major-89 i2c-dev" was already listed in "/etc/modprobe.d/aliases". So, nothing to do here.


5.Now load the modules manually using modprobe and update the dependencies.

sudo modprobe i2c-sensor
sudo modprobe i2c-viapro
sudo modprobe i2c-isa
sudo modprobe it87

sudo depmod -a <may not be needed!>
sudo update-modules <may not be needed!>


6. Now test the sensor output using the lm-sensors utility "sensors".

sensors
the important bit is #2. Without it, sensors-detect doesn't work. Kinda lame that Ubuntu comes this way. such is life. Once it's done, just follow the prompts in sensors deetct & you shoudl be on your way.

note: I've never found a computer that needed to modprobe eeprom to make sensors work. If anything, eeprom garbles the output, so I tend to leave it out even though sensors detect almost always puts it in.
 
Old 08-20-2006, 01:33 AM   #3
krussell
Member
 
Registered: Jul 2003
Location: dhaka
Distribution: Slackware 11 (fixed), MEPIS
Posts: 241

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by BrianK
I'd like to take credit for this, but I found it on the Ubuntu forum:
It worked like a charm.
From my end FULL CREDIT to you for this.
Thanks BrianK.
 
Old 02-25-2008, 07:52 AM   #4
gauthamk
Member
 
Registered: Jun 2007
Location: Chennai-India
Posts: 39

Rep: Reputation: 15
Wink lm-sensor worked

Thank for u r help.Good work
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble enabling Broadcom 4318 with Dapper Drake AlanStempel Linux - Laptop and Netbook 4 07-23-2006 06:17 PM
LXer: Review: How Dapper is Drake? LXer Syndicated Linux News 0 06-29-2006 10:54 AM
Planning To Install Dapper Drake crash_override_me Ubuntu 16 06-26-2006 12:55 PM
Dapper Drake brianthegreat Ubuntu 19 06-06-2006 05:11 AM
Dapper Drake Packages SoCalNewbie Ubuntu 1 04-20-2006 10:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 03:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration