Jump to content

can't get lm_sensors to "Stick" - SOLVED


papaschtroumpf
 Share

Recommended Posts

This is in follow up to this thread: http://mandrakeusers.org/index.php?showtopic=17185

 

I finally figured out a sensor module that will work for my motherboard and give me my temperatues, but I can't seem to make it it "stick" accross reboots.

 

If I do (as root) sensors-detect, followed by a manually:

modprobe i2c-viapro

modprobe i2c-isa

modprobe w83781d

sensors -s

sensors

 

I can see the proper temperature

 

after a reboot, it if I type "sensors" I get the following message:

Can't access procfs/sysfs file

Unable to find i2c bus information;

For 2.6 kernels, make sure you have mounted sysfs and done

'modprobe i2c_sensor'!

For older kernels, make sure you have done 'modprobe i2c-proc'!

 

if I type "modprobe i2c_sensor" followed by all the modprobes shown above, I again get the proper temperature, so it means that I need to do modprobe i2c_sensors at startup.

 

So I looked at /etc/rc.d/init.d/lm_sensors and the first useful line of the script is:

[ -e /proc/sys/dev/sensors ] || /sbin/modprobe i2c-proc &>/dev/null

this looks to me that it's a kernel 2.4 line and that for 2.6 I need to replace it with

[ -e /proc/sys/dev/sensors ] || /sbin/modprobe i2c_sensor &>/dev/null

 

The next line in the script is:

[ -e /proc/sys/dev/sensors ] || exit 0

 

and I checked manually after doing "modprobe i2c_sensor" and there is no /proc/sys/dev/sensors directory. Is this normal? do 2.6 kernels work differently? even the directory isn't there I can still get temperature readins when I modprobe modules manually.

Should I simply comment outthis line from the script? Am I going off totally on the wormg track?

 

Thanks

Link to comment
Share on other sites

That's weird: I made the change above and manually commented out the check for /proc/sys/dev/sensors in my /etc/rc.d/init.d/lm_sensors file, so now if I run it manually:

 

/etc/rc.d/init.d/lm_sensors start it works just fine

 

but it doesn't get executed automatically at reboot. Do I need to do something to cause /etc/rc.d/init.d/lm_sensors to be executed at boot? I though the kernel automagically cycled through all the scripts in that directory, but obviously I'm missing something.

 

EDIT:

OK, after doing a little bit of research about the startup process in Mandrake, I thought I needed to go to /etc/rc.d/rc3.d/ and add:

ln -s ../init.d/lm_sensors S99lm_sensors

 

which if I'm not mistaken will cause the /etc/rc.d/init.d/lm_sensors script with a start argument at the end of the initialization of run level 3, but it doesn't seem to be working?

 

EDIT AGAIN: I removed the link above since it didn't seem to be working, then went to /etc/rc.d/init.d and typed "chkconfig --add lm_sensors". which added symlinks similar to what I tried to do manually above, execpt that it seems to work properly at boot?!?!?!?!

I guess this problem is solved but still not sure why creating the link in rc3.d menaully didn;t work.

Edited by papaschtroumpf
Link to comment
Share on other sites

yes I understant that part, and I didn't modify /etc/rc.local.

Ijust missed the part that you don't have to go through runlevel3 on your way to runlevel5, so when I manually added the S90lm_sensors to rc.3 it wasn't getting executed.

I'll checkout your page anyway, I might learn something :P

 

EDIT: hey I had seen your site before, never realized it was yours. The answer to my particular problem wasn't in there, but cool site anyway.

Edited by papaschtroumpf
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...