Home > DIY, ubuntu > Enabling hardware sensors in Ubuntu 6.06 Dapper Drake

Enabling hardware sensors in Ubuntu 6.06 Dapper Drake

This procedure is adapted from here.

sudo su
apt-get install lm-sensors
cd /usr/bin
gedit mkdev.sh

paste this into the file:

#—-cut here—-

#!/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

#—-cut here—-

*** Make sure you change curly quotes from WordPress into regular quotes. Curly quotes will break the script. There are only six of them.

Close and save the file.

chmod 755 mkdev.sh
./mkdev.sh

Run sensors-detect, and Answer YES to all the questions, except for the one about adding lines to /etc/modules automatically. Answer NO to that one. Using ISA or smbus depends on your configuration.

sensors-detect

In this example I ended up with the following text:

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

What you need to do is add those drivers in reverse order to /etc/modules:

gedit /etc/modules

insert this at the end: (eeprom is not needed)

# I2C chip drivers
it87
# I2C adapter drivers
i2c-i801
i2c-isa

Close the file.

modprobe each of the modules, and update:

modprobe i2c-i801
modprobe i2c-isa
modprobe it87
depmod -a
update-modules

Now you can test the sensors:

sensors

You should get a bunch of sensor readings.

Advertisements
Categories: DIY, ubuntu
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

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

%d bloggers like this: