Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 819906 - sys-kernel/gentoo-sources Kernel support for NCT6687D Super I/O (Patch request)
Summary: sys-kernel/gentoo-sources Kernel support for NCT6687D Super I/O (Patch request)
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Default Assignee for New Packages
URL:
Whiteboard:
Keywords: NeedPatch
Depends on:
Blocks:
 
Reported: 2021-10-23 22:36 UTC by rogge
Modified: 2023-09-19 17:50 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Kernel patch for NCT6687D (nct6687d.patch.txt,34.12 KB, patch)
2021-12-09 00:47 UTC, rogge
Details | Diff
Adjusted patch for Kernel 5.15.32-r1 (nct6687d-5.15.32-r1.patch,34.12 KB, patch)
2022-05-06 14:14 UTC, rogge
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description rogge 2021-10-23 22:36:59 UTC
Hi,

I'm running on a MSI 410I Pro Wifi board with a 'Nuvoton NCT6687D' Super I/O as you can see here: https://m.media-amazon.com/images/I/91MNlzN5O9L._AC_SL1500_.jpg
The Kernel documentation says the module nct6683 supports the nct6687, too. (https://www.kernel.org/doc/html/latest/hwmon/nct6683.html; please compare with: https://www.kernel.org/doc/html/v5.10/hwmon/nct6683.html)
I'd tried the Kernel module of the current 5.10.61 release but it results in:

modprobe nct6683
modprobe: ERROR: could not insert 'nct6683': No such device

Hence my 'ln-sensors' output looks that:

coretemp-isa-0000
Adapter: ISA adapter
Package id 0:  +31.0°C  (high = +80.0°C, crit = +100.0°C)
Core 0:        +28.0°C  (high = +80.0°C, crit = +100.0°C)
Core 1:        +29.0°C  (high = +80.0°C, crit = +100.0°C)
Core 2:        +31.0°C  (high = +80.0°C, crit = +100.0°C)
Core 3:        +27.0°C  (high = +80.0°C, crit = +100.0°C)
 
acpitz-acpi-0
Adapter: ACPI interface
temp1:        +27.8°C  (crit = +119.0°C)
 
nvme-pci-0100
Adapter: PCI adapter
Composite:    +45.9°C  (low  =  -0.1°C, high = +84.8°C)
                       (crit = +94.8°C)
ERROR: Can't get value of subfeature temp2_min: I/O error
ERROR: Can't get value of subfeature temp2_max: I/O error
Sensor 1:     +62.9°C  (low  =  +0.0°C, high =  +0.0°C)

sensors-detect shows me:
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): YES
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'...                                      No
Probing for Super-I/O at 0x4e/0x4f
Trying family `National Semiconductor/ITE'...               No
Trying family `SMSC'...                                     No
Trying family `VIA/Winbond/Nuvoton/Fintek'...               Yes
Found unknown chip with ID 0xd592

So, the Super I/O chip isn't recognized at all. Thanksfully I'd found this module: https://github.com/Fred78290/nct6687d
The module is loading properly, no reboot necessary. My ouput now shows this (it's a fanless system so please don't wonder about the '0 rpm'):

coretemp-isa-0000
Adapter: ISA adapter
Package id 0:  +33.0°C  (high = +80.0°C, crit = +100.0°C)
Core 0:        +30.0°C  (high = +80.0°C, crit = +100.0°C)
Core 1:        +30.0°C  (high = +80.0°C, crit = +100.0°C)
Core 2:        +33.0°C  (high = +80.0°C, crit = +100.0°C)
Core 3:        +29.0°C  (high = +80.0°C, crit = +100.0°C)

acpitz-acpi-0
Adapter: ACPI interface
temp1:        +27.8°C  (crit = +119.0°C)

nct6687-isa-0a20
Adapter: ISA adapter
+12V:           12.26 V  (min = +12.26 V, max = +12.26 V)
+5V:             5.07 V  (min =  +5.07 V, max =  +5.07 V)
+3.3V:           3.34 V  (min =  +3.34 V, max =  +3.34 V)
CPU Soc:       640.00 mV (min =  +0.64 V, max =  +0.64 V)
CPU Vcore:     604.00 mV (min =  +0.60 V, max =  +0.60 V)
CPU 1P8:         0.00 V  (min =  +0.00 V, max =  +0.00 V)
CPU VDDP:        0.00 V  (min =  +0.00 V, max =  +0.00 V)
DRAM:            2.00 V  (min =  +2.00 V, max =  +2.00 V)
Chipset:       946.00 mV (min =  +0.95 V, max =  +0.95 V)
CPU Fan:          0 RPM  (min =    0 RPM, max =    0 RPM)
Pump Fan:         0 RPM  (min =    0 RPM, max =    0 RPM)
System Fan #1:    0 RPM  (min =    0 RPM, max =    0 RPM)
System Fan #2:    0 RPM  (min =    0 RPM, max =    0 RPM)
System Fan #3:    0 RPM  (min =    0 RPM, max =    0 RPM)
System Fan #4:    0 RPM  (min =    0 RPM, max =    0 RPM)
System Fan #5:    0 RPM  (min =    0 RPM, max =    0 RPM)
System Fan #6:    0 RPM  (min =    0 RPM, max =    0 RPM)
CPU:            +32.0°C  (low  = +32.0°C, high = +33.0°C)
System:         +48.0°C  (low  = +48.0°C, high = +48.0°C)
VRM MOS:        +35.0°C  (low  = +35.0°C, high = +35.0°C)
PCH:            +58.0°C  (low  = +58.0°C, high = +58.0°C)
CPU Socket:     +33.0°C  (low  = +33.0°C, high = +34.0°C)
PCIe x1:        +29.0°C  (low  = +29.0°C, high = +29.0°C)
M2_1:           +23.0°C  (low  = +23.0°C, high = +23.0°C)

nvme-pci-0100
Adapter: PCI adapter
Composite:    +48.9°C  (low  =  -0.1°C, high = +84.8°C)
                       (crit = +94.8°C)
ERROR: Can't get value of subfeature temp2_min: I/O error
ERROR: Can't get value of subfeature temp2_max: I/O error
Sensor 1:     +66.8°C  (low  =  +0.0°C, high =  +0.0°C)

dmesg shows me now:
[ 4592.081335] nct6687: loading out-of-tree module taints kernel.
[ 4593.145782] nct6687: Found NCT6687D or compatible chip at 0x004e:0x0a20
[ 4593.147417] nct6687 nct6687.2592: NCT6687D EC firmware version 1.0 build 05/06/20

But I'd to adjust the makefile that way (remove sudo, add 'mkdir -p /lib/modules/$(shell uname -r)/kernel/drivers/hwmon/'):
obj-m += nct6687.o

all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

install: all
mkdir -p /lib/modules/$(shell uname -r)/kernel/drivers/hwmon/
cp nct6687.ko /lib/modules/$(shell uname -r)/kernel/drivers/hwmon/
depmod
modprobe nct6687

clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean


Maybe the Kernel support is better in a newer version, but it doesn't look like: https://github.com/Fred78290/nct6687d/issues/4

Thanks in advance!
Comment 1 Mike Pagano gentoo-dev 2021-10-26 12:59:27 UTC
If I'm reading this correctly, you're asking for a new package to support this out of tree kernel module?

https://github.com/Fred78290/nct6687d
Comment 2 rogge 2021-11-06 03:31:38 UTC
Yes! Maybe I can try on my own this weekend.
Comment 3 rogge 2021-12-09 00:47:48 UTC
Created attachment 757775 [details, diff]
Kernel patch for NCT6687D

Finally I done it. Successfully tested on Kernel version 5.10.76-gentoo-r1
Comment 4 rogge 2022-05-06 14:14:35 UTC
Created attachment 777047 [details, diff]
Adjusted patch for Kernel 5.15.32-r1
Comment 5 Andrey Aleksandrovich 2023-09-16 16:42:36 UTC
Module is in tree. So, this issue can be closed?
Comment 6 rogge 2023-09-17 08:43:47 UTC
In which kernel version?
Comment 7 Andrey Aleksandrovich 2023-09-19 17:50:05 UTC
(In reply to rogge from comment #6)
> In which kernel version?

Sorry, I was mistaken.