You are not logged in.

#1 2014-07-27 03:01:42

quiv
Member
Registered: 2014-02-20
Posts: 22

[SOLVED] lm_sensors nct6775 driver installation

I have a ASUS p8z77-v PRO motherboard which uses the Nuvoton NCT6779D driver. It seems that lm_sensors doesn't have a default configuration entry for this particular chipset. Some of the values it reports are wrong, etc. I found a driver for it here and would like to install it.

The trouble is I don't really know how to install it. I figure I should just clone the repo into my home directory and make && sudo make install then create

/etc/modules-load.d/nct6775.conf
------------------------------------------------------------
# Load nct6775.ko at boot
nct6775

I run into problems when I try to make however. Here is the Makefile;

# For building for the current running version of Linux
TARGET	:= $(shell uname -r)
HOME=$(shell pwd)
# Or for a specific version
#TARGET := 2.6.33.5
KERNEL_MODULES	:= /lib/modules/$(TARGET)
# KERNEL_BUILD := $(KERNEL_MODULES)/build
KERNEL_BUILD	:= /usr/src/linux-headers-$(TARGET)

#SYSTEM_MAP := $(KERNEL_BUILD)/System.map
SYSTEM_MAP	:= /boot/System.map-$(TARGET)

DRIVER := nct6775

# Directory below /lib/modules/$(TARGET)/kernel into which to install
# the module:
MOD_SUBDIR = drivers/hwmon

obj-m	:= $(DRIVER).o

MAKEFLAGS += --no-print-directory

.PHONY: all install modules modules_install clean

all: modules

# Targets for running make directly in the external module directory:

modules clean:
@$(MAKE) -C $(KERNEL_BUILD) M=$(CURDIR) $@ EXTRA_CFLAGS=-g

install: modules_install

modules_install:
cp $(DRIVER).ko $(KERNEL_MODULES)/kernel/$(MOD_SUBDIR)
depmod -a -F $(SYSTEM_MAP) $(TARGET)

Firstly I get an error

make[1]: *** /usr/src/linux-headers-3.15.5-2-ARCH: No such file or directory.  Stop.
Makefile:30: recipe for target 'modules' failed

If I navigate to /usr/src/ I find there are no files at all? So I decided to install linux-headers then I uncommented

KERNEL_BUILD := $(KERNEL_MODULES)/build

and commented the line below it. Then I ran make sucessfully. Then I tried to sudo make install which resulted in an error;

cp nct6775.ko /lib/modules/3.15.5-2-ARCH/kernel/drivers/hwmon
depmod -a -F /boot/System.map-3.15.5-2-ARCH 3.15.5-2-ARCH
depmod: FATAL: could not load /boot/System.map-3.15.5-2-ARCH: No such file or directory
Makefile:35: recipe for target 'modules_install' failed
make: *** [modules_install] Error 1

If I look at the makefile I see

#SYSTEM_MAP := $(KERNEL_BUILD)/System.map
SYSTEM_MAP	:= /boot/System.map-$(TARGET)

However neither of these two locations has a file System.map. That's as far as I've gotten. I had a brief look around and it seems that at some point in time in the past System.map was removed as it's not necessary. The only things I could find about how to generate one is to compile your own custom kernel and copy the one from /src. However I'd rather not do that as I don't want to use a custom kernel, I just want to add this one module.

Any help is appreciated, I have never messed with custom kernels/modules before so I thought it would be safer to ask for some advice here first before potentially ruining my system.

Last edited by quiv (2014-07-27 08:02:47)

Offline

#2 2014-07-27 06:31:03

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: [SOLVED] lm_sensors nct6775 driver installation

The driver you referenced is to build the kernel module which is including upstream for a while now.  You don't need to build anything.  Just be sure the 'nct6775' module is loaded and lmsensors will do the rest.  If you wanna edit the values the sensors displays, you do that with a text file, for example /etc/sensors.d/p8v77-pro.conf.  See: http://lists.lm-sensors.org/pipermail/l … 37880.html

Example from my P8Z77-V Pro without the custom config:

% sensors
coretemp-isa-0000
Adapter: ISA adapter
Physical id 0:  +28.0°C  (high = +85.0°C, crit = +105.0°C)
Core 0:         +25.0°C  (high = +85.0°C, crit = +105.0°C)
Core 1:         +25.0°C  (high = +85.0°C, crit = +105.0°C)
Core 2:         +28.0°C  (high = +85.0°C, crit = +105.0°C)
Core 3:         +26.0°C  (high = +85.0°C, crit = +105.0°C)

nct6779-isa-0290
Adapter: ISA adapter
in0:                    +1.00 V  (min =  +0.00 V, max =  +1.74 V)
in1:                    +1.02 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in2:                    +3.38 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in3:                    +3.38 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in4:                    +1.02 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in5:                    +2.04 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in6:                    +2.04 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in7:                    +3.44 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in8:                    +3.30 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in9:                    +1.06 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in10:                   +2.04 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in11:                   +2.04 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in12:                   +0.25 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in13:                   +0.16 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in14:                   +2.04 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
fan1:                   392 RPM  (min =    0 RPM)
fan2:                     0 RPM  (min =    0 RPM)
fan3:                   423 RPM  (min =    0 RPM)
fan4:                   591 RPM  (min =    0 RPM)
fan5:                   523 RPM  (min =    0 RPM)
SYSTIN:                 +26.0°C  (high =  +0.0°C, hyst =  +0.0°C)  ALARM  sensor = thermistor
CPUTIN:                 +27.5°C  (high = +80.0°C, hyst = +75.0°C)  sensor = thermistor
AUXTIN0:                -63.0°C    sensor = thermistor
AUXTIN1:                -63.0°C    sensor = thermistor
AUXTIN2:                -63.0°C    sensor = thermistor
AUXTIN3:                -63.0°C    sensor = thermistor
PECI Agent 0:           +28.5°C  
PCH_CHIP_CPU_MAX_TEMP:   +0.0°C  
PCH_CHIP_TEMP:           +0.0°C  
PCH_CPU_TEMP:            +0.0°C  
intrusion0:            ALARM
intrusion1:            ALARM
beep_enable:           disabled

And with it:

% sensors
coretemp-isa-0000
Adapter: ISA adapter
Physical id 0:  +32.0°C  (high = +85.0°C, crit = +105.0°C)
Core 0:         +30.0°C  (high = +85.0°C, crit = +105.0°C)
Core 1:         +29.0°C  (high = +85.0°C, crit = +105.0°C)
Core 2:         +32.0°C  (high = +85.0°C, crit = +105.0°C)
Core 3:         +30.0°C  (high = +85.0°C, crit = +105.0°C)

nct6779-isa-0290
Adapter: ISA adapter
Vcore Voltage:       +1.00 V  (min =  +0.00 V, max =  +1.74 V)
  +12 Voltage:      +12.19 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
 AVCC Voltage:       +3.38 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
 +3.3 Voltage:       +3.36 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
   +5 Voltage:       +5.12 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
 3VSB Voltage:       +3.44 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
 VBAT Voltage:       +3.31 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
  VTT Voltage:       +1.06 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
CHASSIS1 FAN Speed:  523 RPM  (min =    0 RPM)
CPU FAN Speed:         0 RPM  (min =    0 RPM)
CHASSIS2 FAN Speed:  546 RPM  (min =    0 RPM)
CHASSIS3 FAN Speed:  704 RPM  (min =    0 RPM)
CHASSIS4 FAN Speed:  645 RPM  (min =    0 RPM)
MB Temperature:      +30.0°C  (high =  +0.0°C, hyst =  +0.0°C)  ALARM  sensor = thermistor
CPU Temperature:     +31.0°C  (high = +80.0°C, hyst = +75.0°C)  sensor = thermistor
intrusion0:         ALARM
intrusion1:         ALARM
beep_enable:        disabled

I use my own bash script though:

% temps

CPU  : 31/29/34/33 °C @ 1.0080 volts
HSF  : 599/663 RPM [129/125] (120mm/80mm)
Top  : 508 RPM [125]
Rear : 484 RPM [125]
HDD  : 35 °C

Here is the code:

    #!/bin/bash
    # ls /sys/class/hwmon/ -al
    in0=$(cat /sys/class/hwmon/hwmon1/in0_input)
    cpu0=$(cat /sys/class/hwmon/hwmon0/device/hwmon/hwmon0/temp2_input|cut -c1,2)
    cpu1=$(cat /sys/class/hwmon/hwmon0/device/hwmon/hwmon0/temp3_input|cut -c1,2)
    cpu2=$(cat /sys/class/hwmon/hwmon0/device/hwmon/hwmon0/temp4_input|cut -c1,2)
    cpu3=$(cat /sys/class/hwmon/hwmon0/device/hwmon/hwmon0/temp5_input|cut -c1,2)
    fan1=$(cat /sys/class/hwmon/hwmon1/pwm1)
    fan3=$(cat /sys/class/hwmon/hwmon1/pwm3)
    fan4=$(cat /sys/class/hwmon/hwmon1/pwm4)
    fan5=$(cat /sys/class/hwmon/hwmon1/pwm5)
    FAN1=$(cat /sys/class/hwmon/hwmon1/fan1_input)
    FAN3=$(cat /sys/class/hwmon/hwmon1/fan3_input)
    FAN4=$(cat /sys/class/hwmon/hwmon1/fan4_input)
    FAN5=$(cat /sys/class/hwmon/hwmon1/fan5_input)
    hdd=$(sudo hddtemp /dev/sdb | cut -c31-32)
    echo 
    echo "CPU  : $cpu0/$cpu1/$cpu2/$cpu3 °C @ $(echo "scale=4; $in0/1000"|bc -l) volts"
    echo "HSF  : $FAN5/$FAN4 RPM [$fan5/$fan4] (120mm/80mm)"
    echo "Top  : $FAN3 RPM [$fan3]"
    echo "Rear : $FAN1 RPM [$fan1]"
    echo "HDD  : $hdd °C"

Last edited by graysky (2014-07-27 07:03:26)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3 2014-07-27 08:02:27

quiv
Member
Registered: 2014-02-20
Posts: 22

Re: [SOLVED] lm_sensors nct6775 driver installation

Great, I didn't realise it was already included. Tinkered around with the file you linked to configure the labels and it's all working great now. Thanks for your script you added too! Marking as solved.

Offline

Board footer

Powered by FluxBB