papaschtroumpf Posted September 17, 2004 Report Share Posted September 17, 2004 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 Quote Link to comment Share on other sites More sharing options...
sir_max Posted September 17, 2004 Report Share Posted September 17, 2004 i have inserted those modprobes for my motherboard in this file: /etc/rc.local at the end i added all lines needed to load sensors... and never have any problem.. perhaps it's not an elegant solution but it works.. ;) Quote Link to comment Share on other sites More sharing options...
papaschtroumpf Posted September 17, 2004 Author Report Share Posted September 17, 2004 (edited) 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 September 17, 2004 by papaschtroumpf Quote Link to comment Share on other sites More sharing options...
aRTee Posted September 22, 2004 Report Share Posted September 22, 2004 It didn't work because you likely boot to graphical mode, init 5. It doesn't go through all other init stages to get there, but checks directly what should be up and running in init 5, i.e. /etc/rc.d/rc5.d/ chkconfig will add it to all relevant stages (3 AND 5). Quote Link to comment Share on other sites More sharing options...
papaschtroumpf Posted September 22, 2004 Author Report Share Posted September 22, 2004 That's it! I alwys thought that it still went through 3 on its way to 5, but you're right, that's what happened. Quote Link to comment Share on other sites More sharing options...
aRTee Posted September 24, 2004 Report Share Posted September 24, 2004 Great! BTW you don't actually have to add those modprobe commands to /etc/rc.local, because they are referenced in /etc/sysconfig/lm_sensrs (or so, doing this from memory) and so will get loaded. Check my site to see how I do it, config page. Quote Link to comment Share on other sites More sharing options...
papaschtroumpf Posted September 24, 2004 Author Report Share Posted September 24, 2004 (edited) 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 September 24, 2004 by papaschtroumpf Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.