Re: [NCT6775] Additional temperature sensors on nct6791d

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

After all this time I've made a small discovery by chance: changing
the BIOS to control a fan (CASE fan 2) via the additional sensor
(T_SENSOR1), will expose the sensor at 0x77 in bank 0:

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00: 04 ff 04 4e 00 ff ff ff ff ff ff ff ff ff ff ff
10: 04 00 04 61 04 ff 03 ff 40 7f 00 64 00 00 00 00
20: 74 7e d2 d2 7e f7 00 28 ff ff ff da 00 83 77 e3
30: ba e3 ba 83 77 ff ea 51 00 37 32 ff ff ff ff ff
40: 03 1e 07 ff df 00 1e ff 2d ff ff 10 00 55 00 a3
50: 05 ff ff ff ff ff ff ff c1 ff ff ff ff 01 00 ff
60: 00 00 ff ff ff 01 00 ff ff ff ff ff ff ff ff ff
70: 00 0a 00 2d 00 2d 00 16 00 2d 00 74 80 ff ff ff
80: ff 7f 3f bf ff 05 05 05 00 00 00 00 00 00 00 00
90: 0a 00 00 00 00 fd fd fd 0a 95 ef 80 ff 40 46 c4
a0: 0e ff 00 00 ff 00 00 ff 00 00 80 66 06 06 01 00
b0: 00 00 00 00 00 00 3b 00 04 00 00 09 2c 40 04 00
c0: ff ff ff ff ff ff ff ff ff 03 02 05 ff ff ff ff
d0: 05 05 05 05 00 00 00 00 00 00 00 00 fd fd fd fd
e0: 55 80 00 00 00 ff ff ff ff ff 00 00 16 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 6f ff ff ff

Here, the sensor is in my room which is 0x16=22 (°C). Verified by
trying a hot cup of water and ice water (1-77°C).

It occured to me that maybe BIOS has written to bank 3 at 0x0. It
seems it reads out 0x10 if the control is CPU and 0x1f if the control
is set to the additional sensor. However, writing 0x1f to bank3 0x0
will only mess up the BIOS fan control until reboot, and I can not
find the temperature in the bank 0.

So, BIOS is doing something else here (and, in your previous message
you said 0x1f = virtual temp, which is not explained in detail).

I can provide the dumps of the registers in case that helps, in both
BIOS configurations.

Cheers!

2015-04-19 11:37 GMT+03:00 Ville Aakko <ville.aakko@xxxxxxxxx>:
> Hi again,
>
> Sorry for a late reply - I apprecieate your help. I had other duties
> (and then I had a flu), to do so I didin't have time to look into this
> and reply before.
>
> But, I believe I've had no luck so far. Maybe the additional sensor is
> not handled trough the nct6791d after all? Details inline:
>
> 2015-04-12 18:40 GMT+03:00 Guenter Roeck <linux@xxxxxxxxxxxx>:
>> On 04/12/2015 06:37 AM, Ville Aakko wrote:
>>> 2015-04-11 5:12 GMT+03:00 Guenter Roeck <linux@xxxxxxxxxxxx>:
> [SNIP]
>>>> Additional temperature registers:
>>>>
>>>> Bank 0:
>>>>          0x27            SMIOVT1
>>>>
>>>> The temperature source for this register is set in bank 6, register 0x21.
>>>>
>>>>          0x73, 0x74      Monitor Temperature Register 1 (0x73=fraction,
>>>> 0x74=Integer)
>>>>          0x75, 0x76      Reg 2
>>>>          0x77, 0x78      Reg 3
>>>>          0x79, 0x7a      Reg 4
>>>>          0x7b, 0x7c      Reg 5
>>>
>>>
>>> However, if I've understod your information correctly, SMIOVT1 is
>>> always shoving 0x24 or 0x25, and SMIOVT2 seems to be 0x33. The select
>>> registers are set to 01 and 02, (and reg 0x0, bank 0xa to 0x03), which
>>> does not make sense? They should be set to 0x73 to 0x7c to provide
>>> anything meaningful? See below:
>>>
>> I hope I did not say that ;-). The source select registers always
>> have the same definition, and that definition is further below.
>> 0x01 is SYSTIN, 0x02 is CPUTIN.
>
> Yes, I was confused about the bank in question since I haven't fiddled
> with this kind of things before =). But I think I understand now what
> you meant.
>
>>> Should I try to write to registers (0x0 in bank 1, 2, 3, 8 or 9 to
>>> anything ranging from 0x0 to 0x20 and the corresponding set registers)
>>> with isaset? I'm not sure exactly what I should input, and the isaset
>>> man page does not actually encourage tinkering if one is not totally
>>> sure what he/she is doing =). How to select bank with isaset? I'll be
>>> responsible of course if I will blow up my computer with isaset, but
>>> I'd still like to know if that is the right thing to do before I try
>>> it.
>>>
>> You could try that with bank 8. The PCH temperatures as well as BYTE_TEMP
>> are also reported in bank 4, registers 0x00 to 0x1a (two registers per
>> temperature). Those all report 0 per your log above.
>>
>> The only unreported temperatures are therefore the temperatures
>> reported through the SMBUs master sources. So you could set register
>> 0x00 of bank 8 to 0x08 .. 0x0f and see if that makes a difference
>> for the temperature reported at 0x79 / 0x7a.
>>
>> The bank register is at register 0x4e in every page. You would set
>> the bank first with isaset, followed by the actual isaset command.
>>
>> sudo isaset -y 0x295 0x296 0x4e 8
>> sudo isaset -y 0x295 0x296 0x0 0x08 [0x09, 0x0a, ... , 0x0f]
>> sudo isadump -y 0x295 0x296 0
>>
>> If 0x79 / 0x7a reports anything but 0, we may have found your sensor.
>> You might want to unload the nct6775 driver before doing those tests.
>
> I did this. At first I need to load (after a reboot) the nct6775
> driver - otherwise, all the registers would report all 0xff's when I
> tried to dump them with isadump. So something is initialized by the
> driver, is this normal? But after modprobe I removed the driver and
> tried the commands. I even did it again after a fresh reboot, in case
> the chip was in some odd state because I could have mad a mistake /
> after I had been running lm_sensors initialization script (I disabled
> the script / service to make sure nothing has been done to the
> registers).
>
> In 0x79 I usually had 0xfd, but I had seen anything from 0xfe to 0xff
> without any apparent pattern. 0x7a is always 00.
>
> I also dumped bank 8 to check 0x00 that it was written corretly - and
> it was. I also wrote the value for PCH and SYSTIN in the select
> register, since I know what PCH and SYSTIN should approximately show,
> and the right values seemed to appear in bank 0 / 0x79-0x7a.
>
> So, any other ideas?
>
> If you are running out of ideas, I was thinking about contacting ASUS
> support, maybe they'd like to share some information on this (where
> the additional sensor is actually handled and if they'd like to
> disclose any information). Hearing / reading about their reputation
> earlier on Linux support, I'd doubt that would help, but I guess it
> couldn't hurt either to ask.
>
> (I can provide the dumps from isadump if you wish, but I didn't notice
> anything peculiar in them)
>
>> I am wondering - when you do all your tests in the BIOS, do you
>> see the temperature (changes) reported there correctly ?
>
> Yes. I tried it (in real time while watching the figure) in room
> temperature (21-22°C), glass of (fresh / really cold and full of ice)
> water (0°C) and my graphics card heat sink (44°C, though I don't have
> a reference measurement for the heat sink).
>
> Thanks for your help!
>
> --
> --
> Ville Aakko - ville.aakko@xxxxxxxxx



-- 
--
Ville Aakko - ville.aakko@xxxxxxxxx

_______________________________________________
lm-sensors mailing list
lm-sensors@xxxxxxxxxxxxxx
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors




[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux