WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [SOLVED] Lm-sensors on Corepure64 5.x  (Read 12262 times)

Offline fodder

  • Newbie
  • *
  • Posts: 45
[SOLVED] Lm-sensors on Corepure64 5.x
« on: January 06, 2014, 01:24:26 PM »
I am having trouble getting lm-sensors to work on Corepure64 5.1.  Using lm-sensors on TC 4.x x86 on this same computer I am able to access the temperature sensor so I don't think it is hardware related, but am certainly not sure.

For starters, here is how I am booting into Corepure64:

At this point everything appears to be a correctly running install of Corepure64 5.1.  For example, I can see a full 8 Gigs of memory listed as usable.

Then, I do the following to try and install lm-sensors:

There do not appear to be any make errors, but when I try and run "sudo sensors-detect" I get:
sudo: unable to execute /usr/local/sbin/sensors-detect: No such file or directory

However, that file does exist and the /tmp/tcloop/ that it points to also exists.

I also tried just installing the version of lm-sensors in the 4.x x86 repo and everything installed fine, but I get the same error when trying to run sensors-detect.

There are quite a few directions I could go in - like compiling libiconv for 5.x x86_64, but I thought it would be wise to ask first in case it is something obvious with the move to 5.x x86_64 that I am unaware of.

Thanks for any help, thoughts, and/or points in the right direction,

fodder
« Last Edit: April 23, 2014, 12:55:42 PM by fodder »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14847
Re: Lm-sensors on Corepure64 5.1
« Reply #1 on: January 06, 2014, 01:57:43 PM »
I don't think it affects the result, but libiconv should not be needed - glibc provides the iconv functions in tc.

Code: [Select]
unable to execute /usr/local/sbin/sensors-detect: No such file or directory
This probably means that sensors-detect is a script looking for perl or python in /usr instead of /usr/local or perhaps for bash - if so, you can edit the script to correct the error.

Offline fodder

  • Newbie
  • *
  • Posts: 45
Re: Lm-sensors on Corepure64 5.1
« Reply #2 on: January 06, 2014, 02:32:13 PM »
Quote
This probably means that sensors-detect is a script looking for perl or python in /usr instead of /usr/local...

Ah that makes sense, thanks so much Juanito.

I looked at the sensors-detect script and saw that it is looking for Perl in /usr/bin/ so I tried this as a quick fix and everything works beautifully: sudo ln -s /usr/local/bin/perl /usr/bin/perl

Thanks again for the help!

fodder

Offline fodder

  • Newbie
  • *
  • Posts: 45
Re: [REOPENED] Lm-sensors on Corepure64 5.1
« Reply #3 on: April 17, 2014, 01:38:16 PM »
So even though my first question was answered (thanks again, Juanito) I never got lm-sensors working on Pure64 5.x, but I had to set the project aside for a while.  I have finally gotten back to it for the last week or so but am still stuck.

The easiest way to explain is, this compile process works:
  • Boot Core 4.7.7 (x86)
  • tce-load -wi compiletc squashfs-tools-4.x perl5 hwmon-3.0.21-tinycore
  • cd /home/tc/
  • wget -O - http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-3.3.5.tar.bz2 > /home/tc/lm_sensors-3.3.5.tar.bz2
  • tar -xvf lm_sensors-3.3.5.tar.bz2
  • cd /home/tc/lm_sensors-3.3.5
  • make all
  • make DESTDIR=/tmp/lm-sensors install
  • mksquashfs /tmp/lm-sensors/ /mnt/sda1/tce/optional/lm-sensors.tcz
  • tce-load -i lm-sensors

At that point I can run "sudo sensors-detect" and it both detects the coretemp sensor and finds the coretemp module.

However, this compile process does not work (on the same hardware):
  • Boot Pure64 5.2
  • tce-load -wi compiletc squashfs-tools perl5 hwmon-3.8.10-tinycore64
  • ...the rest of the process in identical...

I have to run sensors-detect like this: sudo /usr/local/bin/perl /usr/local/sbin/sensors-detect
The script finds the coretemp sensor, but gives the following error, indicating that it cannot find the coretemp module:
Code: [Select]
Warning: the required module coretemp is not currently installed on your system.
I am confused by that error because hwmon-3.8.10-tinycore64 has "coretemp.ko.gz" listed just like hwmon-3.0.21-tinycore. (http://ftp.vim.org/os/Linux/distr/tinycorelinux/4.x/x86/tcz/hwmon-3.0.3-tinycore.tcz.list)

Any help is always greatly appreciated.

fodder



Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14847
Re: [REOPENED] Lm-sensors on Corepure64 5.x
« Reply #4 on: April 18, 2014, 03:31:36 AM »
does "lsmod" show if the coretemp module is loaded?

Offline fodder

  • Newbie
  • *
  • Posts: 45
Re: [REOPENED] Lm-sensors on Corepure64 5.x
« Reply #5 on: April 22, 2014, 10:59:24 AM »
does "lsmod" show if the coretemp module is loaded?

No sir, here are the modules that are listed after loading all the needed TCZs (compiletc squashfs-tools perl5 hwmon-3.8.10-tinycore64):
Code: [Select]
cpufreq_userspace
cpufreq_stats
cpufreq_powersave
cpufreq_conservative
squashfs
loop
hid_logitech_d j
mperf
microcode
r8169
serio_raw
pcspkr
lpc_ich
xhci_hcd
mfd_core
« Last Edit: April 22, 2014, 02:23:27 PM by fodder »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14847
Re: [REOPENED] Lm-sensors on Corepure64 5.x
« Reply #6 on: April 22, 2014, 02:20:46 PM »
Does "sudo modprobe coretemp" load it?

Offline fodder

  • Newbie
  • *
  • Posts: 45
Re: [REOPENED] Lm-sensors on Corepure64 5.x
« Reply #7 on: April 22, 2014, 02:22:19 PM »
Does "sudo modprobe coretemp" load it?

Nope, I get:
Code: [Select]
modprobe: module coretemp not found in modules.dep

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14847
Re: [REOPENED] Lm-sensors on Corepure64 5.1
« Reply #8 on: April 22, 2014, 11:31:51 PM »
Boot Pure64 5.2
tce-load -wi compiletc squashfs-tools perl5 hwmon-3.8.10-tinycore64
...the rest of the process in identical...

You should be using hwmon-3.8.13-tinycore64 with corepure64-5.2 - it's maybe better to use "tce-load -i hwmon-KERNEL"

Offline fodder

  • Newbie
  • *
  • Posts: 45
Re: [REOPENED] Lm-sensors on Corepure64 5.1
« Reply #9 on: April 23, 2014, 12:55:27 PM »
You should be using hwmon-3.8.13-tinycore64 with corepure64-5.2 - it's maybe better to use "tce-load -i hwmon-KERNEL"

Brilliant!!! I didn't realize that the "-KERNEL" option gave you the most current hwmon for the booted core.

Everything works as expected now, thanks a ton Juanito!

In summary, here is my full working process to get coretemp sensor readings:
  • COMPILE AND INSTALL:
  • Boot Pure64 5.2
  • tce-load -wi compiletc squashfs-tools perl5 hwmon-KERNEL
  • cd /home/tc/
  • wget -O - http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-3.3.5.tar.bz2 > /home/tc/lm_sensors-3.3.5.tar.bz2
  • tar -xvf lm_sensors-3.3.5.tar.bz2
  • cd /home/tc/lm_sensors-3.3.5
  • make all
  • make DESTDIR=/tmp/lm-sensors install
  • mksquashfs /tmp/lm-sensors/ /mnt/sda1/tce/optional/lm-sensors.tcz
  • tce-load -i lm-sensors
     
  • RUN DETECTION SCRIPT:
  • sudo /usr/local/bin/perl /usr/local/sbin/sensors-detect
     
  • BOOT PERSISTENCE:
  • echo etc/sysconfig/lm_sensors >> /opt/.filetool.lst
  • echo /sbin/modprobe coretemp >> /opt/bootlocal.sh
     
  • REBOOT WITH BACKUP:
  • filetool.sh -b
  • sudo reboot

Once I get this project complete I will properly package up all the tczs that I have compiled for 5.x x86_64 and submit them for inclusion in the repo.  I have actually had to compile quite a few that will hopefully be be helpful to other users (ncursesw, nano, lsof, ntpclient, unclutter, xdotool, imake, GraphicsMagick, etc.) but I need to make sure everything is working correctly first.

fodder

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14847
Re: [REOPENED] Lm-sensors on Corepure64 5.1
« Reply #10 on: April 24, 2014, 08:13:02 AM »
Once I get this project complete I will properly package up all the tczs that I have compiled for 5.x x86_64 and submit them for inclusion in the repo.  I have actually had to compile quite a few that will hopefully be be helpful to other users (ncursesw, nano, lsof, ntpclient, unclutter, xdotool, imake, GraphicsMagick, etc.) but I need to make sure everything is working correctly first.

All contributions gratefully received  :)