Joe Gidi <j...@entropicblur.com> wrote:

> Hi Todd,
> 
> Thanks for taking the time to review and offer improvements. I'm attaching
> a new diff that incorporates your suggestion for simplifying the matching
> and eliminating the unneeded struct and function. It is definitely a
> cleaner, simpler approach. I also corrected the whitespace issue you
> pointed out.
> 
> I made a few tweaks to the voltage calculations. I actually spent quite a
> bit of time going down the rabbit hole here, and while I made some
> improvements, it is definitely not perfect yet. I removed the division by
> 2 from Vcore; I'm pretty confident this is correct, because I'm now seeing
> the voltage I expect, and the datasheet says:
> 
> "The CPUVCORE pin feeds directly into the ADC with no voltage divider
> since the nominal voltage on this pin is only 1.2V."
> 
> I actually installed Windows on this machine so I could run HWiNFO64 and
> see how the sensors looked there; I'm including a screenshot for your
> reference. Under Windows, it looks like the sensors are enumerated and
> displayed in the same order, though VBAT and VTT are skipped. Windows
> appears to have VIN2 and VIN3 labeled as +12V and +5V, though the values I
> see in HWiNFO64 are both slightly low and disagree with the values I see
> in the BIOS. With the current version of my patch, VIN3 looks correct and
> matches the BIOS value for +5V but VIN2 is low by a factor of about 3.5. I
> adjusted VIN4, VIN5 and VIN6 by dividing by 2; this brings their readings
> in line with what I see in HWiNFO64.
> 
> From what I've read from the Linux lm_sensors folks, it's a
> trial-and-error process to adjust these values correctly, and sometimes
> the readings are just garbage. As it stands, the patch is definitely
> better than not having sensors, and these values could always be tweaked
> with subsequent patches. If you have any suggestions for improvements
> here, please let me know.

What you just said is *on your machine*, or maybe not.

It is a disaster out there.

Do not worry about the inaccuracies.  There are no tables which map this
either.

Reply via email to