Closed moonraker2 closed 5 years ago
The Z370 Pro4 seems to have an uncommon Nuvoton NCT6683 Super IO chip that I don't yet have experience with. As far as I can tell the driver should be in mainline as of June 2018 Kernel Code Kernel Doc
My best guest is that it is similar/identical to the NCT6686 NCT6686/NCT6683 Datasheet (PDF)
Can you start by following the below guide to get the relevant kernel module loaded?
Asrock Z370M Pro4 and lm_sensors
Then report back here with:
modinfo nct6683
sensors -u
sudo find /sys/class/hwmon/hwmon[0-9]/ -type f -printf '%p, ' -exec cat {} \; > hwon_dump.csv
Hello and thanks for responding to this request so quickly!
I've followed your guide and collected the information you ask for:
modinfo_sensors_dump.txt Link to dump file of hwmon sensors (link to my google drive, as github does not support CSV): https://drive.google.com/file/d/1LcQKLHrxkP2Y7Kajt6ROvMWBlQuoxDgZ/view?usp=drivesdk
Thanks for the quick data gathering. It looks like I will be able to put something together here with these screenshots, the dump and the datasheet. But it's late here so I'll take a go at it tomorrow morning.
Quick follow up, can you put some load on your system (Run perhaps Prime95 for linux, mprime -t
) or stress-ng
Wait about 3 minutes for things to warm and Voltages to stabilize to load line spec. Then send me sensors output while that is happening, it will greatly help me to categorise what voltages and temperatures belong to which sensors.
I suspect VIN3 (1.248V) is your CPU voltage, which is expected for 6Core 8 series Intel CPU Idle voltages. Have you overclocked / manually set any voltages?
Did a stress test with:
stress -c 6
Left it running for a few minutes and then checked sensors with sensors -u
- result attached in txt-file below:
sensors-u.txt
I've overclocked my RAM only, by using XMP profile:
By the way, my CPU is actually 9th series - just in case that's of any importance.
I've made a Preliminary config here https://gist.github.com/rigred/e37e90d7f6cbeb9b2d98a5c2ec240789
It does not yet calculate scaling values for Vcore, 5V and 12V, or whatever strange value in6 is.
If you have a windows & linux dual boot system, take a look and see if you can get some correlated output from HWInfo on windows.
I've already cross referenced with a few a few other boards like the ASRock Z270M Pro4 which appears to use the exact some SuperIO, but slightly different VIN ordering.
Updated the gist to calculate approximate scalar values for Vcore (I'm quite sure of Vcore 2x since that is quite common)
What I'm not sure of is the 5V and 12V voltage divider resistors, those are just approximated for now, but for all I know they might be the other way round.
So those are not guaranteed true, to really find out we would need a better datasheet or measure resistors on the mainboard with a Digital Multimeter.
Awesome work!
Unfortunately, I've only got linux installed on this machine as of now, so I won't be able to get the corresponding hwinfo output for you.
With the preliminary config being ready, how do I go about implementing that on my system in a safe manner?
You can just copy the file ASRock_Z370-Pro4
into /etc/sensors.d/ASRock_Z370-Pro4
and then run sensors
.
lm_sensors will then use that config file with the "nct6683-isa-0a20"
header to parse the values from the kernel hwmon interface for the nct6683 sensor at isa address 0a20.
It's entirely safe, since where not directly manipulating the chip, we're just properly interpreting the data sent from the hwon interface.
Please also read through the config file, It's heavily commented and will help you understand how lm_sensors config files work as well as let you experiment for yourself.
I did read throught the config and understood... some of it :)
Now for the possibly dumb question;
Having copied the config file to /etc/sensors.d/ as you said, is there something else I need to do, in order to have this configuration working post-reboot?
Or is it actually necessary to manually force-load the nct6683 driver with sudo modprobe nct6683 force=1
each time I want to be able to read all sensor data?
You can add the following files and have everything work at boot, (lm sensors automatically loads the relevant config from /etc/sensors.d/
nct6683
The next file should not be needed, but here you can set extra module options if needed.
options nct6683 force=1
AFAIK the only thing that might have issues on the NCT6683 driver is PWM/DC fan speed control. But I haven't tried that since I'd need a board to do that.
But you could test by digging through /sys/class/hwmon/hwmon1
hwmon1 in your case exposes the files to control the nct6683 directly.
Writing values between 0-255 into /sys/class/hwmon/hwmon1/pwm1
should change the fan speed, though I don't see a mode
file, which tells me that pwm fan speed control is probably not fully implemented in the nct6683 driver.
This is what a normal pwm control file structure would look like
pwm1
pwm1_auto_channels_temp
pwm1_auto_point1_temp
pwm1_auto_point1_temp_hyst
pwm1_auto_point2_temp
pwm1_auto_point3_temp
pwm1_auto_slope
pwm1_auto_start
pwm1_enable
pwm1_freq
I'm not entirely sure what you mean with regards to the file I am to create in /etc/modules-load.d/
Should I just create a file named asrock-nct6683d.conf with the content:
options nct6683 force=1
?
Or should I also include the driver name nc6683
, on a separate line?
Oh, and should I set specific permissions on this file, as well as on the config in /etc/sensors.d/ ?
My apologies if these questions are a bit basic, but I really don't want to break anything on my system :)
Concerning the fan speed control, that would be a nice feature to have, but I think I'll make do without it, as I've already configured custom fan speed stepping in BIOS.
You can create them all with sudoedit and it will have the appropriate root permissions.
/etc/modules-load.d/
is merely a directory for specifying modules to load
In it you simply create files and list the modules you want loaded, each on it's own line.
I actually made a mistake in my earlier comment, the second file should be:
options nct6683 force=1
This is used for specifying parameters for loaded modules.
Ok. I created two files as you specified:
/etc/modules-load.d/asrock-nct6683d.conf with this content: nct6683 And /etc/modprobe.d/asrock-nct6683d.conf with this content: options nct6683 force=1
Unfortunately it's not working after reboot. Is there something I'm missing here?
@rigred Did you see my last comment? Maybe you can give me a few tips on how to troubleshoot my currently non-working configuration?
I suspect your distro (ubuntu?) might simply not be loading the module as specified.
Try removing /etc/modprobe.d/asrock-nct6683d.conf
And change /etc/modules-load.d/asrock-nct6683d.conf
to contain
nct6683 force=1
Your kernel should load the module at boot and work properly then. Although, I have noticed you are also using ubuntu with a pretty old kernel. The old kernel might have an old nct6683 module in it still, that gives issues.
But these are linux fundamentals I expect from others if they are interested in sensors and hardware level configuration. I can only give so much guidance, (and I can't do it for everyone). I also expect you to do some research and learning on your own. And I don't mean this in a bad way.
Yup, I'm on Ubuntu 18.04LTS. Fully updated, by the way. I don't know if this distro version is considered old already.. maybe :)
I hear what you're saying with regard to my lack of knowledge in this area, and you're right that I haven't studied the subject of sensors and hardware level config. very extensively at all. Truthfully, I expected the implementation of the config file that you provided for me (which is highly appreciated, by the way) to be very straight forward, like the readme from your repo states:
To use, simply drop file for your specific board into the /etc/sensors.d directory.
I guess I underestimated the complexity of linux modules/drivers - or my lack of understanding thereof :)
Anyway... I'll give your suggestion a try and then report back on this thread. I'm hopeful that putting a force parameter in the file within modules-load.d directory will do the trick and if not, I do understand that you might not want to spend any more time on this particular thing.
Unfortunately, making the changes you suggested hasn't done the trick.
To address your point about my system running an old linux kernel, I looked into this and found that its running the latest GA kernel - at least as far as I can tell.
Output from uname -r
:
4.15.0-46-generic
Apparently I could get a newer version by switching to HWE kernel, although having read some comments about that, I think this is too risky for me.
Regarding your comment about my distro having an old nct6683 module in it - that might very well be the case, as I fould these files when searching the entire system for "nct6683":
/lib/modules/4.15.0-46-generic/kernel/drivers/hwmon/nct6683.ko
/usr/src/linux-headers-4.15.0-46-generic/include/config/sensors/nct6683.h
Any chance to get a config for the ASRock Z370M Pro4 motherboard?
I'd be more than happy to help create it by providing any needed information from my system which is based on the aforementioned motherboard.