sensor_config
sensor_config copied to clipboard
Support for MSI B350 Gaming Plus
I would like to get/add support for MSI B350 Gaming Plus. I plan to take your X350 config and see what I need to change to make it work.
What I could really use is some kind of guide / guidelines how to provide such support.
There really isn't much of a guideline.
The sensors application relies partly on hwmon (that is /sys/class/hwmon/hwmonX) for fan data, as well as kernel modules and the /etc/sensors.d/ config table files on how to interpret hwmon data.
For an introductory guide you can reference this: https://wiki.archlinux.org/index.php/lm_sensors#Tips_and_tricks
And the sensors.conf example file: https://github.com/groeck/lm-sensors/blob/master/etc/sensors.conf.eg
First thing you'd want to do is run sensors -u to get a raw dump of all the inputs available to you.
Then pretty much dump those in a file in /etc/sensors.d/BoardName . Obviously you'll have to format it to fir the sensors conf pattern.
Inside the file you need to state which sensor your config applies to
The sensors is usually stated on the first line of sensors -u output
In my case it is nct6779-isa-0290
Next we will start correlating the voltages and temps etc for a system that's under load and idle.
Because that's where scaling factors come in. The best approach there is to monitor voltage jumps between idle and load under windows or to look at the little jumps that voltages do in the BIOS. Observe voltage differences. The voltage "jumps" are multiples of the scaling factors, which you then can use to map inX with the respective voltages and to calculate the scaling factors.
For understanding the various parameters you can read man sensors.conf or look here:
https://linux.die.net/man/5/sensors.conf
In my case I happened to have a datasheet available to determine the resistor values for the voltage dividers used on the voltage sensors http://www.datasheet-pdf.com/PDF/NCT6779D-Datasheet-novoTon-788178
I documented this in the sensor config file itself You will have to extensively refer to it probably https://github.com/rigred/sensor_config/blob/master/X370/ASRock/ASRock-X370-Gaming-K4
# Compute Inputs
# The nct6779D uses a 2.048V input range, all inputs above that are scaled using a voltage divider.
# Specific inputs like the ADC, AVCC, VBAT, 3VSB and 3VCC utilize an integrated voltage divider
#
# values as per nuvoton nct6779D datasheet
# Section 8.5 Analog Inputs (Page 54,55)
# # Vs R1,Rin R2,Rf Vin
# in4 +12.0 56 10 ~+1.84
# in12 +5.0 20 10 ~+1.67
#
compute in0 @*2, @/2
compute in1 @*2, @/2
compute in4 ((56/10)+1)*@, @/((56/10)+1)
In addition a big help was using output from existing software such as hwinfo under windows.

@mchwalisz Have you made any progress on this?
If so you can send me what you have and I'll try put something together.
I have started on my fork https://github.com/mchwalisz/sensor_config/tree/master . Have only the fan info figured out for now. Don't have windows so it is kind of hard to figure out the rest.