Strange values on ASRock K7S8X mainboard with W83697 chip
Hi,
I recently got an ASRock K7S8X mainboard, using the SiS 746FX chipset. I'm using vanilla Linux 2.4.26, i2c-2.8.7 and lm_sensors-2.8.7. The sensors detect script detected a W83697HF chip on the ISA bus through a SiS 85C503 ISA bridge. I have the i2c-core, i2c-sis645, i2c-isa and i2c-proc modules loaded, as well as the w83627hf module. An EEPROM which seems related to my RAM was also detected, as was the SiS 5595, which is commonly misdetected I read, and I've ignored the latter two.
This seems to work, but only partially. Here are my current values:
root@nova:~# sensors
w83697hf-isa-0290
Adapter: ISA adapter
VCore: +1.74 V (min = +1.71 V, max = +1.89 V)
+3.3V: +3.33 V (min = +3.14 V, max = +3.46 V)
+5V: +4.87 V (min = +4.74 V, max = +5.24 V)
+12V: +11.32 V (min = +10.83 V, max = +13.19 V)
-12V: +0.56 V (min = -13.16 V, max = -10.90 V)
-5V: +1.84 V (min = -5.26 V, max = -4.76 V)
V5SB: +5.54 V (min = +4.74 V, max = +5.24 V)
VBat: +0.00 V (min = +2.40 V, max = +3.60 V)
fan1: 2755 RPM (min = 135000 RPM, div = 2)
fan2: 0 RPM (min = -1 RPM, div = 2)
temp1: +49 C (high = +68 C, hyst = -94 C) sensor =
PII/Celeron diode
temp2: +43.5 C (high = +120 C, hyst = +120 C) sensor =
PII/Celeron diode
alarms:
beep_enable:
Sound alarm enabledThe positive values seem to be alright. -12V and -5V obviously aren't. Fan1 (the CPU fan) seems to be okay, but Fan2 (case fan) gives 0 rpm, even though it is actually running. Temperature readings do work.
If anyone could shed any light on this I'd love to hear. Are the negative voltages simply not connected? Perhaps fan2 is not the case fan? Or is the hardware broken?
Please CC me, as I'm not on the list.
Thanks in advance,
Lourens
Signature · 1 line
GPG public key: http://home.student.utwente.nl/l.e.veen/lourens.key
Quoted 10 lines · Rudolf Marek
Hello,
Quoted 4 lines
The positive values seem to be alright. -12V and -5V obviously aren't. Fan1 (the CPU fan) seems to be okay, but Fan2 (case fan) gives 0 rpm, even though it is actually running. Temperature readings do work.
The voltages might use non-standart circuit, only chance getting this working is bios disassembly. Second reason might be that it is actualy unconnected.
Hmm. I guess I could try emailing ASRock, and see if they have anything to say about it. After staring at the numbers for a while I've noticed that they do vary slightly, so it's likely that something is actually connected. The raw values (/proc/sys/dev/sensors/w83697hf-isa-0290/in5) I've seen for in5 so far are 3.01 and 2.99 (187/188 on the ADC), in6 does 3.02 through 3.06 (189/191). I've also looked at the datasheet for the w83697hf now, but that didn't yield anything beyond that something strange is going on. My R3/R4 ratio appears to be about 25.4, and my R5/R6 ratio is about 14.4, that is if my power supply is perfect. I guess I'll have to reboot to see what the BIOS says.
These values work out to the following lines in the configuration file.
compute in5 (26.44 * @) - 91.58 , (@ + 91.58) / 26.44 compute in6 (15.36 * @) - 51.69 , (@ + 51.69) / 15.36
Note the huge multipliers, the values are jumping up and down in increments of about 0.3V for the -5V and 0.5V for the -12V now. That's way too much, so I'm guessing ASRock changed the offset voltage as well.
I've emailed them, we'll see what happens.
Incidentally, the values for +5 and +12 seem to be off as well, at 4.84V and 11.25V. I'm ready to chalk that up to the use of cheap large-tolerance resistors though. I did the numbers based on the datasheet and assuming my +12v really is +12v, R1/R2 works out to be about 3.0, which is about 8% higher than the 28K/10K given in the datasheet. That's within the margins for 5% resistors.
Quoted 8 lines
You can add ignore statements to
/etc/sensors.conf.First find your chip configuration part and use the ignore statement.
like ignore inX where X would corresspond to the label inX statement. ignore in6
ignore in5
But that wouldn't solve anything... Although it would look prettier :-).
Quoted 7 lines
For the fan there might be two reasons
1) fan3 is ignored via the config file
2) fan2 has wrong divisor setset
fan2_div4
(try 8)
Aha! Setting the divisor to 4 did the trick here. Thanks!
Lourens
Signature · 1 line
GPG public key: http://home.student.utwente.nl/l.e.veen/lourens.key
Quoted 15 lines · Rudolf Marek
Quoted 4 lines
Hmm. I guess I could try emailing ASRock, and see if they have anything to say about it. After staring at the numbers for a while I've noticed that they do vary slightly, so it's likely that something is actually connected. The raw values
Quoted 8 lines
(
/proc/sys/dev/sensors/w83697hf-isa-0290/in5) I've seen for in5 so far are 3.01 and 2.99 (187/188 on the ADC), in6 does 3.02 through 3.06 (189/191). I've also looked at the datasheet for the w83697hf now, but that didn't yield anything beyond that something strange is going on. My R3/R4 ratio appears to be about 25.4, and my R5/R6 ratio is about 14.4, that is if my power supply is perfect. I guess I'll have to reboot to see what the BIOS says.In the bios you will see:
Quoted 12 lines
32 Bit Transfer Mode
Size
CPU Temperature
M/B Temperature
CPU Fan Speed
Chassis FAN Speed
Vcore
+ 3.30V
+ 5.00V
+ 12.00V
American Megatrends Inc.
P2.40
I've still got version P2.20, but the ASRock changelog doesn't say anything about sensors.
Quoted 5 lines
so I guess no negative volatages
But in bios image there is something that is prepared for negative volatges
How did you get that BIOS image? Is there a way to extract it? I'd love to have a look. I tried downloading the images from the ASRock website, but they don't even have those strings in them. Or am I missing something?
Quoted 10 lines
eg000:206C cmp ah, 25h ; '%'
Ieg000:206F jbloc_0_209Fcontinue here if IN number is bigger eq than 25 (so in5 in6)
Ieg000:2071 cmp ah, 50h ; 'P' Ieg000:2074 jnb loc_0_209Fcontinue here if register number is smaller than 50 (I must ask khali what is it)
According to the data sheet, register mappings between 25h and 50h are:
20h-3Fh Monitor Value Registers
49h VID<4>/Device ID
4Ah Temperature 2, 3 Serial Bus Address
4Bh-4Dh Control Register
4Eh Select bank for 50h-5Fh Reg.
4Fh Winbond vendor ID
50h-5Fh are mapped to 5 different banks which are apparently selected through register 4Eh. I guess this 50h limit is pretty arbitrary...
Quoted 11 lines
Ieg000:2076 mov byte ptr es:[si], 2Dh ; '-'
Here: write '-' before printing voltage !!!!
Ieg000:207A inc si Ieg000:207B mov ah, 0A0h ; '?' Ieg000:207D mul ah Ieg000:207F mov cx, ax Ieg000:2081 mov ax, 24h ; '$' Ieg000:2084 mul bx
Hmm, multiply by 160. The LSB of the ADC output is 16mV. So we're working in tenths of millivolts apparently.
Quoted 2 lines
The BX value is somewhere hidden or even not included so I cant tell anything about the formula.
Well, I worked it out from that disassembly, and we can say something about the formula. If I didn't make any mistakes, it seems to follow the formula in the datasheet, with the mysterious BX being the beta value. The 24h (36) in there is the 3.6V reference voltage. This means that my original estimate is probably somewhere near correct, but it leaves the problem of the resolution being way too small.
Theory: the hardware guys at ASRock miswired in5 and in6. The BIOS software guys programmed the BIOS according to the datasheet. When testing, they noticed the problem, and disabled the negative voltage readout. It is a low-budget product after all, so fixing the hardware might simply have been too expensive. And negative voltages are hardly used in todays PCs anyway.
I've emailed ASRock, whose first reaction was to tell me to try the program at http://mbm.livewiredev.com. I took a second try at explaining them that I'm running Linux, and that I would like to know the formulas. I haven't had any response so far, but it's only been half a day. We'll see what happens.
Quoted 1 line
Please dont forget to CC to list.
Of course.
Cheers,
Lourens
Signature · 1 line
GPG public key: http://home.student.utwente.nl/l.e.veen/lourens.key
Quoted 7 lines
Quoted 7 lines
Theory: the hardware guys at ASRock miswired in5 and in6. The BIOS software guys programmed the BIOS according to the datasheet. When testing, they noticed the problem, and disabled the negative voltage readout. It is a low-budget product after all, so fixing the hardware might simply have been too expensive. And negative voltages are hardly used in todays PCs anyway.
Looks like I was wrong. I just talked to Khali on IRC, and he gave me some tips which seem to work. So, for future reference, here is what seems to be the right configuration for the ASRock K7S8X:
compute in3 ((6.8/10)+1)*@ , @/((6.8/10)+1)
compute in4 ((30/10)+1)*@ , @/((30/10)+1)
compute in5 -((30/10)+1)*@ , -@/((30/10)+1)
compute in6 -((6.8/10)+1)*@ , -@/((6.8/10)+1)Also note the 30 instead of the default 28, that solves the too-low reading and it's been used on other mainboards as well according to Khali.
I'll still let you know if/when I get more from ASRock.
Lourens
Signature · 1 line
GPG public key: http://home.student.utwente.nl/l.e.veen/lourens.key
Hello,
Quoted 4 lines
The positive values seem to be alright. -12V and -5V obviously aren't. Fan1 (the CPU fan) seems to be okay, but Fan2 (case fan) gives 0 rpm, even though it is actually running. Temperature readings do work.
The voltages might use non-standart circuit, only chance getting this working is bios disassembly. Second reason might be that it is actualy unconnected.
You can add ignore statements to /etc/sensors.conf.
First find your chip configuration part and use the ignore statement.
like ignore inX where X would corresspond to the label inX statement. ignore in6
ignore in5
For the fan there might be two reasons
1) fan3 is ignored via the config file
2) fan2 has wrong divisor set
set fan2_div 4
(try 8)
After these changes (to config file) dont't forget to run sensors -s
I hope this helps.
Please CC to list too when replying.
Thanks
Regards
Rudolf
Quoted 12 lines
Hmm. I guess I could try emailing ASRock, and see if they have anything to say about it. After staring at the numbers for a while I've noticed that they do vary slightly, so it's likely that something is actually connected. The raw values (
/proc/sys/dev/sensors/w83697hf-isa-0290/in5) I've seen for in5 so far are 3.01 and 2.99 (187/188 on the ADC), in6 does 3.02 through 3.06 (189/191). I've also looked at the datasheet for the w83697hf now, but that didn't yield anything beyond that something strange is going on. My R3/R4 ratio appears to be about 25.4, and my R5/R6 ratio is about 14.4, that is if my power supply is perfect. I guess I'll have to reboot to see what the BIOS says.
In the bios you will see:
32 Bit Transfer Mode
Size
CPU Temperature
M/B Temperature
CPU Fan Speed
Chassis FAN Speed
Vcore
+ 3.30V
+ 5.00V
+ 12.00V
American Megatrends Inc.
P2.40
so I guess no negative volatages
But in bios image there is something that is prepared for negative volatges
eg000:206C cmp ah, 25h ; '%'
Ieg000:206F jb loc_0_209F
continue here if IN number is bigger eq than 25 (so in5 in6)
Ieg000:2071 cmp ah, 50h ; 'P' Ieg000:2074 jnb loc_0_209F
continue here if register number is smaller than 50 (I must ask khali what is it)
Ieg000:2076 mov byte ptr es:[si], 2Dh ; '-'
Here: write '-' before printing voltage !!!!
Ieg000:207A inc si Ieg000:207B mov ah, 0A0h ; '?' Ieg000:207D mul ah Ieg000:207F mov cx, ax Ieg000:2081 mov ax, 24h ; '$' Ieg000:2084 mul bx
The BX value is somewhere hidden or even not included so I cant tell anything about the formula.
Ieg000:2086 sub ax, cx Ieg000:2088 jnb loc_0_208B Ieg000:208A dec dx
Ieg000:208B
Ieg000:208B loc_0_208B: ; CODE XREF:
Ieg000:208B push ax
eg000:208C push dx
Ieg000:208D mov ax, 0Ah Ieg000:2090 mul bx Ieg000:2092 mov cx, 2710h Ieg000:2095 sub cx, ax Ieg000:2097 pop dx Ieg000:2098 pop ax Ieg000:2099 div cx Ieg000:209B mov bx, cx Ieg000:209D jmp short loc_0_20A7 Iseg000:20A7 push dx Iseg000:20A8 mov dx, ax Iseg000:20AA call ascii Iseg000:20AD mov al, 2Eh ; '.'
Print decimal dot.
Iseg000:20AF call sub_0_1F40 Iseg000:20B2 pop ax Iseg000:20B3 mov dx, 3E8h multiply by 1000 (3e8 is 1000 i think) Iseg000:20B6 mul dx Iseg000:20B8 div bx Iseg000:20BA mov dx, ax Iseg000:20BC cmp ax, 64h ; 'd' Iseg000:20BF ja loc_0_20CE Iseg000:20C1 mov al, 30h ; '
In0, in2, in3, in4 has all constants included (so its supported by BIOS) so I can derive the formulas if you really need them.
label in0 "VCore 1"
label in2 "+3.3V"
label in3 "+5V"
label in4 "+12V"Please dont forget to CC to list.
Thanks.
Regards
Rudolf
Quoted 3 lines
I've still got version P2.20, but the ASRock changelog doesn't say anything about sensors.
I tried the fist version and last version. They are the same. (in this part of code)
Quoted 4 lines
How did you get that BIOS image? Is there a way to extract it? I'd love to have a look. I tried downloading the images from the ASRock website, but they don't even have those strings in them. Or am I missing something?
It is compressed. Just imagine that image like a filesystem. There are some tools available.
See my Bios Hacking guide, made for this purpose :)
http://assembler.cz/biohack.html
Quoted 2 lines
Hmm, multiply by 160. The LSB of the ADC output is 16mV. So we're working in tenths of millivolts apparently.
Nice.
Quoted 12 lines
Quoted 3 lines
The BX value is somewhere hidden or even not included so I cant tell anything about the formula.
Well, I worked it out from that disassembly, and we can say something about the formula. If I didn't make any mistakes, it seems to follow the formula in the datasheet, with the mysterious BX being the beta value. The 24h (36) in there is the 3.6V reference voltage. This means that my original estimate is probably somewhere near correct, but it leaves the problem of the resolution being way too small.
Quoted 6 lines
Theory: the hardware guys at ASRock miswired in5 and in6. The BIOS software guys programmed the BIOS according to the datasheet. When testing, they noticed the problem, and disabled the negative voltage readout. It is a low-budget product after all, so fixing the hardware might simply have been too expensive. And negative voltages are hardly used in todays PCs anyway.
very nice catch maybe very close to reality.
Quoted 6 lines
I've emailed ASRock, whose first reaction was to tell me to try the program at http://mbm.livewiredev.com. I took a second try at explaining them that I'm running Linux, and that I would like to know the formulas. I haven't had any response so far, but it's only been half a day. We'll see what happens.
Heh looking forward.
If you want to talk about this just go to IRC on irc.freenode.net #linux-sensors
Regards
Rudolf