it87 and Intel Z170 Chipset

Has anyone manged to compile an it87 module which will work with a Z170X (in this case Gigabyte) motherboard using the swarm of methods that seem to be out and about?

sensors-detect:

Some Super I/O chips contain embedded sensors. We have to write to
standard I/O ports to probe them. This is usually safe.
Do you want to scan for Super I/O sensors? (YES/no):
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 0x8628
Probing for Super-I/O at 0x4e/0x4f
Trying family National Semiconductor/ITE'... No Trying family SMSC’… No
Trying family VIA/Winbond/Nuvoton/Fintek'... No Trying family ITE’… No

I try to modprobe using various suggestions:

modprobe -v it87
insmod /lib/modules/4.1.21-14-default/kernel/drivers/hwmon/it87.ko
modprobe: ERROR: could not insert ‘it87’: No such device

modprobe -v it87 force_id=0x8620
insmod /lib/modules/4.1.21-14-default/kernel/drivers/hwmon/it87.ko force_id=0x8620
modprobe: ERROR: could not insert ‘it87’: Device or resource busy

modprobe -v it87 force_id=0x8628
insmod /lib/modules/4.1.21-14-default/kernel/drivers/hwmon/it87.ko force_id=0x8628
modprobe: ERROR: could not insert ‘it87’: No such device

I have tried to compile a driver using what I think is soource from here:

https://github.com/groeck/it87/blob/master/it87.c

but I am not much of a programmer as my results:

gcc it87.c
it87.c:52:26: fatal error: linux/bitops.h: No such file or directory
#include <linux/bitops.h>
^
compilation terminated.

I guess I have some kind of environmental settings off.

I also acquire the psensor 1.1.5, as it is supposed to be an alternative:

./configure is OK, but make fails with:

/usr/lib64/libnvidia-glcore.so.367.27: undefined reference to nv_vasprintf_alloc' /usr/lib64/libnvidia-glcore.so.367.27: undefined reference to nv_vasprintf_vsnprintf’
/usr/lib64/libnvidia-glcore.so.367.27: undefined reference to `nv_vasprintf_free’
collect2: error: ld returned 1 exit status
make[3]: *** [psensor] Error 1

Just updated my NVidia driver as well.

openSUSE LEAP 42.1
uname -a
Linux linux-3wjh.site 4.1.21-14-default #1 SMP PREEMPT Sun Apr 17 07:27:45 UTC 2016 (fc187c1) x86_64 x86_64 x86_64 GNU/Linux

Thanks for any direction…

I think that’s the problem: there seems to be a problem with the driver package (rpm) build. I just updated the Nvidia drivers (the G04 version) and had the same error messages when trying to build some code. We aren’t the only ones, by the way: this from the KDE bug list [tellico] [Bug 364335] New: /usr/lib64/nvidia-current/libnvidia-glcore.so.367.27: undefined reference to `nv_vasprintf_vsnprintf'

I looked into backing out of the update but the repository isn’t one of the community repositories so I couldn’t use a browser to look for alternative packages – I ended up removing the driver and reverting to nouveau. At least my code will build now so that I can carry on working.

If anyone can point to a fix to this problem it would be gratefully received.

That definitely looks like it. Ultimately, I would like to use the packaged sensors pack, so hopefully either we will get a fix for the Nvidia modules or a patched it87 module…

Apparently, MakeMKV 1.9.10 also fails to build due to the Nvidia breakage:

/usr/lib64/libnvidia-glcore.so.367.27: undefined reference to nv_vasprintf_alloc' /usr/lib64/libnvidia-glcore.so.367.27: undefined reference to nv_vasprintf_vsnprintf’
/usr/lib64/libnvidia-glcore.so.367.27: undefined reference to `nv_vasprintf_free’

Other than the Nouveau workaround, any idea of any other fix? Maybe a back level of the Nvidia driver…

seems to be solved in 367.35 ?
https://devtalk.nvidia.com/default/topic/948906/linux/undefined-references-to-nv_vasprintf_-symbols-in-libnvidia-glcore-so-367-27/post/4930576/#4930576

Yes, the new Nvidia 367.35-25.1 has allowed the it87.c that I pulled from

https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/drivers/hwmon/it87.c?id=refs/tags/v4.1.29

to successfully compile:

-rw-r–r-- 1 root root 479976 Jul 31 21:59 it87.ko

sensors-detect:

Trying family `ITE’… Yes
Found unknown chip with ID 0x8628

However, the same problem persists when I try to load the module from the following methods:

modprobe it87

modprobe: ERROR: could not insert ‘it87’: No such device

modprobe it87 force_id=0x8620

modprobe: ERROR: could not insert ‘it87’: Device or resource busy

modprobe it87 force_id=0x8628

modprobe: ERROR: could not insert ‘it87’: No such device

modprobe it87 force_id=0x8705

modprobe: ERROR: could not insert ‘it87’: Device or resource busy
(Read on one of the plethora of links that the 8628 is similar to the 8705)

I solved this issue by compiling the new it87.ko from the above link, then I uninstalled the openSUSE provided sensors v 3.3.5-4.6 (leaving the monitoring-plugin-sensors packages) then installing the sensors v 3.40. from

http://pkgs.fedoraproject.org/repo/pkgs/lm_sensors/lm_sensors-3.4.0.tar.bz2/c03675ae9d43d60322110c679416901a/lm_sensors-3.4.0.tar.bz2

Afterwards,

modprobe it87 force_id=0x8620

loads and the fans speeds are now seen in gkrellm.