I patched the IT87 (Temperature monitoring) driver, need some help testing it

Ah, thanks.

I found that I get the highest temperatures of all sensors on this chip when I run prime95.

OOPS, Haven’t logged in a while.

Good to see that driver working on systems without much trouble.
Sadly I’ve changed my motherboard to a MSI B450 Mortar, which has a much better driver support.

It would still be nice to get most patches into the kernel. The initial IT8686 support should be only a few patches.
However, I’m still pretty much clueless how to contribute to the kernel.

Came back to this thread because my Gigabyte X299 Aorus Gaming 7 Pro needs this driver, however, it needs 2 unknown IDs forced to specific addresses according to sensors-detect.

On 0x2e/0x2f, sensors-detect says it found the IT8686E as 0x8686…

HOWEVER, on 0x4e/0x4f, it found the IT8795E as 0x8733. (apparently the 8792E is the same chip)

Only one unknown ID can be forced at a time in modprobe. There’s no documentation on how to map unknown IDs in case of multiple SuperIO chips.

So I can only grab either/or the 8686 or 8795 if I force the unknown IDs, but with no options it does work properly…

Then after removing the option to force it… It didn’t need them.

You can see how this can cause confusion if you have sensors-detect saying it’s unknown, when using acpi_enforce_resources=lax and just loading the module results in success. That was really confusing.

I’ve created a snippet on gitlab for the config for the Gigabyte X570 Elite motherboard to label the temperature fan inputs appropriately, thought I’d share it here as this appears to be the closest to documentation for using these sensors on Linux that I found on the internet.

Since I’ve just created my account, I can’t include links yet, it appears, so I’ve just included the config files here for now:

/etc/sensors.d/gigabyte-x570.conf

chip "it8688-*"
    label fan1 "CPU_FAN"
    label fan2 "SYS_FAN1"
    label fan3 "SYS_FAN2"
    label fan4 "Chipset fan"
    label fan5 "CPU_OPT"

    label temp1 "SYS1 (rear)"
    label temp2 "SYS2 (front)"
    label temp3 "CPU"
    label temp4 "PCIe"
    label temp5 "VRM"
    label temp6 "Chipset"

You’ll also need the following config files to load the module for this motherboard:

/etc/modprobe.d/it87.conf

options it87 ignore_resource_conflict=1

/etc/modules-load.d/it87.conf

it87
5 Likes

Thanks so much for posting this :slight_smile:

Seems a lot of people are arriving at this thread (especially Gigabyte X570 board owners) to find the most recent version of the driver. The most recent version is here:

And there is no debian .deb for this tree so you will have to download the entire repository and do this:

make clean
make
sudo make dkms

using make install only installs for the specific kernel.

To uninstall

sudo make dkms_clean

The readme was confusing in that it separated the two methods when most people will use the dkms method.

1 Like

It’s just make dkms. To be absolutely clear, make install only does it for the specific kernel you’re CURRENTLY on, and make dkms installs it to dkms and should reinstall modules for every kernel upgrade. To uninstall it’s make dkms_clean.

1 Like

To amend to this, here’s the voltages section I tuned for the X570 I Aorus Pro WiFi. If it’s the same order on other X570 boards, this should work on your board too:

chip "it8688-*"
    label in0 "Vcore"
    
    label in1 "+3.3V"
    compute in1 1.65*@,@/1.65
    
    label in2 "+12V"
    compute  in2  @ * (72/12), @ / (72/12)
    
    label in3 "+5V"
    compute in3 2.5*@,@/2.5
    
    label in4 "SoC"
    
    label in5 "VDDP"
    
    label in6 "DRAM A/B"
    compute in6 @-.03,@-.03 #comment out this line if you want the native Gigabyte DRAM reading

Here’s the X299 Gaming 7 Pro’s .conf file. It should be similar with the X299 Designare EX. (not the 10G model)

This requires the latest version of the it87 driver available at the Github I linked earlier

chip "it8686-*"
    label in0 "VRIN"
    
    label in1 "+3.3V"
    compute in1 1.65*@,@/1.65
    
    label in2 "+12V"
    compute  in2  @ * (72/12), @ / (72/12)
    
    label in3 "+5V"
    compute in3 2.5*@,@/2.5
    
    label in4 "DRAM C/D"
    
    label in5 "VCCSA"
    
    label in6 "DRAM A/B"

    label fan1 "CPU_FAN"
    label fan2 "SYS_FAN1"
    label fan3 "SYS_FAN2"
    label fan4 "SYS_FAN3"
    label fan5 "CPU_OPT"

    label temp1 "System 1"
    label temp2 "Chipset"
    label temp3 "CPU"
    label temp4 "PCIEX16_1"
    label temp5 "VRM"
    label temp6 "EC_TEMP1"

chip "it8792-*"
    label in0 "VRIN"
    
    label in1 "Vcore"
    compute in1 0.03+@,@-0.03  # Raw reading is 0.03v off, HWinfo64 is the same
    
    label in2 "Chipset"
    
    label in4 "VCCIO"
    
    label in5 "MESH"
    
    ignore in6
    
##  label in6 "VRIN4" # feel free to ignore this sensor. This matches HWInfo64
##  compute in6 @-1.1,@+1.1
    
    label temp3 "System 2"
    label temp2 "EC_TEMP2"
    label temp1 "PCIEX16_2"
    
    
    label fan3 "SYS_FAN4"
    label fan2 "SYS_FAN5_PUMP"
    label fan1 "SYS_FAN6_PUMP"

Vcore is calculated extremely weirdly from the it87 sensors on X299. At deeper C-states, Voltage actually reaches 0. Only during a consistent all core workload does the it87 sensor work properly. I have no reference to compare so I have no clue how Vcore is calculated without using i7z.

Edit: Okay, HWInfo64 calculates Vcore the same way when reading from the it8792. I added a proper offset.

Great work everyone!

Did you have a look at the lm-sensors repo?
Most the time, the voltages and temps are mostly similar to older generation boards.

I could open a pull request with the debian package file.

Package files for other distros would be welcome too. :wink:

1 Like

Yeah, and the default installation should be dkms, make dkms a dependency when making the debian package file. Double check dependencies across debian and ubuntu before making the PR.

Hahahah ahh open source. Hey sometimes shit happens thats okay. Thats why we fork

2 Likes

Are you guys able to build this on the 5.10.x kernels? For me dkms fails when installing the new kernel and trying to make the module spits out errors. 5.9.x kernels work fine (using 5.9.16 right now).

Any idea how i can get a config like this done for my motherboard?
when i run sensors-detect i get the following.

Found unknown chip with ID 0x8688

im trying to get unraid to detect this chip so i can control my PWM fans without always going into the BIOS.

Anyone has this working with latest BIOS? I get a ‘no such device’ error when probing or inserting the module, regardless of options (ignore_resource_conflict=1 or force_id=0x8628). Seems BIOS version F31q yields this driver incompatible. Older reports with F11 seem to work fine.

I am running a Gigabyte Aorus Elite, and while the K10temp driver works, obviously I get no other information regarding the motherboard and fan status.

Did you try adding “acpi_enforce_resources=lax” to your /etc/default/grub file?

I’m sure I did at one point (but then again, now I am not sure which source tree I used when I booted with that parameter), so might be worth a try to reboot with that and see if the module indeed loads before setting things to default. Thanks for the heads up!

Edit
That almost got the module loaded, if it wasn’t for a nasty ‘Unknown symbol in module’ error. When trying to load without install, and when installed, I get the above.

Works great on Gigabyte X570 Aorus Master with a 3900x, bios F31b. Arch with kernel 5.10.11, and setting the modprobe flag options it87 ignore_resource_conflict=1 (don’t think this is actually necessary for my motherboard).modinfo it87 reports:

filename:       /lib/modules/5.10.11-arch1-1/kernel/drivers/hwmon/it87.ko.xz
version:        v1.0-52-g2b8b4fe
license:        GPL
description:    IT8705F/IT871xF/IT872xF hardware monitoring driver
author:         Chris Gauthron, Jean Delvare <[email protected]>
srcversion:     8751A3F781CA00A9A53AF2C
depends:        hwmon-vid
retpoline:      Y
name:           it87
vermagic:       5.10.11-arch1-1 SMP preempt mod_unload 
parm:           force_id:Override the detected device ID (ushort)
parm:           ignore_resource_conflict:Ignore ACPI resource conflict (bool)
parm:           mmio:Use MMIO if available (bool)
parm:           update_vbat:Update vbat if set else return powerup value (bool)
parm:           fix_pwm_polarity:Force PWM polarity to active high (DANGEROUS) (bool)

And all my fan control is working properly now.

Building it was a problem, make install was alright, I think that’s what updated my current module, but sudo make dkms is complaining:


Creating symlink /var/lib/dkms/it87/v1.0-52-g2b8b4fe/source ->
                 /usr/src/it87-v1.0-52-g2b8b4fe

DKMS: add completed.

Preparing kernel 5.10.11-arch1-1 for module build:
(This is not compiling a kernel, just preparing kernel symbols)
Storing current .config to be restored when complete
Running Generic preparation routine
make mrproper...(bad exit status: 2)
Warning: using /lib/modules/5.10.11-arch1-1/build/.config
(I hope this is the correct config for this kernel)
make oldconfig...(bad exit status: 2)
make prepare-all...(bad exit status: 2)

Building module:
cleaning build area...
make -j24 KERNELRELEASE=5.10.11-arch1-1 TARGET=5.10.11-arch1-1...(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.10.11-arch1-1 (x86_64)
Consult /var/lib/dkms/it87/v1.0-52-g2b8b4fe/build/make.log for more information.
make: *** [Makefile:99: dkms] Error 10

Consulting the make log says:

KMS make.log for it87-v1.0-52-g2b8b4fe for kernel 5.10.11-arch1-1 (x86_64)
Sun 31 Jan 22:53:45 GMT 2021

  ERROR: Kernel configuration is invalid.
         include/generated/autoconf.h or include/config/auto.conf are missing.
         Run 'make oldconfig && make prepare' on kernel src to fix it.

make[2]: *** [Makefile:718: include/config/auto.conf] Error 1
make[1]: *** [Makefile:71: modules] Error 2

sensors-detect still warns about an unknown chip, but having the patched it87 loaded finds all of the motherboard sensors:

Trying family `ITE'...                                      Yes
Found unknown chip with ID 0x8688
1 Like

For me it fails on 5.10.11 kernel. DKMS complains. 5.10.10 works fine.