Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm trying to get lmsensors to work with my home-built (LinuxFromScratch) system. I'm using the latest lmsensors and sysfs utils, but "sensors" errors out saying it can't access procfs/sysfs.
mount shows sysfs mounted on /sys....
I've compiled I2C and hardware monitoring into the kernel, the sensor on my mobo (MSI K8TNeo K8T800) is a winbond whose exact model number escapes me at the moment. I started out compiling everything into the kernel, but have just tried everything as modules with no success.
sensors-detect shows up the sensor OK... but sensors still can't find sysfs.
Is there a problem with running lmsensors on this fresh kernel? Or am I missing some other critical piece?
root@gordon:~# sensors
Can't access procfs/sysfs file
Unable to find i2c bus information;
For 2.6 kernels, make sure you have mounted sysfs and libsensors
was compiled with sysfs support!
For older kernels, make sure you have done 'modprobe i2c-proc'!
root@gordon:~# sensors-detect
...
I will now generate the commands needed to load the I2C modules.
To make the sensors modules behave correctly, add these lines to
/etc/modules.conf:
To load everything that is needed, add this to some /etc/rc* file:
#----cut here----
# I2C adapter drivers
# modprobe unknown adapter NVIDIA I2C Device
# modprobe unknown adapter NVIDIA I2C Device
# modprobe unknown adapter NVIDIA I2C Device
modprobe i2c-viapro
modprobe i2c-isa
# I2C chip drivers
# Warning: the required module eeprom is not currently installed on your system.
# For status of 2.6 kernel ports see <snip>
# If driver is built-in to the kernel, or unavailable, comment out the following line.
modprobe eeprom
# Warning: the required module w83627hf is not currently installed on your system.
# For status of 2.6 kernel ports see <snip>
# If driver is built-in to the kernel, or unavailable, comment out the following line.
modprobe w83627hf
# sleep 2 # optional
/usr/local/bin/sensors -s # recommended
root@gordon:~# grep I2C /home/dale/lfs-sources/linux-2.6.16.19/.config
# I2C support
CONFIG_I2C=y
CONFIG_I2C_CHARDEV=m
# I2C Algorithms
CONFIG_I2C_ALGOBIT=m
CONFIG_I2C_ALGOPCF=m
CONFIG_I2C_ALGOPCA=m
# I2C Hardware Bus support
CONFIG_I2C_ALI1535=m
CONFIG_I2C_ALI15X3=m
CONFIG_I2C_AMD756=m
CONFIG_I2C_AMD8111=m
# CONFIG_I2C_ELEKTOR is not set
CONFIG_I2C_I801=m
CONFIG_I2C_I810=m
CONFIG_I2C_PIIX4=m
CONFIG_I2C_ISA=m
CONFIG_I2C_NFORCE2=m
CONFIG_I2C_PARPORT=m
CONFIG_I2C_PARPORT_LIGHT=m
CONFIG_I2C_PROSAVAGE=m
CONFIG_I2C_SIS5595=m
CONFIG_I2C_SIS630=m
CONFIG_I2C_SIS96X=m
CONFIG_I2C_VIAPRO=m
CONFIG_I2C_VOODOO3=m
CONFIG_I2C_PCA_ISA=m
# Miscellaneous I2C Chip support
# CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_ALGO is not set
# CONFIG_I2C_DEBUG_BUS is not set
# CONFIG_I2C_DEBUG_CHIP is not set
No I don't have anything in init.d to do with lm_sensors. I had a look at the init script provided with the lm_sensors source and as far as I could see all it does is load up the lm_sensors modules. Initially I had everything (or some subset perhaps ;-) compiled into the kernel, and it didn't work. For my last try I tried to manually modprobe the modules listed by sensors detect with no joy. The module for my sensors looks like it is in "experimental" so it is not available in my kernel at the moment. I chose "No" to development and experimental code in my kernel compile. My next move is to go back and compile that in (although the sensor module I chose is supposed to work with my sensor).
Perhaps you could post your gentoo init script for me to peruse?
Never had a closer look at it, looks like it does load modules.
Code:
#!/sbin/runscript
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-apps/lm_sensors/files/lm_sensors-2.10.0-lm_sensors-init.d,v 1.1 2006/02/15 18:40:21 brix Exp $
checkconfig() {
if [ ! -f /etc/conf.d/lm_sensors ]; then
eerror "/etc/conf.d/lm_sensors does not exist, try running sensors-detect"
return 1
fi
if [ "${LOADMODULES}" = "yes" -a -f /proc/modules ]; then
if [ -z "${MODULE_0}" ]; then
eerror "MODULE_0 is not set in /etc/conf.d/lm_sensors, try running sensors-detect"
return 1
fi
fi
}
start() {
checkconfig || return 1
if [ "${LOADMODULES}" = "yes" -a -f /proc/modules ]; then
einfo "Loading lm_sensors modules..."
mount | grep sysfs &> /dev/null
if [ ${?} == 0 ]; then
if ! ( [ -e /sys/i2c ] || [ -e /sys/bus/i2c ] ); then
ebegin " Loading i2c-core"
modprobe i2c-core &> /dev/null
if [ ${?} != 0 ]; then
eerror " Could not load i2c-core!"
eend 1
fi
( [ -e /sys/i2c ] || [ -e /sys/bus/i2c ] ) || return 1
eend 0
fi
elif ! [ -e /proc/sys/dev/sensors ]; then
ebegin " Loading i2c-proc"
modprobe i2c-proc &> /dev/null
if [ ${?} != 0 ]; then
eerror " Could not load i2c-proc!"
eend 1
fi
[ -e /proc/sys/dev/sensors ] || return 1
eend 0
fi
i=0
while true; do
module=`eval echo '$'MODULE_${i}`
module_args=`eval echo '$'MODULE_${i}_ARGS`
if [ -z "${module}" ]; then
break
fi
ebegin " Loading ${module}"
modprobe ${module} ${module_args} &> /dev/null
eend $?
i=$((i+1))
done
fi
if [ "${INITSENSORS}" = "yes" ]; then
if ! [ -f /etc/sensors.conf ]; then
eerror "/etc/sensors.conf does not exist!"
return 1
fi
ebegin "Initializing sensors"
/usr/bin/sensors -s &> /dev/null
eend ${?}
fi
}
stop() {
checkconfig || return 1
if [ "${LOADMODULES}" = "yes" -a -f /proc/modules ]; then
einfo "Unloading lm_sensors modules..."
# find the highest possible MODULE_ number
i=0
while true; do
module=`eval echo '$'MODULE_${i}`
if [ -z "${module}" ] ; then
break
fi
i=$((i+1))
done
while [ ${i} -gt 0 ]; do
i=$((i-1))
module=`eval echo '$'MODULE_${i}`
ebegin " Unloading ${module}"
rmmod ${module} &> /dev/null
eend $?
done
if [ -e /proc/sys/dev/sensors ] ; then
ebegin " Unloading i2c-proc"
rmmod i2c-proc &> /dev/null
eend $?
fi
fi
}
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.