PC87366 with the net4801
[Please CC: the mailing list on reply]
Hi Andrew,
Quoted 8 lines
I'm using a Soekris net4801 board with the built in pc87366 along with the driver from yesterday's CVS snapshot, and I'm seeing some strange readings. I've looked over some mailing list posts, and have attached the output of some of the commands you have recommended in the past. Any insight would be greatly appreciated. Thanks.
Here's a link describing this board:
http://www.soekris.com/net4801.htm
OK, just took a look. You have a Super-I/O for sure, it actually has the ID of a PC87366, so I guess it has to be a PC87366, but I admit that the readings look dead broken.
The fans logical device isn't enable at all, so this is no surprise that you don't have fan readings. The driver cannot handle a device which has been disabled by hardware/bios. For now, I invite you do ignore all fan readings through /etc/sensors.conf. We may try to (manually) forcibly enable this logical device later, but most likely the chip isn't wired properly to support fans so it won't help.
Most voltage channels seem to be disabled. You should try passing init=2 or init=3 to the module as you load it, so that it forcibly enables them. Maybe you'll get readings after that. Still, internal channels seem to read twice as high as they should. I suspect that the chip is using an external Vref with a non-standard value. Please recompile the driver with DEBUG enable, and then watch dmesg or /var/log/* as you load the driver. It should dump a number of valuable information.
As for temperatures, I'm definitely surprised that temp3 isn't correct, since it is the internal temperature of the PC87366, so it has to be present and valid. That's definitely strange.
One possibility that could explain it all would be that the chip is configured to use an external Vref but that Vref wouldn't actually exist. In that case, forcing the chip to use the internal Vref instead could help.
The last three dumps you provided (with 0xff everywhere) are not relevant. The addresses used by the chip are system-dependant, so you dumped addresses that do not match your chip.
Please provide the output of the following dumps:
isadump -f 0x6620
isadump -f 0x6640
These, together with what will show in the logs when the driver has DEBUG enabled, will hopefully this will enlighten us on what the problem is, and how it can be solved.
Thanks,
Jean Delvare
Jean,
Quoted 9 lines · CDT Jean Delvare
OK, just took a look. You have a Super-I/O for sure, it actually has the ID of a PC87366, so I guess it has to be a PC87366, but I admit that the readings look dead broken.
The fans logical device isn't enable at all, so this is no surprise that you don't have fan readings. The driver cannot handle a device which has been disabled by hardware/bios. For now, I invite you do ignore all fan readings through/etc/sensors.conf. We may try to (manually) forcibly enable this logical device later, but most likely the chip isn't wired properly to support fans so it won't help.
There are no fan headers on the net4801 board at all, so this is not much of a concern (for me, at least).
Quoted 3 lines
Most voltage channels seem to be disabled. You should try passing init=2 or init=3 to the module as you load it, so that it forcibly enables them. Maybe you'll get readings after that.
I seem to get the same results with init=2 or init=3.
Quoted 5 lines
Still, internal channels
seem to read twice as high as they should. I suspect that the chip is using an external Vref with a non-standard value. Please recompile the driver with DEBUG enable, and then watch dmesg or/var/log/*as you load the driver. It should dump a number of valuable information.
pc87360.o version 2.8.8-CVS (2004xxxx)
pc87360.o: device 0x09 not activated
Using external reference voltage
Should I see more than this?
Quoted 4 lines
One possibility that could explain it all would be that the chip is configured to use an external Vref but that Vref wouldn't actually exist. In that case, forcing the chip to use the internal Vref instead could help.
Looking at the debug output, it does look like it's using the external vref... how do I force it to use the internal?
Quoted 8 lines
The last three dumps you provided (with
0xffeverywhere) are not relevant. The addresses used by the chip are system-dependant, so you dumped addresses that do not match your chip.Please provide the output of the following dumps:
isadump -f
0x6620
isadump -f0x6640
Sure (per your 2nd reply, I'm including the revised commands)...
# isadump -f 0x6620 16
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: 00 00 00 00 00 00 1f 00 02 0d 00 00 ff 00 ff 00# isadump -f 0x6640 16
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: 1f 00 00 00 00 00 00 00 02 02 83 80 7f c9 7f 00Quoted 2 lines
Thanks,
Jean Delvare
Thank you,
--
Andrew D. Johnson
PGP Fingerprint: 77BD 80B1 4918 1D98 9EBF 2E62 073B 9B31 A1DC 41F4
KeyID: 0xA1DC41F4
As a quick recap for those viewing this in the soekris-tech list, I'm trying to get lm sensors (temp and voltage monitoring) working on a net4801 under linux, using the pc87360 driver that Jean has developed. (Please correct me if i'm wrong, Jean, I assume you've developed this driver). Here's the lm sensors website, for those unfamiliar with the software:
http://www.lm-sensors.nu/
There's a question further down in this email that I was hoping someone from Soekris might be able to answer. Any other insight would also be appreciated. Thanks.
Quoted 9 lines · CDT Jean Delvare
Quoted 6 lines
Quoted 4 lines
Most voltage channels seem to be disabled. You should try passing init=2 or init=3 to the module as you load it, so that it forcibly enables them. Maybe you'll get readings after that.
I seem to get the same results with init=2 or init=3.
Strange. I'd have expected changes, such as voltage readings to come up, or Vcore limits to show. How did you pass the parameter?
I've attached a log (output.txt) of the exact command sequence and output.
Quoted 8 lines
OK... I would like you to run (in an empty directory) the attached script on that machine. I'll dump the whole chip contents (all channels on all devices) and generate a tarball from all individual files.
Please do that *before* you force the chip to use an internal voltage reference. And possibly a second time *after* doing so if you feel like it.
Ok, I've attached dumps for both before and after forcing internal vref.
Quoted 2 lines
Let me know if you have any change after switching to internal reference.
See output.txt for more command output from this. I don't really see any change in the readings. There is one thing that I found noteworthy, however. Even after forcing internal vref using the commands you suggested, I still get the following dmesg output:
soekris1# dmesg -c
pc87360.o version 2.8.8-CVS (2004xxxx)
pc87360.o: device 0x09 not activated
Using external reference voltage
Quoted 2 lines
BTW, do you know whether your board is using thermistor-based or thermal-diode-based temperature measurements?
Unfortunately, I'm not certain. I'll CC the soekris-tech mailing list in on this, which I discovered only recently. Someone there from Soekris might be listening and will perhaps be able to shed a little bit more light on this.
--
Andrew D. Johnson
PGP Fingerprint: 77BD 80B1 4918 1D98 9EBF 2E62 073B 9B31 A1DC 41F4
KeyID: 0xA1DC41F4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: output.txt.gz
Type: application/x-tar
Size: 727 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040625/fa6b7753/output.txt.tar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pc87366-dump-after-internal-vref.tar.gz
Type: application/x-tar
Size: 672 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040625/fa6b7753/pc87366-dump-after-internal-vref.tar.tar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pc87366-dump-before-internal-vref.tar.gz
Type: application/x-tar
Size: 679 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040625/fa6b7753/pc87366-dump-before-internal-vref.tar.tar
Quoted 4 lines · CDT Jean Delvare
Hi Andrew,
(Shouldn't you be sleeping at 4:30am? ;))
Ha, I probably should be, but I do tend to keep some strange hours.
Quoted 10 lines
Please do:
isaset -f
0x66280x00
isaset -f0x66480x00(i.e.
0x00instead of0x03)It *should* switch the chip to internal ref.
Please dump the chip's contents again after that. for comparison.
Ok, see attachments.
Things definitely got more interesting here:
# sensors pc87366-isa-6620 Adapter: ISA adapter in0: +2.95 V (min = +0.00 V, max = 2.95 V) in1: +2.24 V (min = +0.00 V, max = 2.95 V) in2: +2.78 V (min = +0.00 V, max = 2.95 V) in3: +0.80 V (min = +0.00 V, max = 2.95 V) in4: +2.75 V (min = +0.00 V, max = 2.95 V) in5: +2.77 V (min = +0.00 V, max = 2.95 V) in6: +0.00 V (min = +0.00 V, max = 2.95 V) Vsb: +3.66 V (min = +0.00 V, max = 5.91 V) Vdd: +3.66 V (min = +0.00 V, max = 5.91 V) Vbat: +2.95 V (min = +0.00 V, max = 2.95 V) AVdd: +3.64 V (min = +0.00 V, max = 5.91 V) fan1: 0 RPM (min = 0 RPM, div = 0) fan2: 0 RPM (min = 0 RPM, div = 0) fan3: 0 RPM (min = 0 RPM, div = 1819) CPU0 Temp: +127 C (low = -55 C, high = +127 C) OPEN CPU0 Crit: +127 C ALARM CPU1 Temp: +127 C (low = -55 C, high = +127 C) OPEN CPU1 Crit: +127 C ALARM S-IO Temp: +83 C (low = -55 C, high = +127 C) ALARM S-IO Crit: +127 C
The temperature reading is obviously way high. The voltages seem more reasonable. At the very least, they're different than they were before.
Quoted 1 line
Thanks and sorry for the bad information.
No prob at all... do I need to worry about what the previous commands might have done/changed, or does that all get cleared after a reboot?
Thanks,
--
Andrew D. Johnson
PGP Fingerprint: 77BD 80B1 4918 1D98 9EBF 2E62 073B 9B31 A1DC 41F4
KeyID: 0xA1DC41F4
Oops, Looks like my mail client screwed up the attachments. Here they are.
--
Andrew D. Johnson
PGP Fingerprint: 77BD 80B1 4918 1D98 9EBF 2E62 073B 9B31 A1DC 41F4
KeyID: 0xA1DC41F4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: output.txt.gz
Type: application/x-tar
Size: 593 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040625/0ed7bc6e/output.txt.tar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pc87366-dump-ivref.tar.gz
Type: application/x-tar
Size: 692 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040625/0ed7bc6e/pc87366-dump-ivref.tar.tar
Quoted 15 lines · CDT Jean Delvare
Quoted 6 lines
CPU0 Temp: +127 C (low = -55 C, high = +127 C) OPEN CPU0 Crit: +127 C ALARM CPU1 Temp: +127 C (low = -55 C, high = +127 C) OPEN CPU1 Crit: +127 C ALARM S-IO Temp: +83 C (low = -55 C, high = +127 C) ALARM S-IO Crit: +127 CThis clearly means that your system doesn't use thermal diodes. It would be interesting to try thermistors. The driver relies on a Super-I/O configuration bit to decide what to use. Unfortunately it says "thermal diodes" here, which is why the driver decided to enable these. My driver may need a parameter to force the use of thermistors.
For now, let's try to do it manually.
Quoted 7 lines
First of all we want to disable temp1 and temp2 (thermal diode channels). First unload the driver, then:
isaset -f
0x66490
isaset -f0x664a0
isaset -f0x66491
isaset -f0x664a0
Ok, I hit a snag running the second command here:
soekris1# isaset -f 0x664a 0
WARNING! Running this program can cause system crashes, data loss and worse! I will write value 0x00 to address 0x664a
You have five seconds to reconsider and press CTRL-C!
Warning: Data mismatch, wrote 0x00, read back 0xcc
I stopped at this point.
Quoted 2 lines
They look fine to me, except in0 and maybe in3. We'll now more when you use your configuration file again.
The configuration file I'm using is a slightly tweaked version of something you had posted to a mailing list. I'll attach it. Below is the output I see from sensors using it. It obviously still needs some tweaking. Some of the voltage calculations must be inappropriate in this case. Is Soekris going to have to let us know how the voltage inputs are wired before we can have any idea what these represent?
soekris1# sensors
pc87366-isa-6620
Adapter: ISA adapter
+5V: +8.50 V (min = +4.49 V, max = 5.50 V) ALARM
Vcore: +2.78 V (min = +0.00 V, max = 2.95 V)
+12V: +23.54 V (min = +10.83 V, max = 13.20 V) ALARM
5VSB: +0.00 V (min = +4.49 V, max = 5.50 V) ALARM
Vsb: +3.66 V (min = +2.99 V, max = 3.59 V) ALARM
Vdd: +3.66 V (min = +2.99 V, max = 3.59 V) ALARM
Vbat: +2.95 V (min = +2.40 V, max = 2.95 V)
AVdd: +3.64 V (min = +2.99 V, max = 3.59 V) ALARM
CPU0 Temp: +127 C (low = +0 C, high = +70 C) OPEN
CPU0 Crit: +85 C ALARM
CPU1 Temp: +127 C (low = +0 C, high = +70 C) OPEN
CPU1 Crit: +85 C ALARM
S-IO Temp: +83 C (low = +5 C, high = +60 C) ALARM
S-IO Crit: +70 C ALARM
temp4: -273 C (low = +1 C, high = +67 C)
temp4_crit:
-273 C
temp5: -273 C (low = +1 C, high = +67 C)
temp5_crit:
-273 C
temp6: -273 C (low = +1 C, high = +67 C)
temp6_crit:
-273 CQuoted 3 lines
I'll do a few fixes to the driver this evening, including more debugging messages, this should help us deal with the temperatures. I'll let you know when I have something for you to test.
Thanks much,
--
Andrew D. Johnson
PGP Fingerprint: 77BD 80B1 4918 1D98 9EBF 2E62 073B 9B31 A1DC 41F4
KeyID: 0xA1DC41F4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sensors.conf.gz
Type: application/x-gzip-compressed
Size: 885 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040625/9a61f4c9/sensors.conf.bin
Quoted 3 lines · CDT Jean Delvare
OTOH, if you receive a similar message when reconfiguring the Super-I/O chip (command starting with "isaset
0x2e0x2f"), then this is *not* OK and you'll have to report to me.
Ok, that went fine... but unfortunately the results aren't much better now. As usual, I've attached the command output.
Quoted 4 lines
Quoted 4 lines
The configuration file I'm using is a slightly tweaked version of something you had posted to a mailing list. I'll attach it. Below is the output I see from sensors using it. It obviously still needs some tweaking. Some of the voltage calculations must be inappropriate in this case.
I'm now back to using the default configuration file, tweaked slightly (ignoring fans now, for instance). It's also included in the attachment.
Quoted 6 lines
Quoted 2 lines
Is Soekris going to have to let us know how the voltage inputs are wired before we can have any idea what these represent?
Yes, definitely. There's nothing we can do without them telling us what each voltage channel is supposed to measure, and which resistors are in use.
Okay, I'm going to compose an email to them concerning what information is needed. What more is needed for proper temperature monitoring, if anything?
Quoted 1 line
BTW, do you have an idea on what the Vcore for your CPU is supposed to be?
The processor is a NS Geode SC1100. I've googled around for a few minutes, but I've not yet been able to figure out what the core voltage is. That'll be another question in my email to Soekris.
Btw, I am using the newer version of the driver, now.
Thanks much,
--
Andrew D. Johnson
PGP Fingerprint: 77BD 80B1 4918 1D98 9EBF 2E62 073B 9B31 A1DC 41F4
KeyID: 0xA1DC41F4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: output.txt.gz
Type: application/x-gzip-compressed
Size: 1339 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040626/23e50fa3/output.txt.bin
Quoted 6 lines · CDT Jean Delvare
Quoted 2 lines
soekris1# sensors -s
soekris1# sensorsPlease do not run "sensors -s" right after loading the driver. Running "sensors" at least once before will show information that "sensors -s" will overwrite.
Ah, understood.
Quoted 13 lines
Quoted 4 lines
CPU0 Temp: +0 C (low = +0 C, high = +70 C) CPU0 Crit: +85 C CPU1 Temp: +0 C (low = +0 C, high = +70 C) CPU1 Crit: +85 CQuoted 8 lines
S-IO Temp: +83 C (low = +0 C, high = +70 C) ALARM S-IO Crit: +85 C ERROR: Can't get TEMP4 data! ERROR: Can't get TEMP4 overtemperature data! ERROR: Can't get TEMP5 data! ERROR: Can't get TEMP5 overtemperature data! temp6: -273 C (low = +1 C, high = +67 C) ALARM ERROR: Can't get TEMP6 overtemperature data!
Quoted 3 lines
This is no good (I guess you knew that already).
Do the errors happen consistently?
Yes, they do seem to be consistent.
Quoted 2 lines
Can you report the values found in files
/proc/sys/dev/sensors/pc87366-isa-6620/temp*?
Sure, attached.
Quoted 8 lines
I've attached a patch to be applied against the current CVS tree. I didn't commit it because I don't want that much debugging in the driver in the long run, but that might help in your case. I really feel like I'm missing something obvious at some point, but can't seem to get what. Please apply ("patch -p0 < pc87360-debug.diff" from the
lm_sensors2directory) and recompile (make sure you still have DEBUG=1 in theMakefile), then reload the driver with init=2, and watch the logs. They should contain much more information (or at least I hope so).
Yep, definitely quite a bit more output. Included in attachment.
Quoted 7 lines
Quoted 6 lines
set
temp1_min0
settemp1_max70
settemp1_crit85
settemp2_min0
settemp2_max70
settemp2_crit85Please comment these lines out for now.
Done. I've also sent that email off to Soekris. Hopefully they'll respond to it soon. Thanks much.
--
Andrew D. Johnson
PGP Fingerprint: 77BD 80B1 4918 1D98 9EBF 2E62 073B 9B31 A1DC 41F4
KeyID: 0xA1DC41F4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: output.txt.gz
Type: application/x-gzip-compressed
Size: 744 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040627/0a8ffcca/output.txt.bin
Quoting myself:
Quoted 4 lines
Please provide the output of the following dumps:
isadump -f
0x6620
isadump -f0x6640
Actually you should instead do:
isadump -f 0x6620 16
isadump -f 0x6640 16
Thanks,
Jean Delvare
Quoted 2 lines
There are no fan headers on the net4801 board at all, so this is not much of a concern (for me, at least).
OK, and this explains why the device is disabled.
Quoted 5 lines
Quoted 3 lines
Most voltage channels seem to be disabled. You should try passing init=2 or init=3 to the module as you load it, so that it forcibly enables them. Maybe you'll get readings after that.
I seem to get the same results with init=2 or init=3.
Strange. I'd have expected changes, such as voltage readings to come up, or Vcore limits to show.
How did you pass the parameter?
Quoted 11 lines
Quoted 5 lines
Still, internal channels
seem to read twice as high as they should. I suspect that the chip is using an external Vref with a non-standard value. Please recompile the driver with DEBUG enable, and then watch dmesg or/var/log/*as you load the driver. It should dump a number of valuable information.pc87360.o version 2.8.8-CVS (2004xxxx)
pc87360.o: device0x09not activated
Using external reference voltageShould I see more than this?
I'd have expected messages like "Forcibly enabling in0". Same for in2 and in3.
Other channels are admittedly already enabled (else limits would read 0). Logical devices themselves are enabled too, according to the dumps below.
Quoted 7 lines
Quoted 4 lines
One possibility that could explain it all would be that the chip is configured to use an external Vref but that Vref wouldn't actually exist. In that case, forcing the chip to use the internal Vref instead could help.
Looking at the debug output, it does look like it's using the external vref... how do I force it to use the internal?
First unload the pc87360 driver.
isaset -f 0x6628 0x03
isaset -f 0x6648 0x03
The reload the driver. But read below before.
Quoted 7 lines
Quoted 4 lines
Please provide the output of the following dumps:
isadump -f
0x6620
isadump -f0x6640Sure (per your 2nd reply, I'm including the revised commands)...
Quoted 7 lines
# isadump -f 0x6620 16 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: 00 00 00 00 00 00 1f 00 02 0d 00 00 ff 00 ff 00# isadump -f 0x6640 16 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: 1f 00 00 00 00 00 00 00 02 02 83 80 7f c9 7f 00
OK... I would like you to run (in an empty directory) the attached script on that machine. I'll dump the whole chip contents (all channels on all devices) and generate a tarball from all individual files.
Please do that *before* you force the chip to use an internal voltage reference. And possibly a second time *after* doing so if you feel like it.
Let me know if you have any change after switching to internal reference.
BTW, do you know whether your board is using thermistor-based or thermal-diode-based temperature measurements?
Thanks,
Jean Delvare
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dump-pc87366.sh
Type: application/octet-stream
Size: 756 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040625/c3b9c108/dump-pc87366.obj
Hi Andrew,
(Shouldn't you be sleeping at 4:30am? ;))
Quoted 5 lines
As a quick recap for those viewing this in the soekris-tech list, I'm trying to get lm sensors (temp and voltage monitoring) working on a net4801 under linux, using the pc87360 driver that Jean has developed. (Please correct me if i'm wrong, Jean, I assume you've developed this driver).
You're correct, I did. Please note that I don't own such a chip myself, the driver was developped from the excellent National Semiconductor datasheet with the precious help of a few testers.
Quoted 10 lines
See output.txt for more command output from this. I don't really see any change in the readings. There is one thing that I found noteworthy, however. Even after forcing internal vref using the commands you suggested, I still get the following dmesg output:
soekris1# dmesg -c
pc87360.o version 2.8.8-CVS (2004xxxx)
pc87360.o: device0x09not activated
Using external reference voltage
Aha. My bad, I gave you a bad command. That's what it takes to do support without having the datasheet handy.
Please do:
isaset -f 0x6628 0x00
isaset -f 0x6648 0x00
(i.e. 0x00 instead of 0x03)
It *should* switch the chip to internal ref.
Please dump the chip's contents again after that. for comparison.
Thanks and sorry for the bad information.
Jean Delvare
Quoted 16 lines
Things definitely got more interesting here:
# sensors pc87366-isa-6620 Adapter: ISA adapter in0: +2.95 V (min = +0.00 V, max = 2.95 V) in1: +2.24 V (min = +0.00 V, max = 2.95 V) in2: +2.78 V (min = +0.00 V, max = 2.95 V) in3: +0.80 V (min = +0.00 V, max = 2.95 V) in4: +2.75 V (min = +0.00 V, max = 2.95 V) in5: +2.77 V (min = +0.00 V, max = 2.95 V) in6: +0.00 V (min = +0.00 V, max = 2.95 V) Vsb: +3.66 V (min = +0.00 V, max = 5.91 V) Vdd: +3.66 V (min = +0.00 V, max = 5.91 V) Vbat: +2.95 V (min = +0.00 V, max = 2.95 V) AVdd: +3.64 V (min = +0.00 V, max = 5.91 V)
Yeah, these look good. in6 is obviously unused. in0 doesn't seem to fit within the range the chip can natively measure when running on internal vref (could be caused by an improper resistor combination).
You should now be able to use your tweaked configuration file again, including voltage limits (set using "sensors -s").
Quoted 3 lines
fan1: 0 RPM (min = 0 RPM, div = 0) fan2: 0 RPM (min = 0 RPM, div = 0) fan3: 0 RPM (min = 0 RPM, div = 1819)
BTW this shows there's a bug in my driver when the fan logical device is disabled. The value returned for dividers is undefined (thus the mysterious "1819"). I'll fix that this evening.
Quoted 6 lines
CPU0 Temp: +127 C (low = -55 C, high = +127 C) OPEN CPU0 Crit: +127 C ALARM CPU1 Temp: +127 C (low = -55 C, high = +127 C) OPEN CPU1 Crit: +127 C ALARM S-IO Temp: +83 C (low = -55 C, high = +127 C) ALARM S-IO Crit: +127 C
This clearly means that your system doesn't use thermal diodes. It would be interesting to try thermistors. The driver relies on a Super-I/O configuration bit to decide what to use. Unfortunately it says "thermal diodes" here, which is why the driver decided to enable these. My driver may need a parameter to force the use of thermistors.
For now, let's try to do it manually.
First of all we want to disable temp1 and temp2 (thermal diode channels). First unload the driver, then:
isaset -f 0x6649 0
isaset -f 0x664a 0
isaset -f 0x6649 1
isaset -f 0x664a 0
Then we'll try to reconfigure the Super-I/O chip:
isaset 0x2e 0x2f 0x2b 0x50
If isaset complains that readback didn't match, don't go any further. Else, simply reload the driver with init=2, and it should forcibly enable temp4, temp5 and temp6 (thermistor based measurements). Now, if they will actually work, I can't say.
Quoted 1 line
The temperature reading is obviously way high.
Agreed. I hope that reconfiguring the chip will change that, if the chip is confused by trying to handle thermistors like thermal diodes.
Quoted 2 lines
The voltages seem more reasonable. At the very least, they're different than they were before.
They look fine to me, except in0 and maybe in3. We'll now more when you use your configuration file again.
Quoted 4 lines
Quoted 1 line
Thanks and sorry for the bad information.
No prob at all... do I need to worry about what the previous commands might have done/changed, or does that all get cleared after a reboot?
Nothing to worry about, or I would of course have told you so immediately. The commands simply set the logical devices in stand-by mode. Loading the driver reenables them anyway, so even rebooting was not necessary at all.
I'll do a few fixes to the driver this evening, including more debugging messages, this should help us deal with the temperatures. I'll let you know when I have something for you to test.
Thanks,
Jean Delvare
I thought you were not yet asleep at 4:30am... Should I now admit that you had actually already gotten up? ;)
Quoted 10 lines
Quoted 7 lines
First of all we want to disable temp1 and temp2 (thermal diode channels). First unload the driver, then:
isaset -f
0x66490
isaset -f0x664a0
isaset -f0x66491
isaset -f0x664a0Ok, I hit a snag running the second command here:
Quoted 8 lines
soekris1# isaset -f
0x664a0
WARNING! Running this program can cause system crashes, data loss and worse! I will write value0x00to address0x664a
You have five seconds to reconsider and press CTRL-C!Warning: Data mismatch, wrote
0x00, read back0xccI stopped at this point.
This is OK. This is even expected, maybe I should have told you so that you don't worry. The register you are writing to is only partly writable, so this is no wonder most bits will now bow before your command and stay the way they were.
BTW, please undestand that these commands go by pair. First command of a pair selects a channel, second writes to a specific register for that channel. They must *always* be run in turn and in this order, or you'll end up writing to a random channel.
As you may have guessed, the fourth command will return a "Data mismatch" message as well, which is OK.
OTOH, if you receive a similar message when reconfiguring the Super-I/O chip (command starting with "isaset 0x2e 0x2f"), then this is *not* OK and you'll have to report to me.
Quoted 4 lines
The configuration file I'm using is a slightly tweaked version of something you had posted to a mailing list. I'll attach it. Below is the output I see from sensors using it. It obviously still needs some tweaking. Some of the voltage calculations must be inappropriate in this case.
Aha, forget about it then. All PC87366 chips I have see so far had different configurations. By "different" I mean different voltages monitored, different order and different resistor combinations. Theoretically, National has recommendations, but unfortunately nobody seems to be following these :( I was hoping you got information from the board maker, and didn't realize the file was from me...
Quoted 2 lines
Is Soekris going to have to let us know how the voltage inputs are wired before we can have any idea what these represent?
Yes, definitely. There's nothing we can do without them telling us what each voltage channel is supposed to measure, and which resistors are in use.
Quoted 11 lines
soekris1# sensors
pc87366-isa-6620
Adapter: ISA adapter+5V: +8.50 V (min = +4.49 V, max = 5.50 V) ALARM Vcore: +2.78 V (min = +0.00 V, max = 2.95 V) +12V: +23.54 V (min = +10.83 V, max = 13.20 V) ALARM 5VSB: +0.00 V (min = +4.49 V, max = 5.50 V) ALARM Vsb: +3.66 V (min = +2.99 V, max = 3.59 V) ALARM Vdd: +3.66 V (min = +2.99 V, max = 3.59 V) ALARM Vbat: +2.95 V (min = +2.40 V, max = 2.95 V) AVdd: +3.64 V (min = +2.99 V, max = 3.59 V) ALARM
No comment...
BTW, do you have an idea on what the Vcore for your CPU is supposed to be?
Thanks,
Jean Delvare
Quoted 3 lines
I'll do a few fixes to the driver this evening, including more debugging messages, this should help us deal with the temperatures. I'll let you know when I have something for you to test.
OK, updated. I didn't actually add debugging messages, only changed them a bit. They look almost fine already. Plus I fixed the fan_div bug. Please check it out and use if possible.
Thanks.
Signature · 2 lines
Jean Delvare http://khali.linux-fr.org/
Quoted 3 lines
Okay, I'm going to compose an email to them concerning what information is needed. What more is needed for proper temperature monitoring, if anything?
1* What are voltage pins monitoring (order and resistors used)? 2* CPU voltage?
3* Are thermal diodes or thermistors used (if any)?
And if you happen to be in contact with someone with more knowledge and will to help:
4* If thermistors are used, we would need the Beta value if not the
default 3435.
5* If the PC87366 fed with an external reference voltage, and if it
is, which value is it?
About the output now:
Quoted 5 lines
soekris1# dmesg -c
pc87360.o version 2.8.8-CVS (2004xxxx) pc87360.o: Device0x09not activated pc87360.o: Using thermistors for temperature monitoring pc87360.o: Using internal reference voltage
This is great, means that the isaset sequence properly switched the "use thermistors" configuration bit.
Quoted 2 lines
soekris1# sensors -s
soekris1# sensors
Please do not run "sensors -s" right after loading the driver. Running "sensors" at least once before will show information that "sensors -s" will overwrite.
Quoted 4 lines
CPU0 Temp: +0 C (low = +0 C, high = +70 C) CPU0 Crit: +85 C CPU1 Temp: +0 C (low = +0 C, high = +70 C) CPU1 Crit: +85 C
Quoted 8 lines
S-IO Temp: +83 C (low = +0 C, high = +70 C) ALARM S-IO Crit: +85 C ERROR: Can't get TEMP4 data! ERROR: Can't get TEMP4 overtemperature data! ERROR: Can't get TEMP5 data! ERROR: Can't get TEMP5 overtemperature data! temp6: -273 C (low = +1 C, high = +67 C) ALARM ERROR: Can't get TEMP6 overtemperature data!
This is no good (I guess you knew that already).
Do the errors happen consistently?
Can you report the values found in files/proc/sys/dev/sensors/pc87366-isa-6620/temp*?
I've attached a patch to be applied against the current CVS tree. I didn't commit it because I don't want that much debugging in the driver in the long run, but that might help in your case. I really feel like I'm missing something obvious at some point, but can't seem to get what. Please apply ("patch -p0 < pc87360-debug.diff" from the lm_sensors2 directory) and recompile (make sure you still have DEBUG=1 in the Makefile), then reload the driver with init=2, and watch the logs. They should contain much more information (or at least I hope so).
Quoted 6 lines
set
temp1_min0
settemp1_max70
settemp1_crit85
settemp2_min0
settemp2_max70
settemp2_crit85
Please comment these lines out for now.
Thanks.
Signature · 64 lines
Jean Delvare
http://khali.linux-fr.org/
-------------- next part --------------
Index: kernel/chips/pc87360.c
=================================RCS file: /home/cvs/lm_sensors2/kernel/chips/pc87360.c,v
retrieving revision 1.38
diff -u -r1.38 pc87360.c
--- kernel/chips/pc87360.c 25 Jun 2004 18:50:06 -0000 1.38
+++ kernel/chips/pc87360.c 27 Jun 2004 08:44:10 -0000
@@ -764,6 +764,12 @@
const u8 init_temp[3] = { 2, 2, 1 };
u8 reg;
+#ifdef DEBUG
+ printk(KERN_DEBUG "pc87360.o: Initializing chip (level %d)\n", init);
+ if (use_thermistors)
+ printk(KERN_DEBUG "pc87360.o: Prefering thermistors\n");
+#endif
+
if (init >= 3 && data->innr) {
reg = pc87360_read_value(data, LD_IN, NO_BANK,
PC87365_REG_IN_CONVRATE);
@@ -802,6 +808,10 @@
reg = pc87360_read_value(data, LD_IN, i,
PC87365_REG_TEMP_STATUS);
use_thermistors = use_thermistors || (reg & 0x01);
+#ifdef DEBUG
+ printk(KERN_DEBUG "pc87360.o: use_thermistors=%d, i=%d, "
+ "reg=%u\n", use_thermistors, i, reg);
+#endif
}
i = use_thermistors ? 2 : 0;
@@ -823,14 +833,29 @@
}
if (use_thermistors) {
+#ifdef DEBUG
+ printk(KERN_DEBUG "pc87360.o: Will enable thermistors if "
+ "needed\n");
+#endif
for (i; i<data->innr; i++) {
if (init >= init_in[i]) {
+#ifdef DEBUG
+ printk(KERN_DEBUG "pc87360.o: Will enable "
+ "temp%d if needed and possible\n", i-7);
+#endif
+
/* The pin may already be used by thermal
diodes */
reg = pc87360_read_value(data, LD_TEMP, (i-11)/2,
PC87365_REG_TEMP_STATUS);
- if (reg & 0x01)
+ if (reg & 0x01) {
+#ifdef DEBUG
+ printk(KERN_DEBUG "pc87360.o: Skipping, "
+ "pin already in use by temp%d\n",
+ (i-11)/2);
+#endif
continue;
+ }
/* Forcibly enable thermistor channel */
reg = pc87360_read_value(data, LD_IN, i,(Could you please inline files you are sending instead of gziping and attaching them? It would make my work easier.)
Quoted 13 lines
Quoted 13 lines
Quoted 12 lines
CPU0 Temp: +0 C (low = +0 C, high = +70 C) CPU0 Crit: +85 C CPU1 Temp: +0 C (low = +0 C, high = +70 C) CPU1 Crit: +85 C S-IO Temp: +83 C (low = +0 C, high = +70 C) ALARM S-IO Crit: +85 C ERROR: Can't get TEMP4 data! ERROR: Can't get TEMP4 overtemperature data! ERROR: Can't get TEMP5 data! ERROR: Can't get TEMP5 overtemperature data! temp6: -273 C (low = +1 C, high = +67 C) ALARM ERROR: Can't get TEMP6 overtemperature data!
Quoted 5 lines
Quoted 3 lines
This is no good (I guess you knew that already).
Do the errors happen consistently?
Yes, they do seem to be consistent.
OK, I found what was causing these errors. Actually it's me, through an incomplete fix I commited some times ago. I won't go into technical details, but in the end it triggered an arithmetic error (such as ln(x) where x<0).
I just fixed it into libsensors. Please do "cvs update lib/chips.c" and update the library with "make user && make user_install". The errors should go away and we may have more interesting readings to go with.
Please let me know how it goes after that.
Quoted 1 line
Yep, definitely quite a bit more output. Included in attachment.
Debug stuff looks good, the thermistor channels are obviously already activated. I think that you should be able to get readings from temp4 and temp5. OTOH, temp6 doesn't seem to be wired at all.
So I invite you to add the following lines in your configuration file:
set temp4_min 0
set temp4_max 85
set temp5_min 0
set temp5_max 85
*after* the compute lines. Don't attempt to set temp4/5_crit yet (if ever). Run "sensors -s" for the new limits to take effect.
Quoted 2 lines
I've also sent that email off to Soekris. Hopefully they'll respond to it soon.
I hope too, but in my experience directing technical questions to sales@ rarely works. Don't they have a support@ contact?
Signature · 2 lines
Jean Delvare http://khali.linux-fr.org/
Quoted 2 lines · CDT Jean Delvare
(Could you please inline files you are sending instead of gziping and attaching them? It would make my work easier.)
No problem. I typically do that because wrapping can get rather ugly, but it's not much of a concern here.
Quoted 7 lines
I just fixed it into libsensors. Please do "cvs update
lib/chips.c" and update the library with "make user && makeuser_install". The errors should go away and we may have more interesting readings to go with.Please let me know how it goes after that.
So I invite you to add the following lines in your configuration file:
Quoted 7 lines
set
temp4_min0
settemp4_max85
settemp5_min0
settemp5_max85*after* the compute lines. Don't attempt to set temp4/5_crit yet (if ever). Run "sensors -s" for the new limits to take effect.
I applied your chils.c patch, but unfortunately I'm still seeing the "Can't get TEMP4/5 data" errors. I'm NOT seeing the "Can't get TEMP4/5 overtemperature data" errors, though.
pc87366-isa-6620
Adapter: ISA adapter
in0: +2.95 V (min = +0.00 V, max = 2.95 V)
in1: +2.24 V (min = +1.18 V, max = 1.45 V) ALARM
in2: +2.79 V (min = +0.00 V, max = 2.95 V)
in3: +0.77 V (min = +0.00 V, max = 2.95 V)
in4: +2.76 V (min = +0.00 V, max = 2.95 V)
in5: +2.77 V (min = +1.27 V, max = 1.55 V) ALARM
in6: +0.00 V (min = +1.18 V, max = 1.45 V) ALARM
Vsb: +3.66 V (min = +2.99 V, max = 3.59 V) ALARM
Vdd: +3.66 V (min = +2.99 V, max = 3.59 V) ALARM
Vbat: +2.95 V (min = +2.40 V, max = 2.95 V)
AVdd: +3.64 V (min = +2.99 V, max = 3.59 V) ALARM
S-IO Temp: +83 C (low = +0 C, high = +70 C) ALARM
S-IO Crit: +85 C
ERROR: Can't get TEMP4 data!
temp4_crit:
-9 C
ERROR: Can't get TEMP5 data!
temp5_crit:
-9 C
temp6: -273 C (low = +109 C, high = +179 C) ALARM
temp6_crit:
-9 CHere's my sensors.conf:
chip "pc87366-*"
# Voltage inputs
# Set VRM version (default 9.0)
# set vrm 9.0
label in7 "Vsb" label in8 "Vdd" label in9 "Vbat" label in10 "AVdd"
compute in7 @*2, @/2 compute in8 @*2, @/2 compute in10 @*2, @/2
# These are the operating conditions as recommended by National # Semiconductor
set in7_min 3.0 set in7_max 3.6 set in8_min 3.0 set in8_max 3.6 set in9_min 2.4 set in9_max 3.6 set in10_min 3.0 set in10_max 3.6
# Temperature inputs
label temp1 "CPU0 Temp" label temp1_crit "CPU0 Crit" label temp2 "CPU1 Temp" label temp2_crit "CPU1 Crit" label temp3 "S-IO Temp" label temp3_crit "S-IO Crit"
set temp3_min 0
set temp3_max 70
set temp3_crit 85
# Thermistors
# On some systems, thermistors are used instead of thermal diodes. # Note that these are the same pins used differently, so you really # can't have them all on a given system.
ignore temp1
ignore temp2
# ignore temp4 # ignore temp5 # ignore temp6
# 3435 is the thermistor beta.
# This assumes that the thermistor forms a resistor divider with a resistor
# equal to its nominal value at 25 degres Celcius. If not, change the values. # We also assume that you have a working in10 (which is forcibly enabled by # default). If not, use 3.3 instead, but you lose accuracy.
compute temp4 3435 / (` (1 / (1 - @ / in10) - 1) + 3435 / 298.15) - 273.15,
\
in10 * (1 - 1 / (1 + (^ (3435 / (273.15 + @) - 3435 /
298.15))))
compute temp5 3435 / (` (1 / (1 - @ / in10) - 1) + 3435 / 298.15) - 273.15,
\
in10 * (1 - 1 / (1 + (^ (3435 / (273.15 + @) - 3435 /
298.15))))
compute temp6 3435 / (` (1 / (1 - @ / in10) - 1) + 3435 / 298.15) - 273.15,
\
in10 * (1 - 1 / (1 + (^ (3435 / (273.15 + @) - 3435 /298.15))))
set temp4_min 0
set temp4_max 85
set temp5_min 0
set temp5_max 85
# Fan inputs
# Ignore fans you don't have
ignore fan1
ignore fan2
ignore fan3
# set fan1_min 2000 # set fan2_min 2000 # set fan3_min 2000
Quoted 5 lines
Quoted 2 lines
I've also sent that email off to Soekris. Hopefully they'll respond to it soon.
I hope too, but in my experience directing technical questions to sales@ rarely works. Don't they have a support@ contact?
I was surprised to see that the sales@ address is where they want technical questions to be addressed. They're a relatively small company, though. I did manage to forget to stick a subject on that message... hopefully their spam filter doesn't catch that :)
http://www.soekris.com/about.htm
--
Andrew D. Johnson
PGP Fingerprint: 77BD 80B1 4918 1D98 9EBF 2E62 073B 9B31 A1DC 41F4
KeyID: 0xA1DC41F4
Looking good! The temperatures seem quite reasonable, too. I do believe the ball is in Soekris' court now. Thanks for all your help thus far.
pc87366-isa-6620
Adapter: ISA adapter in0: +2.95 V (min = +0.00 V, max = 2.95 V) in1: +2.24 V (min = +1.18 V, max = 1.45 V) ALARM in2: +2.78 V (min = +0.00 V, max = 2.95 V) in3: +0.75 V (min = +0.00 V, max = 2.95 V) in4: +2.76 V (min = +0.00 V, max = 2.95 V) in5: +2.77 V (min = +1.27 V, max = 1.55 V) ALARM in6: +0.00 V (min = +1.18 V, max = 1.45 V) ALARM Vsb: Looking good! The temperatures seem quite reasonable, too.
I do believe the ball is in Soekris' court now. Thanks for all your help thus far.
--
Andrew D. Johnson
PGP Fingerprint: 77BD 80B1 4918 1D98 9EBF 2E62 073B 9B31 A1DC 41F4
KeyID: 0xA1DC41F4
Ugh, I cut off the full results. Here they are:
pc87366-isa-6620
Adapter: ISA adapter
in0: +2.95 V (min = +0.00 V, max = 2.95 V)
in1: +2.24 V (min = +1.18 V, max = 1.45 V) ALARM
in2: +2.79 V (min = +0.00 V, max = 2.95 V)
in3: +0.77 V (min = +0.00 V, max = 2.95 V)
in4: +2.76 V (min = +0.00 V, max = 2.95 V)
in5: +2.77 V (min = +1.27 V, max = 1.55 V) ALARM
in6: +0.00 V (min = +1.18 V, max = 1.45 V) ALARM
Vsb: +3.66 V (min = +2.99 V, max = 3.59 V) ALARM
Vdd: +3.66 V (min = +2.99 V, max = 3.59 V) ALARM
Vbat: +2.95 V (min = +2.40 V, max = 2.95 V)
AVdd: +3.64 V (min = +2.99 V, max = 3.59 V) ALARM
temp4: +21 C (low = -0 C, high = +85 C)
temp4_crit:
-9 C
temp5: +25 C (low = -0 C, high = +85 C)
temp5_crit:
-9 C--
Andrew D. Johnson
PGP Fingerprint: 77BD 80B1 4918 1D98 9EBF 2E62 073B 9B31 A1DC 41F4
KeyID: 0xA1DC41F4
Quoted 6 lines · CDT Jean Delvare
1* Make sure that temperatures increase with CPU load, and not the other way around. There are two kind of thermistors, positive coeff and negative coeff. The driver assumes negative, since that's what most people use. But if Soekris did a different choice, you'll have to change the "compute" lines in sensors.conf. Likewise, if Beta value isn't 3435, you'll need to update the "compute" line for proper readings.
Upon further examination, I'm now noticing a problem -- wild temperature swings.
soekris1# sensors
pc87366-isa-6620
Adapter: ISA adapter
in0: +2.95 V (min = +0.00 V, max = 2.95 V)
in1: +2.24 V (min = +1.18 V, max = 1.45 V) ALARM
in2: +2.79 V (min = +0.00 V, max = 2.95 V)
in3: +0.77 V (min = +0.00 V, max = 2.95 V)
in4: +2.76 V (min = +0.00 V, max = 2.95 V)
in5: +2.78 V (min = +1.27 V, max = 1.55 V) ALARM
in6: +0.00 V (min = +1.18 V, max = 1.45 V) ALARM
Vsb: +3.66 V (min = +2.99 V, max = 3.59 V) ALARM
Vdd: +3.66 V (min = +2.99 V, max = 3.59 V) ALARM
Vbat: +2.95 V (min = +2.40 V, max = 2.95 V)
AVdd: +3.64 V (min = +2.99 V, max = 3.59 V) ALARM
temp4: +28 C (low = -0 C, high = +85 C)
temp4_crit:
-9 C
temp5: +31 C (low = -0 C, high = +85 C)
temp5_crit:
-9 Csoekris1# sensors
pc87366-isa-6620
Adapter: ISA adapter
in0: +2.95 V (min = +0.00 V, max = 2.95 V)
in1: +2.24 V (min = +1.18 V, max = 1.45 V) ALARM
in2: +2.78 V (min = +0.00 V, max = 2.95 V)
in3: +0.77 V (min = +0.00 V, max = 2.95 V)
in4: +2.76 V (min = +0.00 V, max = 2.95 V)
in5: +2.77 V (min = +1.27 V, max = 1.55 V) ALARM
in6: +0.00 V (min = +1.18 V, max = 1.45 V) ALARM
Vsb: +3.66 V (min = +2.99 V, max = 3.59 V) ALARM
Vdd: +3.66 V (min = +2.99 V, max = 3.59 V) ALARM
Vbat: +2.95 V (min = +2.40 V, max = 2.95 V)
AVdd: +3.64 V (min = +2.99 V, max = 3.59 V) ALARM
temp4: +39 C (low = -0 C, high = +85 C)
temp4_crit:
-9 C
temp5: +41 C (low = -0 C, high = +85 C)
temp5_crit:
-9 CThis may sound strange, but it seems like the more I run sensors, the higher the temperature goes. If I let it "rest" for a while by not running sensors, the readings seem to return to 20-25C. They *seem* to stay there as long as I don't run sensors too often. Running sensors two or more times in quick succession will almost always yield the swings.
Quoted 4 lines
2* I still wonder why temp3 reads 80 degrees. On the one hand, it looks damn hot and hardly credible. On the other hand, temp3 is an internal sensor, so it cannot possibly be wrong. If you get a contact at Soekris, this is a question you may ask to them.
Ok, will do.
Quoted 7 lines
4* If you confirm that on cold reboot, thermistors (temp4 and temp5) are disabled on your Soekris board, we will need to give you a way to forcibly enable them (instead of temp1 and temp2 by default). Of course you can do it with isaset but that's not particularly convenient. I plan to do that through the init parameter (something like "add 4 to init to prefer thermistors over thermal diodes regardless of how the chip is configured"). Just tell me if you actually need it.
Ok, i'll do a cold reboot sometime tomorrow.
Thanks,
--
Andrew D. Johnson
PGP Fingerprint: 77BD 80B1 4918 1D98 9EBF 2E62 073B 9B31 A1DC 41F4
KeyID: 0xA1DC41F4
Quoted 6 lines · CDT Jean Delvare
3* You'll notice that critical limits on thermistors don't make any sense. If you try to set them to a reasonable value, it'll trigger alarms. I think it's due to a design error by National Semiconductor, but they didn't come back to me about this. I plan to plain discard this "feature" from the driver since it's likely to bring more trouble to the users than help them.
This is somewhat off topic, but I thought I should mention it. I'm assuming that lm sensors uses the min and max settings to configure the chip so that it will return an alert status when a reading is outside the specified range.
How about a mode (command line switch, perhaps) that simply compares the readings with the min and max settings and prints the ALARM status appropriately, without any dependence on the chip? In cases like this where the critical limits don't really work properly, this would simplify shell scripts and other programs that depend on ALARM being there.
Along this vein, why isn't it already being done this way? I'm not asking to be a smartass -- I'm sure there are some very good reasons for it. For example, I suppose some chips might use these critical limits to trigger an audible alert.
Or perhaps there already is such a thing and I just don't know about it :)
--
Andrew D. Johnson
PGP Fingerprint: 77BD 80B1 4918 1D98 9EBF 2E62 073B 9B31 A1DC 41F4
KeyID: 0xA1DC41F4
Quoted 10 lines · CDT Jean Delvare
You may try the following command:
isaset -f
0x66270x02It'll increase the sampling rate (at the cost of power consumption, I suppose). You can revert to the old speed at any time using:
isaset -f
0x66270x00Let me know if it changes anything.
It did have rather interesting results:
pc87366-isa-6620
Adapter: ISA adapter
in0: +2.95 V (min = +0.00 V, max = 2.95 V)
in1: +2.24 V (min = +1.18 V, max = 1.45 V) ALARM
in2: +2.78 V (min = +0.00 V, max = 2.95 V)
in3: +0.79 V (min = +0.00 V, max = 2.95 V)
in4: +2.76 V (min = +0.00 V, max = 2.95 V)
in5: +2.77 V (min = +1.27 V, max = 1.55 V) ALARM
in6: +0.00 V (min = +1.18 V, max = 1.45 V) ALARM
Vsb: +3.66 V (min = +2.99 V, max = 3.59 V) ALARM
Vdd: +3.66 V (min = +2.99 V, max = 3.59 V) ALARM
Vbat: +2.95 V (min = +2.40 V, max = 2.95 V)
AVdd: +3.64 V (min = +2.99 V, max = 3.59 V) ALARM
temp4: +5 C (low = -0 C, high = +85 C)
temp4_crit:
-9 C
temp5: +11 C (low = -0 C, high = +85 C)
temp5_crit:
-9 CThese readings seem to hold steady, regardless of how rapidly I run the sensors program. They return to "normal" when I revert the change.
--
Andrew D. Johnson
PGP Fingerprint: 77BD 80B1 4918 1D98 9EBF 2E62 073B 9B31 A1DC 41F4
KeyID: 0xA1DC41F4
Quoted 54 lines · CDT Jean Delvare
Quoted 4 lines
This is somewhat off topic, but I thought I should mention it. I'm assuming that lm sensors uses the min and max settings to configure the chip so that it will return an alert status when a reading is outside the specified range.
Correct.
Quoted 5 lines
How about a mode (command line switch, perhaps) that simply compares the readings with the min and max settings and prints the ALARM status appropriately, without any dependence on the chip? In cases like this where the critical limits don't really work properly, this would simplify shell scripts and other programs that depend on ALARM being there.
The case of the PC87366 is rather isolated, most chips work properly. I don't really feel like rewriting in software what belongs to hardware and is correctly implemented by 95% of the chips our there.
Also consider that the problem is not only to change the conditions in which we print "ALARM" in sensors. Since you cannot use the critical temperature registers of the PC87366's thermistor channels, for example (else it'll trigger bogus hardware alarms, which in turn can trigger actions), this means that you would have to store the "software critical limit" in a different place. This means that not only "sensors" but the driver would need to be reworked, and this isn't going to happen (simply because I don't see how this would fit in the common chip interface we designed). Another possibility would be for a GUI sensors-like program to allow the user to add arbitrary software limits to just about any measured value. The command-line "sensors" program can hardly do that since it's a one shot program (unless we go on with am additional configuration file for this kind of problem, but frankly it doesn't sound worth it).
Quoted 4 lines
Along this vein, why isn't it already being done this way? I'm not asking to be a smartass -- I'm sure there are some very good reasons for it. For example, I suppose some chips might use these critical limits to trigger an audible alert.
You're correct, alarms can trigger audible alerts, but not only that. They can alter fan speeds, change CPU speeds or modes, generate interrupts, power the system down, etc... It really depends on the chip and how it is wired. For this reason it is important to present hardware alarms to the user.
Second, as said earlier, why would we reprogram in software what most chip do pretty well in hardware? Not only it's a waste of time and energy, but hardware alarms are safer because they are sampled continuously, not only when one runs "sensors".
Another feature of hardware alarms is that you cannot miss them. Most chips remember alarms until they are read at least once. Admittedly it confuses the newcomers because you can see alarms for conditions that have already gone. But it definitely helps confirmed users to know that such conditions happened and may have triggered hardware actions.
Quoted 3 lines
Quoted 1 line
Or perhaps there already is such a thing and I just don't know about it :)
No, there is no such thing.
Thanks, I figured I was missing something fundemental :)
I use lm sensors in a fairly specific manner (nagios monitoring). Sensors is run on a regular interval, and the shell script looks something sort of like this:
if ( sensors | grep -q ALARM ); then
exit $SERVICE_CRITICAL
else
exit $SERVICE_OK
fi
This makes things pretty easy assuming the alarms work, so perhaps you can see why I would ask such a question :) I do completely understand your reasoning, though.
--
Andrew D. Johnson
PGP Fingerprint: 77BD 80B1 4918 1D98 9EBF 2E62 073B 9B31 A1DC 41F4
KeyID: 0xA1DC41F4
As for the main topic, I'm just going to wait until Soekris gets back to me with some more info before asking for more of your time. :)
Quoted 22 lines · CDT Jean Delvare
Quoted 10 lines
I use lm sensors in a fairly specific manner (nagios monitoring). Sensors is run on a regular interval, and the shell script looks something sort of like this:
if ( sensors | grep -q ALARM ); then
exit $SERVICE_CRITICAL
else
exit $SERVICE_OK
fiThis makes things pretty easy assuming the alarms work, so perhaps you can
see
Quoted 1 line
why I would ask such a question :) I do completely understand your
reasoning,
Quoted 1 line
though.
Yeah, I understand what you mean and need.
Anyway, if a specific chip is known to have problems, it's better to fix it at the driver level (even if it includes faking hardare alarms in software). That way, not every program or script needs to handle it specifically.
Quoted 6 lines
Also note that the new sysfs interface to hardware monitoring chips has been reworked in such a way that scripts should be able to perform any kind of tests by themselves. Each sysfs file only contains one integer value, so you could easily read a value and its limit, and compare them manually if you want to. That said, I insist on the fact that in most cases you should rely on hardware alarms since they work OK.
Yep, they do work great for us in the majority of cases.
Quoted 3 lines
As far as the PC87366 chip is concerned, remember that only the critical limit is unusable, min and max limits are OK, so you'll still get an alarm if the measured temperature goes beyond these limits.
Ah, ok, I didn't realize this.
Quoted 2 lines
Are there other hardware monitoring chips you are woking with and which are causing trouble?
Well, now I'm really straying from the topic, but I don't seem to have much luck with getting alarms to triger consistently using the asb100 chip on an A7M266 board. It uses set temp_over and temp_hyst rather than min and max. AFAIK, silly Asus continues to refuse to supply a datasheet for this chip. I believe the Alarm Notes section describes some of these problems:
http://www2.lm-sensors.nu/~lm78/cvs/browse.cgi/lm_sensors2/doc/chips/asb100
--
Andrew D. Johnson
PGP Fingerprint: 77BD 80B1 4918 1D98 9EBF 2E62 073B 9B31 A1DC 41F4
KeyID: 0xA1DC41F4
Quoted 20 lines
I applied your
chips.cpatch, but unfortunately I'm still seeing the "Can't get TEMP4/5 data" errors. I'm NOT seeing the "Can't get TEMP4/5 overtemperature data" errors, though.pc87366-isa-6620
Adapter: ISA adapter in0: +2.95 V (min = +0.00 V, max = 2.95 V) in1: +2.24 V (min = +1.18 V, max = 1.45 V) ALARM in2: +2.79 V (min = +0.00 V, max = 2.95 V) in3: +0.77 V (min = +0.00 V, max = 2.95 V) in4: +2.76 V (min = +0.00 V, max = 2.95 V) in5: +2.77 V (min = +1.27 V, max = 1.55 V) ALARM in6: +0.00 V (min = +1.18 V, max = 1.45 V) ALARM Vsb: +3.66 V (min = +2.99 V, max = 3.59 V) ALARM Vdd: +3.66 V (min = +2.99 V, max = 3.59 V) ALARM Vbat: +2.95 V (min = +2.40 V, max = 2.95 V) AVdd: +3.64 V (min = +2.99 V, max = 3.59 V) ALARM S-IO Temp: +83 C (low = +0 C, high = +70 C) ALARM S-IO Crit: +85 C ERROR: Can't get TEMP4 data!
Quoted 8 lines
temp4_crit:-9 C ERROR: Can't get TEMP5 data! temp5_crit: -9 C temp6: -273 C (low = +109 C, high = +179 C) ALARM temp6_crit: -9 C
Ahhhh I fixed 9 lines and missed 3. Stupid me... Just commited the missing fixed, please try again. Sorry for being impressively inefficient on this.
Signature · 2 lines
Jean Delvare http://khali.linux-fr.org/
Quoted 13 lines
Ugh, I cut off the full results. Here they are:
pc87366-isa-6620
Adapter: ISA adapter in0: +2.95 V (min = +0.00 V, max = 2.95 V) in1: +2.24 V (min = +1.18 V, max = 1.45 V) ALARM in2: +2.79 V (min = +0.00 V, max = 2.95 V) in3: +0.77 V (min = +0.00 V, max = 2.95 V) in4: +2.76 V (min = +0.00 V, max = 2.95 V) in5: +2.77 V (min = +1.27 V, max = 1.55 V) ALARM in6: +0.00 V (min = +1.18 V, max = 1.45 V) ALARM Vsb: +3.66 V (min = +2.99 V, max = 3.59 V) ALARM Vdd: +3.66 V (min = +2.99 V, max = 3.59 V) ALARM
Quoted 8 lines
Vbat: +2.95 V (min = +2.40 V, max = 2.95 V)
AVdd: +3.64 V (min = +2.99 V, max = 3.59 V) ALARM
temp4: +21 C (low = -0 C, high = +85 C)
temp4_crit:
-9 C
temp5: +25 C (low = -0 C, high = +85 C)
temp5_crit:
-9 CYeah, looks good. A few comments though:
1* Make sure that temperatures increase with CPU load, and not the other way around. There are two kind of thermistors, positive coeff and negative coeff. The driver assumes negative, since that's what most people use. But if Soekris did a different choice, you'll have to change the "compute" lines in sensors.conf. Likewise, if Beta value isn't 3435, you'll need to update the "compute" line for proper readings.
2* I still wonder why temp3 reads 80 degrees. On the one hand, it looks damn hot and hardly credible. On the other hand, temp3 is an internal sensor, so it cannot possibly be wrong. If you get a contact at Soekris, this is a question you may ask to them.
3* You'll notice that critical limits on thermistors don't make any sense. If you try to set them to a reasonable value, it'll trigger alarms. I think it's due to a design error by National Semiconductor, but they didn't come back to me about this. I plan to plain discard this "feature" from the driver since it's likely to bring more trouble to the users than help them.
4* If you confirm that on cold reboot, thermistors (temp4 and temp5) are disabled on your Soekris board, we will need to give you a way to forcibly enable them (instead of temp1 and temp2 by default). Of course you can do it with isaset but that's not particularly convenient. I plan to do that through the init parameter (something like "add 4 to init to prefer thermistors over thermal diodes regardless of how the chip is configured"). Just tell me if you actually need it.
Thanks!
Signature · 2 lines
Jean Delvare http://khali.linux-fr.org/
Quoted 46 lines
Upon further examination, I'm now noticing a problem -- wild temperature swings.
soekris1# sensors
pc87366-isa-6620Adapter: ISA adapter in0: +2.95 V (min = +0.00 V, max = 2.95 V) in1: +2.24 V (min = +1.18 V, max = 1.45 V) ALARM in2: +2.79 V (min = +0.00 V, max = 2.95 V) in3: +0.77 V (min = +0.00 V, max = 2.95 V) in4: +2.76 V (min = +0.00 V, max = 2.95 V) in5: +2.78 V (min = +1.27 V, max = 1.55 V) ALARM in6: +0.00 V (min = +1.18 V, max = 1.45 V) ALARM Vsb: +3.66 V (min = +2.99 V, max = 3.59 V) ALARM Vdd: +3.66 V (min = +2.99 V, max = 3.59 V) ALARM Vbat: +2.95 V (min = +2.40 V, max = 2.95 V) AVdd: +3.64 V (min = +2.99 V, max = 3.59 V) ALARM temp4: +28 C (low = -0 C, high = +85 C) temp4_crit: -9 C temp5: +31 C (low = -0 C, high = +85 C) temp5_crit: -9 Csoekris1# sensors
pc87366-isa-6620Adapter: ISA adapter in0: +2.95 V (min = +0.00 V, max = 2.95 V) in1: +2.24 V (min = +1.18 V, max = 1.45 V) ALARM in2: +2.78 V (min = +0.00 V, max = 2.95 V) in3: +0.77 V (min = +0.00 V, max = 2.95 V) in4: +2.76 V (min = +0.00 V, max = 2.95 V) in5: +2.77 V (min = +1.27 V, max = 1.55 V) ALARM in6: +0.00 V (min = +1.18 V, max = 1.45 V) ALARM Vsb: +3.66 V (min = +2.99 V, max = 3.59 V) ALARM Vdd: +3.66 V (min = +2.99 V, max = 3.59 V) ALARM Vbat: +2.95 V (min = +2.40 V, max = 2.95 V) AVdd: +3.64 V (min = +2.99 V, max = 3.59 V) ALARM temp4: +39 C (low = -0 C, high = +85 C) temp4_crit: -9 C temp5: +41 C (low = -0 C, high = +85 C) temp5_crit: -9 C
Quoted 5 lines
This may sound strange, but it seems like the more I run sensors, the higher the temperature goes. If I let it "rest" for a while by not running sensors, the readings seem to return to 20-25C. They *seem* to stay there as long as I don't run sensors too often. Running sensors two or more times in quick succession will almost always yield the swings.
Admittedly weird, especially since thermistor-based measurements are passive (while thermal diode measurements are active). At any rate, running "sensors" doesn't trigger the physical measurements. These are done in the background, whether you read them or not. So I have no explanation to what you see.
You may try the following command:
isaset -f 0x6627 0x02
It'll increase the sampling rate (at the cost of power consumption, I suppose). You can revert to the old speed at any time using:
isaset -f 0x6627 0x00
Let me know if it changes anything.
Once again, it would be very valuable to know for sure from Soekris if we are dealing with thermistors, and of what kind.
Jean Delvare
(Voluntarily not CCing the Soekris list, since your questions not related)
Quoted 4 lines
This is somewhat off topic, but I thought I should mention it. I'm assuming that lm sensors uses the min and max settings to configure the chip so that it will return an alert status when a reading is outside the specified range.
Correct.
Quoted 5 lines
How about a mode (command line switch, perhaps) that simply compares the readings with the min and max settings and prints the ALARM status appropriately, without any dependence on the chip? In cases like this where the critical limits don't really work properly, this would simplify shell scripts and other programs that depend on ALARM being there.
The case of the PC87366 is rather isolated, most chips work properly. I don't really feel like rewriting in software what belongs to hardware and is correctly implemented by 95% of the chips our there.
Also consider that the problem is not only to change the conditions in which we print "ALARM" in sensors. Since you cannot use the critical temperature registers of the PC87366's thermistor channels, for example (else it'll trigger bogus hardware alarms, which in turn can trigger actions), this means that you would have to store the "software critical limit" in a different place. This means that not only "sensors" but the driver would need to be reworked, and this isn't going to happen (simply because I don't see how this would fit in the common chip interface we designed). Another possibility would be for a GUI sensors-like program to allow the user to add arbitrary software limits to just about any measured value. The command-line "sensors" program can hardly do that since it's a one shot program (unless we go on with am additional configuration file for this kind of problem, but frankly it doesn't sound worth it).
Quoted 4 lines
Along this vein, why isn't it already being done this way? I'm not asking to be a smartass -- I'm sure there are some very good reasons for it. For example, I suppose some chips might use these critical limits to trigger an audible alert.
You're correct, alarms can trigger audible alerts, but not only that. They can alter fan speeds, change CPU speeds or modes, generate interrupts, power the system down, etc... It really depends on the chip and how it is wired. For this reason it is important to present hardware alarms to the user.
Second, as said earlier, why would we reprogram in software what most chip do pretty well in hardware? Not only it's a waste of time and energy, but hardware alarms are safer because they are sampled continuously, not only when one runs "sensors".
Another feature of hardware alarms is that you cannot miss them. Most chips remember alarms until they are read at least once. Admittedly it confuses the newcomers because you can see alarms for conditions that have already gone. But it definitely helps confirmed users to know that such conditions happened and may have triggered hardware actions.
Quoted 1 line
Or perhaps there already is such a thing and I just don't know about it :)
No, there is no such thing.
Jean Delvare
Quoted 33 lines
Quoted 11 lines
You may try the following command:
isaset -f
0x66270x02It'll increase the sampling rate (at the cost of power consumption, I suppose). You can revert to the old speed at any time using:
isaset -f
0x66270x00Let me know if it changes anything.
It did have rather interesting results:
pc87366-isa-6620Adapter: ISA adapter in0: +2.95 V (min = +0.00 V, max = 2.95 V) in1: +2.24 V (min = +1.18 V, max = 1.45 V) ALARM in2: +2.78 V (min = +0.00 V, max = 2.95 V) in3: +0.79 V (min = +0.00 V, max = 2.95 V) in4: +2.76 V (min = +0.00 V, max = 2.95 V) in5: +2.77 V (min = +1.27 V, max = 1.55 V) ALARM in6: +0.00 V (min = +1.18 V, max = 1.45 V) ALARM Vsb: +3.66 V (min = +2.99 V, max = 3.59 V) ALARM Vdd: +3.66 V (min = +2.99 V, max = 3.59 V) ALARM Vbat: +2.95 V (min = +2.40 V, max = 2.95 V) AVdd: +3.64 V (min = +2.99 V, max = 3.59 V) ALARM temp4: +5 C (low = -0 C, high = +85 C) temp4_crit: -9 C temp5: +11 C (low = -0 C, high = +85 C) temp5_crit: -9 C
Quoted 2 lines
These readings seem to hold steady, regardless of how rapidly I run the sensors program. They return to "normal" when I revert the change.
Intersting, except that these can't possibly be the temperature of you system, can it?
Have you tried to give your system some work, to see if the values increase or decrease? I seriously suspect that, if these really are thermistors, they are positive coeff ones (as opposed to the common use).
Could you try editing the temp4 and temp5 compute lines? Just replace 3435 with (-3435) everywhere it appears. It'll probably break limits, but it's just a test. I wonder if temperature readings will look any better. I guess I can't insist enough on the fact that hearing from Soekris on what is on the board would be welcome ;)
Thanks,
Jean Delvare
Quoted 10 lines
I use lm sensors in a fairly specific manner (nagios monitoring). Sensors is run on a regular interval, and the shell script looks something sort of like this:
if ( sensors | grep -q ALARM ); then
exit $SERVICE_CRITICAL
else
exit $SERVICE_OK
fi
Quoted 3 lines
This makes things pretty easy assuming the alarms work, so perhaps you can see why I would ask such a question :) I do completely understand your reasoning, though.
Yeah, I understand what you mean and need.
Anyway, if a specific chip is known to have problems, it's better to fix it at the driver level (even if it includes faking hardare alarms in software). That way, not every program or script needs to handle it specifically.
Also note that the new sysfs interface to hardware monitoring chips has been reworked in such a way that scripts should be able to perform any kind of tests by themselves. Each sysfs file only contains one integer value, so you could easily read a value and its limit, and compare them manually if you want to. That said, I insist on the fact that in most cases you should rely on hardware alarms since they work OK.
As far as the PC87366 chip is concerned, remember that only the critical limit is unusable, min and max limits are OK, so you'll still get an alarm if the measured temperature goes beyond these limits.
Are there other hardware monitoring chips you are woking with and which are causing trouble?
Jean Delvare