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

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.

I love you all for working on this. Many kudos.

2 Likes

DKMS seems to be broken from what I’m hearing of Kernel 5.10 so far.

5.10.13 seems to work fine.

Hi all,

I just merged the IT8528E and IT8688E changes.

The package installs fine on debian testing with the 5.11.0-10.3-liquorix-amd64 kernel.

Check out the release at: Release Rebase update · hannesha/it87 · GitHub

3 Likes

Great work.

Thanks @tonyfinn and @FurryJackman for these posts. I have an Gigabyte x570 UD and these both work great for my mobo.

Also, thanks for the note on make install vs make dkms. That cleared some things up for me. I can’t get make dkms work with the it87 driver, but I created some scripts to post the config files for me each time I need sensors to run properly.

JohnH , the next time there’s a kernel update, I’ll try your package.

There is a new driver being included with the 5.13 kernel that may help with our sensor woes on these boards:

https://www.phoronix.com/scan.php?page=news_item&px=Gigabyte-WMI-For-Linux-5.13

This driver exposes the Windows Management Instrumentation (WMI) temperature sensors under Linux. When writing originally about this new driver it was only tested on a Gigabyte X570 Aorus Pro WiFi motherboard but since then has been tested and confirmed to also be working on the likes of the Gigabyte’s B550M DS3H, B550 Gaming X V2, and Z390 I Aorus Pro WiFi motherboards as well.

Not that I don’t like the current solution with the patched IT87 driver in my particular case, but this may seem like the way forward unless they decide to upstream the modified IT87 module (fat chance that will ever happen).

Hopefully the ASUS version of the same thing gets upstreamed. Unfortunately WMI polling as of right now can’t re-poll correctly in ksysguard, but can with watch -n 1 sensors.

This is a pretty good solution that works around the resource conflict thing.
Another great thing is that the driver is very small compared to the it87 driver.

Hopefully Gigabyte doesn’t hide that many sensor values with this approach, or break the interface in the future.

Still hoping for coreboot support on AM4 boards, so we can finally skip the dependency on vendor interfaces.

Any update with the new Gigabyte Motherboard WMI Temperature Driver in the new 5.13 kernel?

Should i disable the IT87 driver on my X570 AORUS ELITE and use the new one built into the kernel?

Totally forgot about that driver. I’m on 5.13.1 now, so I guess I will test it and see.

Edit: Did a quick test on my X370 board. No dice. Completely removed the it87 driver I had and even forced the new module with gigabyte_wmi.force_load=1. It simply finds no sensors for my board.

7/15/21 8:33 PM kernel gigabyte-wmi DEADBEEF-2001-0000-00A0-C90629100000: Forcing load on unknown platform
7/15/21 8:33 PM kernel gigabyte-wmi DEADBEEF-2001-0000-00A0-C90629100000: No temperature sensors usable

Back to it87 for me I guess.

1 Like

sudo sensors-detect

sensors-detect version 3.6.0+git
System: Gigabyte Technology Co., Ltd. X570 AORUS ELITE [-CF]
Kernel: 5.13.1-3-MANJARO x86_64
Processor: AMD Ryzen 7 3800X 8-Core Processor (23/113/0)

Probing for Super-I/O at 0x2e/0x2f

Trying family `National Semiconductor/ITE’… No

Trying family `SMSC’… No

Trying family `VIA/Winbond/Nuvoton/Fintek’… No

Trying family `ITE’… Yes

Found unknown chip with ID 0x8688

sensors

amdgpu-pci-0b00
Adapter: PCI adapter
vddgfx: 725.00 mV
fan1: 0 RPM (min = 0 RPM, max = 3200 RPM)
edge: +49.0°C (crit = +100.0°C, hyst = -273.1°C)
(emerg = +105.0°C)
junction: +49.0°C (crit = +107.0°C, hyst = -273.1°C)
(emerg = +112.0°C)
mem: +48.0°C (crit = +105.0°C, hyst = -273.1°C)
(emerg = +110.0°C)
power1: 8.00 W (cap = 195.00 W)

k10temp-pci-00c3
Adapter: PCI adapter
Tctl: +49.8°C
Tdie: +49.8°C
Tccd1: +41.0°C

acpitz-acpi-0
Adapter: ACPI interface
temp1: +16.8°C (crit = +20.8°C)
temp2: +16.8°C (crit = +20.8°C)

gigabyte_wmi-virtual-0
Adapter: Virtual device
temp1: +34.0°C
temp2: +38.0°C
temp3: +49.0°C
temp4: +40.0°C
temp5: +39.0°C
temp6: +49.0°C

nvme-pci-0100
Adapter: PCI adapter
Composite: +33.9°C (low = -0.1°C, high = +74.8°C)
(crit = +79.8°C)

Does this mean its picking up the sensor?

How did you get those log files?

Check your journal log. Just search for WMI entries.

Are those the only sensors being picked up? The board should have plenty. Did you check your logs to see if the driver is working?

I truncated most of the stuff for

sudo sensors-detect

i gave all the information for

sensors

I hope my journalctl command is appropriate to get you the information you are looking for is correct

[username@Desktop-username ~]$ journalctl | grep wmi
Jul 13 20:54:19 Desktop-username plasmashell[2076]: qml: source to combo: lmsensors/gigabyte_wmi-virtual-0/temp1
Jul 13 20:54:19 Desktop-username plasmashell[2076]: qml: source to combo: lmsensors/gigabyte_wmi-virtual-0/temp2
Jul 13 20:54:19 Desktop-username plasmashell[2076]: qml: source to combo: lmsensors/gigabyte_wmi-virtual-0/temp3
Jul 13 20:54:19 Desktop-username plasmashell[2076]: qml: source to combo: lmsensors/gigabyte_wmi-virtual-0/temp4
Jul 13 20:54:19 Desktop-username plasmashell[2076]: qml: source to combo: lmsensors/gigabyte_wmi-virtual-0/temp5
Jul 13 20:54:19 Desktop-username plasmashell[2076]: qml: source to combo: lmsensors/gigabyte_wmi-virtual-0/temp6

[username@Desktop-username ~]$ journalctl | grep WMI
Jun 19 21:28:01 Desktop-username kernel: acpi PNP0C14:01: duplicate WMI GUID 05901221-D566-11D1-B2F0-00A0C9062910 (first instance was on PNP0C14:00)

Thanks in Advance