GithubHelp home page GithubHelp logo

zeule / asus-wmi-ec-sensors Goto Github PK

View Code? Open in Web Editor NEW
7.0 3.0 2.0 68 KB

Linux HWMON sensors driver for ASUS motherboards to get sensor readings from the embedded controller

Makefile 13.32% C 86.68%
linux driver sensor hwmon x570

asus-wmi-ec-sensors's Introduction

asus-wmi-ec-sensors

Linux HWMON sensors driver for ASUS motherboards to read sensors from the embedded controller

This driver is available in the mainline kernel 5.16

Thanks to @0lvin efforts this driver was mainlined. Please use the in-kernel version or the enhanced one here.

Overview

Many ASUS motherboards do not publish all the available sensors via the Super I/O chip but some of them are available through the embedded controller (EC) registers.

This driver implements reading those sensor data via the WMI method BREC, which is known to be present in all ASUS motherboards based on the AMD 500 series chipsets (and probably is available in other models too). The driver needs to know exact register addresses for the sensors and thus support for each motherboard has to be added explicitly.

The EC registers do not provide critical values for the sensors and as such they are not published to the HWMON.

Supported motherboards

  1. ROG CROSSHAIR VIII HERO
  2. ROG CROSSHAIR VIII DARK HERO
  3. ROG CROSSHAIR VIII FORMULA
  4. ROG STRIX X570-E GAMING
  5. ROG STRIX B550-E GAMING
  6. Pro WS X570-ACE

Adding a new motherboard

First, you need to find out which EC registers to read (although) they are pretty typical. If you have no idea is there any, you can try the hwinfo software under Windows that will show the EC node and known sensors for it. When you have the data (or decided to probe the default set), the following changes to the source code need to be made:

  1. Add your board name to the asus_wmi_ec_dmi_table array and a new enum value to the board enum. You can find the board name in /sys/class/dmi/id/board_name or using dmidecode.

  2. Add new entry to the known_board_sensors array where list sensors for the board. If the board sensors span more than ASUS_WMI_BLOCK_READ_REGISTERS_MAX, a rewrite of the update_ec_sensors() will be required.

  3. If you discover new sensors, modify the known_ec_sensor enum and add it to the known_ec_sensors array. For each sensor you need to provide its size in bytes (for example, RPM counters span two single-byte registers), its bank index and register index within the bank. If the sensor spans two or more registers, provide the first one (the smaller number).

Compile and it should work.

asus-wmi-ec-sensors's People

Contributors

mbana avatar zeule avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

winklevos 4risu

asus-wmi-ec-sensors's Issues

Simple Arch PKGBUILD if anyone is interested

Not really an issue but I made a simple PKGBUILD file based on zenpower3-dkms's PKGBUILD :

PKGBUILD

_pkgname=asus-wmi-ec-sensors
pkgname=asus-wmi-ec-sensors-dkms
pkgver=0.1
pkgrel=1
pkgdesc='Linux kernel driver for reading ec sensors on ASUS motherboards'
arch=('x86_64' 'i686')
url='https://github.com/zeule/asus-wmi-ec-sensors'
depends=('dkms')
provides=('asus-wmi-ec-sensors')
conflicts=('asus-wmi-ec-sensors')
source=("Makefile" "asus-wmi-ec-sensors.c" "dkms.conf")
sha256sums=('SKIP' 'SKIP' 'SKIP')

prepare() {
  sed -e "s/@CFLGS@//" \
      -e "s/@VERSION@/$pkgver/" \
      -i "$srcdir/dkms.conf"
}

build () {
	make
}

package() {
  install -Dm644 "$srcdir/dkms.conf" "$pkgdir/usr/src/$_pkgname-$pkgver/dkms.conf"
  install -Dm644 "$srcdir/Makefile" "$pkgdir/usr/src/$_pkgname-$pkgver/Makefile"
  install -Dm644 "$srcdir/asus-wmi-ec-sensors.c" "$pkgdir/usr/src/$_pkgname-$pkgver/asus-wmi-ec-sensors.c"
}

dkms.conf

MAKE="make TARGET=${kernelver} CFLAGS_MODULE+=@CFLGS@"
CLEAN="make clean"
PACKAGE_NAME="asus-wmi-ec-sensors"
PACKAGE_VERSION="@VERSION@"
BUILT_MODULE_NAME[0]="asus-wmi-ec-sensors"
DEST_MODULE_LOCATION[0]="/kernel/drivers/hwmon/asus-wmi-ec-sensors"
AUTOINSTALL="yes"

Crosshair VIII Formula

Hi,

For the Crosshair VIII Formula I get the following, which looks a bit off, I guess.. I don't think any fan is at 3.2k RPMs, nor anything should be reported as 216°C ?

asuswmisensorsamd500-isa-0000
Adapter: ISA adapter
CPU_Opt:        0 RPM
Chipset:     3290 RPM
Water:          0 RPM
Chipset:      +72.0°C  
CPU:          +39.0°C  
Motherboard:  +36.0°C  
T_Sensor:    +216.0°C  
VRM:          +35.0°C  
Water_In:    +216.0°C  
Water_Out:   +216.0°C  
CPU:           5.00 A  

Below are nct6789 vals taken at the same time

nct6798-isa-0290
Adapter: ISA adapter
in0:                        1.02 V  (min =  +0.00 V, max =  +1.74 V)
in1:                        1.01 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in2:                        3.39 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in3:                        3.31 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in4:                        1.74 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in5:                      592.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
in6:                        1.08 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in7:                        3.39 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in8:                        3.31 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in9:                      912.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
in10:                      88.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
in11:                     104.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
in12:                       1.02 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in13:                       1.34 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in14:                     904.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
fan1:                      422 RPM  (min =    0 RPM)
fan2:                      981 RPM  (min =    0 RPM)
fan3:                        0 RPM  (min =    0 RPM)
fan4:                        0 RPM  (min =    0 RPM)
fan5:                      618 RPM  (min =    0 RPM)
fan6:                        0 RPM  (min =    0 RPM)
fan7:                        0 RPM  (min =    0 RPM)
SYSTIN:                    +36.0°C  (high = +80.0°C, hyst = +75.0°C)  sensor = thermistor
CPUTIN:                    +39.5°C  (high = +80.0°C, hyst = +75.0°C)  sensor = thermistor
AUXTIN0:                   +22.0°C    sensor = thermistor
AUXTIN1:                  +103.0°C    sensor = thermistor
AUXTIN2:                   +97.0°C    sensor = thermistor
AUXTIN3:                   +31.0°C    sensor = thermistor
PECI Agent 0 Calibration:  +39.0°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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.