Git Product home page Git Product logo

asus-ec-sensors's Introduction

asus-ec-sensors

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

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

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

This driver is available in the mainline kernel since version 5.18, and code in this repository is kept in sync with the hwmon-next branch.

Supported motherboards

  • PRIME X470-PRO
  • PRIME X570-PRO
  • Pro WS X570-ACE
  • ProArt X570-CREATOR WIFI
  • ProArt B550-CREATOR
  • ROG CROSSHAIR VIII DARK HERO
  • ROG CROSSHAIR VIII HERO (WI-FI)
  • ROG CROSSHAIR VIII FORMULA
  • ROG CROSSHAIR VIII HERO
  • ROG CROSSHAIR VIII IMPACT
  • ROG CROSSHAIR X670E HERO
  • ROG MAXIMUS XI HERO
  • ROG MAXIMUS XI HERO (WI-FI)
  • ROG STRIX B550-E GAMING
  • ROG STRIX B550-I GAMING
  • ROG STRIX X570-E GAMING
  • ROG STRIX X570-E GAMING WIFI II
  • ROG STRIX X570-F GAMING
  • ROG STRIX X570-I GAMING
  • ROG STRIX Z390-F GAMING
  • ROG STRIX Z690-A GAMING WIFI D4
  • ROG ZENITH II EXTREME
  • ROG ZENITH II EXTREME ALPHA

Installation

Gentoo ebuild and AUR package are available. Alternatively, you can clone the repository and then use standard make and make modules_install (as root) commands. If you use DKMS, make dkms will build the module and add it to the DKMS tree for future updates.

Adding a new motherboard

You can use other monitoring software to learn whether the motherboard provide sensor data via the EC. For example, HWiNFO64 shows node named "ASUS EC" for these sensors.

Libre Hardware Monitor contains a very similar to this driver implementation for EC sensors, you can look there or even test and implement support for your board with Libre Hardware Monitor first.

First, you need identification data for your board, which are vendor and board names. You can get them from DMI tables using either the dmidecode utility or run grep -e '' -n /sys/class/dmi/id/board_{name,vendor}. If the vendor name equals (case sensitively) to "ASUSTeK COMPUTER INC." you simply add a new entry to the dmi_table array (please keep it sorted alphabetically by board name) using the DMI_EXACT_MATCH_ASUS_BOARD_NAME macro. If the vendor name is different, please create a similar macro that accepts also the vendor name as a parameter.

The second step is to find out which sensors are supported and create a ec_board_info structure with sensor definitions for the board. You can get a hint from HWINFO if it supports your board, from the monitoring section of the UEFI user interface, or from information for similar boards. Please note differences in sensor addresses for various board families.

The last step is to find out how to secure access to the EC from race condition, because the firmware does access the same data. If you are lucky, the name of a ACPI mutex, which is used for synchronising access to the EC, can be found out in the decompiled code of the ACPI firmware.

First, you need to obtain ACPI DSDT source for your board. You can get it from /sys/firmware/acpi/tables/DSDT in the binary form and decompile using the iasl tool from the acpica package:

$ sudo cat /sys/firmware/acpi/tables/DSDT > dsdt.dat
$ iasl dsdt.dat

This will produce decompiled file dsdt.dsl which you need to read and gather some information from it. Now you are on your own. Look for the definition of the EC device (PNP0C09) and for ACPI methods which access its address space. For example, in the AMD 500 series, there is a function named BREC (probably "Block Read Embedded Controller"). Its declaration starts with Method (BREC, 1. If the function contains meaningful code, read through it a bit. Not far from the beginning it should contain a command to lock a mutex. The command in the AML (the language of the ACPI code) is named Acquire and the instructions should look like If ((Acquire (ASMX, 0xFFFF) == Zero)). You need the name of the mutex, here it is "ASMX". Now find its declaration (Mutex (ASMX, 0x00)). It will be declared inside a scope, with the scope declaration looking as Device (<Device name>), find the closest one to the mutex declaration towards the top of the file. Now compose the full name of the mutex, which starts from the '' and then consists of device name(s) and the mutex name. In the example above the name is \AMW0.ASMX. If you can't find mutex name, as the last resort you can use the global ACPI lock.

Now you can write down a definition for ec_board_info structure for your board, hook its address into the board identification array dmi_table, compile, and try to load the module (you might need to run make install in order to make the build system to sign the module, if your kernel rejects unsigned ones). Then the sensors command should show an entry named "asusec-..." with the sensor readings (sensors 'asusec-*' will show only that entry). Please note the blank value for temperature sensors: 216.

asus-ec-sensors's People

Contributors

dbavatar avatar kyndigen avatar nabajour avatar nickhu avatar shadynawara avatar wsy2220 avatar zeule avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

asus-ec-sensors's Issues

Add note in README about upstreaming to kernel 6.1

Hey there, I'm happily using this kernel module for a while now, very happy with it!

When I was updating to kernel 6.1 just now, dkms gave me an error telling me, that the module does already exist. So I guess you got this upstreamed? Congratulations!

I think it would be nice if this was readily appearent when reading the readme of this project though :)

Question: relevant for sTRX40 boards?

Hi,
I saw the article on this new driver on Phoronix. I have an Asus ROG Zenith II Extreme motherboard with a TRX40 chipset.
The current driver used is the nct6789 driver. The information reported seems pretty generic (e.g., which fan info is the VRM fan?) and I'm not sure it's using the correct range scaling and offsets.

Here is the sensors output:

nct6798-isa-0290
Adapter: ISA adapter
in0:                        1.17 V  (min =  +0.00 V, max =  +1.74 V)
in1:                      992.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
in2:                        3.38 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in3:                        3.30 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.09 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in7:                        3.38 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in8:                        3.26 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in9:                      888.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
in10:                     232.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
in11:                     592.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.20 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in14:                       1.77 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
fan1:                      796 RPM  (min =    0 RPM)
fan2:                        0 RPM  (min =    0 RPM)
fan3:                      793 RPM  (min =    0 RPM)
fan6:                     2220 RPM  (min =    0 RPM)
fan7:                        0 RPM  (min =    0 RPM)
SYSTIN:                    +45.0°C  (high = +80.0°C, hyst = +75.0°C)  sensor = thermistor
CPUTIN:                    +48.5°C  (high = +80.0°C, hyst = +75.0°C)  sensor = thermistor
AUXTIN0:                   +21.5°C    sensor = thermistor
AUXTIN1:                   +72.0°C    sensor = thermistor
AUXTIN2:                   +16.0°C    sensor = thermistor
AUXTIN3:                   -20.0°C    sensor = thermistor
PECI Agent 0 Calibration:  +58.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

There seems to be a lot of activity around Asus sensors readout, between this repository, the WMI driver, the WMI EC driver. I'd be interested in having more detailed output for my board (and fan control if possible), but I'm not sure where to start.

Decoding the DSDT doesn't show the BREC method (there are some ACPI errors on boot and on decode, though). But it seems to show the ASUSWMI device (AMW0), and a PNP0C09 device with methods that seem to do some EC Query, which seem to be relevant to this project.

Any help to get the correct info and what project to talk to would be appreciated.

I can upload the DSDT dump if needed.

Thanks

How to add support for ROG ZENITH EXTREME

Currently the asus-wmi-sensors seems to be going to be deprecated in favour of the ec controller, which means, in the newer kernels i will loose info about what the mobo is doing.

asus_wmi_sensors-virtual-0
Adapter: Virtual device
CPU Core Voltage:             894.00 mV
CPU SOC Voltage:                1.09 V
DRAM AB Voltage:                1.20 V
DRAM CD Voltage:                1.20 V
1.8V PLL Voltage:               1.81 V
+12V Voltage:                  11.90 V
+5V Voltage:                    5.01 V
3VSB Voltage:                   3.31 V
VBAT Voltage:                   3.14 V
AVCC3 Voltage:                  3.29 V
SB 1.05V Voltage:               1.04 V
CPU Core Voltage:             849.00 mV
CPU SOC Voltage:                1.05 V
DRAM AB Voltage:                1.20 V
DRAM CD Voltage:                1.20 V
CPU Fan:                       712 RPM
Chassis Fan 1:                   0 RPM
Chassis Fan 2:                   0 RPM
HAMP Fan:                        0 RPM
Water Pump 1:                    0 RPM
CPU OPT:                         0 RPM
Water Flow:                      0 RPM
Waterblock Flow:                 0 RPM
EXT Fan 1:                       0 RPM
EXT Fan 2:                       0 RPM
EXT Fan 3:                       0 RPM
Cover Fan:                       0 RPM
CPU Temperature:               +36.0°C
CPU Socket Temperature:        +36.0°C
Motherboard Temperature:       +34.0°C
Chipset Temperature:           +52.0°C
Tsensor 1 Temperature:        +216.0°C
CPU VRM Temperature:           +39.0°C
Water In:                     +216.0°C
Water Out:                    +216.0°C
Waterblock In:                +216.0°C
Waterblock Out:               +216.0°C
EXT Tsensor 1:                  +0.0°C
EXT Tsensor 2:                  +0.0°C
EXT Tsensor 3:                  +0.0°C
Tsensor 2 Temperature:        +216.0°C
DIMM.2 Tsensor 1 Temperature: +216.0°C
DIMM.2 Tsensor 2 Temperature: +216.0°C
CPU VRM Output Current:         0.00 A

(with obvious errors around the ext tsensor and water block sensors, as i didn't bother to install them (nor do i have a watter cooling block, but the option is there), so the readings are wrong)

Is there a way to reliably add support for those sensors in the asus-ec-sensors module instead? I can hack my way around c code, so i'd do it myself, but need guidance.

Old motherboards - CROSSHAIR V FORMULA-Z

I'm adding support for the ASUS ROG CROSSHAIR V FORMULA-Z. So far I can get asus-ec-sensors to detect the board and report nonsense values (I just tried copying the board_info from one of the existing entries). Is there any known documentation for the register space of rd900 series ASUS ROG ECs? Various closed source Windows tools like HWiNFO do apparently support it, is the information under NDA?

All else fails I'm going to try to build ec-probe.exe from nbfc.

ASUS ProArt B550 Creator Support

Hey, I'm not sure if this is the best place to put this, but I needed readout of the AUX T_Sensor for a water-cooling project and did my best to add in support.

I found that many of the defined sensors report 0 or were duplicates of T_Sensor. i left the ones that did report and were not duplicates, along with the VRM sensor. On the subject of the VRM sensor, I don't believe this board has one as this driver reports 0 deg C, and it doesn't show up in the UEFI hardware monitor.

Btw, thanks for the descriptive documentation! I'm not exactly a programmer or a hardware guy but that made it super easy.

Here's a patch

--- asus-ec-orig/asus-ec-sensors.c	2023-04-02 05:57:52.493027229 -0500
+++ asus-ec-sensors/asus-ec-sensors.c	2023-04-02 05:38:50.992029670 -0500
@@ -303,6 +303,18 @@
 	.family = family_amd_500_series,
 };
 
+static const struct ec_board_info board_info_pro_art_b550_creator = {
+        .sensors = SENSOR_SET_TEMP_CHIPSET_CPU_MB | 
+
+                   //Driver reports 0 Deg C
+                   SENSOR_TEMP_VRM |
+ 
+                   SENSOR_TEMP_T_SENSOR |
+                   SENSOR_FAN_CPU_OPT,
+        .mutex_path = ASUS_HW_ACCESS_MUTEX_ASMX,
+        .family = family_amd_500_series,
+};
+
 static const struct ec_board_info board_info_pro_ws_x570_ace = {
 	.sensors = SENSOR_SET_TEMP_CHIPSET_CPU_MB | SENSOR_TEMP_VRM |
 		SENSOR_TEMP_T_SENSOR | SENSOR_FAN_CHIPSET |
@@ -435,6 +447,8 @@
 					&board_info_prime_x570_pro),
 	DMI_EXACT_MATCH_ASUS_BOARD_NAME("ProArt X570-CREATOR WIFI",
 					&board_info_pro_art_x570_creator_wifi),
+        DMI_EXACT_MATCH_ASUS_BOARD_NAME("ProArt B550-CREATOR",
+                                        &board_info_pro_art_b550_creator),
 	DMI_EXACT_MATCH_ASUS_BOARD_NAME("Pro WS X570-ACE",
 					&board_info_pro_ws_x570_ace),
 	DMI_EXACT_MATCH_ASUS_BOARD_NAME("ROG CROSSHAIR VIII DARK HERO",

Along with the output of asus-ec-sensors from sensors

❯ sensors asusec-isa-0000
asusec-isa-0000
Adapter: ISA adapter
CPU_Opt:      877 RPM
Chipset:      +67.0°C  
CPU:          +44.0°C  
Motherboard:  +41.0°C  
T_Sensor:     +25.0°C  
VRM:           +0.0°C  

Possibly (or not) adding "ROG STRIX B550-F GAMING (WI-FI)"?

I have a "ROG STRIX B550-F GAMING (WI-FI)" which works with the previously introduced WMI driver. However since this driver is supposed to be better and doesn't yet have support for that motherboard I thought I'd take a look at it.

I have however ran into an issue: The "BREC" method is a dummy as described in the README. Is that the end of the road for this attempt? I don't find the README entirely clear on this.

Add support for ROG STRIX X670E-E GAMING WIFI

Seems to share the same stuff as the ROG Crosshair X670E Hero, added the board and loaded the module and temperatures seem correct?

asusec-isa-0000
Adapter: ISA adapter
CPU: +36.0°C
CPU Package: +38.0°C
Motherboard: +31.0°C
VRM: +42.0°C
Water_In: +35.0°C
Water_Out: +32.0°C

Attached extracted ACPI, and here's name/vendor:
/sys/class/dmi/id/board_name:1:ROG STRIX X670E-E GAMING WIFI
/sys/class/dmi/id/board_vendor:1:ASUSTeK COMPUTER INC.

ROG-STRIX-X670E-E-ACPI.zip

looking to add sensors support for TP3402ZA

Hi,
I have a laptop with fans that work too hard. using lm-sensors produce zero fan/voltage info.
during my searches I found that the laptop has an ITE chip IT5571 which is EC.
I'm currently trying to get SOME sensor reading information.
I have Windows in dual boot, but HWiNFO/speedfan do not show any fan/voltage info.

trying to work under the readme, in HWiNFO I do not see ASUS EC.
what I do have is: Super-IO/LPC Chip: ITE IT5571 (full dump at https://pastebin.com/hfK4tR2C)
and this info:

/sys/class/dmi/id/board_name:1:TP3402ZA
/sys/class/dmi/id/board_vendor:1:ASUSTeK COMPUTER INC.

the dsdt.dsl file is attached (dsdt.txt), but I didn't really understand how to find an address or extract the needed information from it.
any help would be really appreciated!

How does this driver compare to asus-wmi-sensors?

I'm asking for a specific reason: my Prime X470-Pro motherboard would infrequently lose all of its fans and shutdown with the aforementioned driver (https://github.com/electrified/asus-wmi-sensors), so when it became part of kernel 5.17 I had to blacklist it. Now that your driver is part of kernel 5.19, I'm a little leery of leaving this driver loaded.

Have you run across anything like this? I'm hoping because you're not using WMI that I'll be OK.

AUR Package

No issues, been using this driver for months, and also the earlier wmi based version. Thanks Eugene for all your efforts on this!

I created an AUR Package to make my life easier if anyone else is interested. :)

Old Motherboard Z97-Pro (ec sensors doesn't show fan rpm)

Hello and thank you very much for creating this project.
I saw you said kernel 5.18 has already this project built-in, so I upgraded from 5.15 to 6.0.1 kernel but sensors detect still does not detect my cpu fan (no difference at all). So I tried to manually use this project and add my board. My question is will I be able to use this project to control my cpu fan? because "ASUS EC" inside HWinfo does not have my fan speed either: (my board vendor is ASUSTeK COMPUTER INC.)
(https://imgur.com/a/u7JmU55)

I added

DMI_EXACT_MATCH_ASUS_BOARD_NAME("Z97-PRO",
    &board_info_z97_pro),

to dmi array but don't know what values to add under ec_board_info

static const struct ec_board_info board_info_z97_pro = {
    .sensors = 
};

Request: Support Prime X470-Pro board

Board: "PRIME X470-PRO" - uses \AMW0.ASMX

I simply added the following lines to the asus_ec_dmi_table:

    DMI_EXACT_MATCH_BOARD(VENDOR_ASUS_UPPER_CASE, "PRIME X470-PRO",
		SENSOR_SET_TEMP_CHIPSET_CPU_MB | SENSOR_TEMP_T_SENSOR |
		SENSOR_TEMP_VRM | SENSOR_FAN_CPU_OPT |
		SENSOR_FAN_WATER_FLOW | SENSOR_CURR_CPU),

Compiled and loaded kernel module, run sensors and I get:

asusec-isa-0000
Adapter: ISA adapter
CPU_Opt:        0 RPM
Water_Flow:  1769 RPM
Chipset:      +57.0°C  
CPU:          +62.0°C  
Motherboard:  +36.0°C  
T_Sensor:     -40.0°C  
VRM:          +21.0°C  
CPU:          36.00 A

The T_Sensor I assume is working but showing -40.0C because I have no sensor actually plugged in.

However the Water_Flow reading I am seeing is incorrect; that reading is actually for the fan plugged into the CPU_OPT connector on my board.
When I plug a fan into AIO_PUMP or W_PUMP I am getting a spinning fan but sensors doesn't show any reading on CPU_Opt (so it's not just a matter of them being reversed or something).
Another question I have is why CHA_FAN1, CHA_FAN2, CHA_FAN3, etc. readings aren't supported on any of these boards. Are they just not exposed in this way or is something more needed to support them?

Add support for Crosshair X670E Hero

I just got a X670E Hero and have added support for the first few temperatures that were easy to validate. There appears to be more in the EC on these boards, but I've at least nailed down some of the basic component temps as well as the water temperature sensors.

I'm attaching the DSDT dump to this issue and will create a pull request shortly.

Warning/Message about missing __x86_indirect_alt_call_rax when installing on 5.15 kernel

Hi Eugene,

Thanks for the work on this module! I just emerged the ebuild you linked in the readme and I got an warning message about needs unknown symbol __x86_indirect_alt_call_rax. I'm on the stable kernel in gentoo (sys-kernel/gentoo-kernel-bin to be precise), which is currently at version 5.15.63.
Modprobing it works fine though, and it also shows the sensor values in sensors, so not really sure if this is relevant?

I can't post the exact error unfortunately, since I cleared my terminal and for some reason re-emerging the module doesn't show the error anymore, even after unmerging it.

Add MB ROG ZENITH II EXTREME ALPHA

Hello,

Could you add the following board to you code ? the diff is below.
The following sensors were tested on mine:

asusec-isa-0000
Adapter: ISA adapter
CPU Core: 974.00 mV
CPU_Opt: 0 RPM
VRM HS: 0 RPM
Chipset: 3495 RPM
Water_Flow: 0 RPM
Chipset: +71.0°C
CPU: +47.0°C
Motherboard: +38.0°C
T_Sensor: +30.0°C
VRM: +41.0°C
Water_In: -40.0°C
Water_Out: -40.0°C
Water_Block_In: -40.0°C
Water_Block_Out: -40.0°C
T_sensor_2: +30.0°C
Extra_1: +30.0°C
Extra_2: -40.0°C
Extra_3: -40.0°C
CPU: 4.00 A

Will this eventually get into a kernel? How can I track this?

Thank you,

Eric

420,431d419
< static const struct ec_board_info board_info_zenith_ii_extreme_alpha = {
< .sensors = SENSOR_SET_TEMP_CHIPSET_CPU_MB | SENSOR_TEMP_T_SENSOR |
< SENSOR_TEMP_VRM | SENSOR_SET_TEMP_WATER |
< SENSOR_FAN_CPU_OPT | SENSOR_FAN_CHIPSET | SENSOR_FAN_VRM_HS |
< SENSOR_FAN_WATER_FLOW | SENSOR_CURR_CPU | SENSOR_IN_CPU_CORE |
< SENSOR_SET_WATER_BLOCK |
< SENSOR_TEMP_T_SENSOR_2 | SENSOR_TEMP_SENSOR_EXTRA_1 |
< SENSOR_TEMP_SENSOR_EXTRA_2 | SENSOR_TEMP_SENSOR_EXTRA_3,
< .mutex_path = ASUS_HW_ACCESS_MUTEX_SB_PCI0_SBRG_SIO1_MUT0,
< .family = family_amd_500_series,
< };
<
481,482d468
< DMI_EXACT_MATCH_ASUS_BOARD_NAME("ROG ZENITH II EXTREME ALPHA",
< &board_info_zenith_ii_extreme_alpha),

No sensors published in EC

Hello, I was looking to try this out for my Prime Z390-A MB, but unfortunately I found the BREC was a dummy function and the README indicated no sensors are being published in the EC.

Is there any other path forward in this scenario? Thanks!

Request: Add X570-F board

Board: "ROG STRIX X570-F GAMING" - uses the same \AMW0.ASMX as the other boards

Sensors verified to work:
SENSOR_SET_TEMP_CHIPSET_CPU_MB
SENSOR_TEMP_T_SENSOR
SENSOR_FAN_CHIPSET

asus-ec-sensors-isa-0000
Adapter: ISA adapter
Chipset: 2672 RPM
Chipset: +61.0°C
CPU: +34.0°C
Motherboard: +35.0°C
T_Sensor: +30.0°C
VRM: +0.0°C
CPU: 0.00 A

Can't install on Ubuntu 22.04

Hi,
I'm using Asus Maximus IX Hero, z270 Chipset. I can't install the drivers. I followed the instructions but I'm getting this...

ronnie@optimus:~/Asus/asus-ec-sensors-master$ sudo make
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-11 (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
  You are using:           gcc-11 (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
ronnie@optimus:~/Asus/asus-ec-sensors-master$ sudo make modulesinstall
make: *** No rule to make target 'modulesinstall'.  Stop.
ronnie@optimus:~/Asus/asus-ec-sensors-master$ sudo make modules_install
  INSTALL /lib/modules/6.2.0-36-generic/extra/drivers/hwmon/asus-ec-sensors.ko
  SIGN    /lib/modules/6.2.0-36-generic/extra/drivers/hwmon/asus-ec-sensors.ko
  DEPMOD  /lib/modules/6.2.0-36-generic
Warning: modules_install: missing 'System.map' file. Skipping depmod.

Crosshair VI Hero WiFi AC (X370) Support

board_name: ROG CROSSHAIR VI HERO (WI-FI AC)
mutex name: \AMW0.ASMX (same as others)

This board is being used in an Ubuntu LTS server with an older 5.4 kernel -- it was unable to compile at first because linux/dev_printk.h and linux/units.h weren't found. I removed the includes for those two header files and it seems to compile and work just fine, but I am unsure if functionality has been affected.

These sensors work just fine and match the same output from asus-wmi-sensors:
SENSOR_SET_TEMP_CHIPSET_CPU_MB | SENSOR_TEMP_T_SENSOR | SENSOR_CURR_CPU

SENSOR_FAN_CPU_OPT_X470 is the same situation as the X470 board, CPU_OPT is at 0x00bc (in place of Water_Flow for 500-series).

I plugged in fans/probes to the other sensor connectors and could not get a reading from any other sensor, including CPU voltage. I didn't get to poke around the registers with this board though, so there may be other undiscovered sensors exposed in the EC.

I have attached the DSDT file for this board if it helps.
ROG CROSSHAIR VI HERO (WI-FI AC).zip

Example output with fan plugged into CPU_OPT and temp probe attached to T_SENSOR:

asusec-isa-0000
Adapter: ISA adapter
CPU Core:      0.00 V  
CPU_Opt:        0 RPM
VRM HS:         0 RPM
Chipset:        0 RPM
Water_Flow:  1336 RPM
Chipset:      +53.0°C  
CPU:          +45.0°C  
Motherboard:  +34.0°C  
T_Sensor:     +27.0°C  
VRM:          +35.0°C  
Water_In:      +0.0°C  
Water_Out:     +0.0°C  
CPU:           2.00 A  

asuswmisensors-isa-0000
Adapter: ISA adapter
CPU Core Voltage:          1.53 V  
CPU SOC Voltage:           1.13 V  
DRAM Voltage:              1.37 V  
VDDP Voltage:            916.00 mV 
1.8V PLL Voltage:          1.83 V  
+12V Voltage:             12.10 V  
+5V Voltage:               4.99 V  
3VSB Voltage:              3.31 V  
VBAT Voltage:              3.14 V  
AVCC3 Voltage:             3.33 V  
SB 1.05V Voltage:          1.05 V  
CPU Fan:                 1824 RPM
Chassis Fan 1:            876 RPM
Chassis Fan 2:            854 RPM
Chassis Fan 3:            854 RPM
AIO Pump:                   0 RPM
Water Pump:                 0 RPM
CPU OPT:                 1336 RPM
Water Flow:                 0 RPM
CPU Temperature:          +45.0°C  
CPU Socket Temperature:   +36.0°C  
Motherboard Temperature:  +34.0°C  
Chipset Temperature:      +53.0°C  
Tsensor 1 Temperature:    +27.0°C  
CPU VRM Temperature:      +35.0°C  
Water In:                +216.0°C  
Water Out:               +216.0°C  
CPU VRM Output Current:    2.00 A  

Now getting race condition warning

I never had this warning from dmesg before.

[14364.568530] hwmon1: Concurrent access to the ACPI EC detected. Race condition possible.

Started upon installing kernel 6.4.2 from the Ubuntu Mainline PPA

asus-ec-sensors loaded along with k10temp in the kernel. I don't remember k10temp being loaded on the 6.4.0 kernel.

Will the ASUS ProArt X670E be included?

The next board I purchase for my daily driver will be the ASUS ProArt X670E motherboard. Will it be included in the driver?

It has all the features that I need and is not as expensive as my ASUS Crosshair X670E Hero motherboards which are included in the driver.

Would be a shame to lose monitoring on this new board.

udev rule wont apply

Edit: i may have fixed the issue:
ACTION=="add", SUBSYSTEM=="hwmon", ATTRS{name}=="asusec", SYMLINK+="t_sensor_temp", RUN+="/bin/sh -c 'ln -s /sys/class/hwmon/%k/temp2_input /dev/t_sensor_temp'"
sudo udevadm trigger --action=add --subsystem-match=hwmon --attr-match=name=asusec

Original post:
i am trying to make a stable link to read t-sensor

$ sudo nano /etc/udev/rules.d/t_sensor-temp-stable-path.rules

ACTION=="add", SUBSYSTEM=="hwmon", KERNEL=="hwmon*", ENV{HWMON_NAME}=="asusec", SYMLINK+="t_sensor_temp", RUN+="/bin/sh -c 'ln -s /sys/class/hwmon/%k/temp2_input /dev/t_sensor_temp'"

$ sudo udevadm control --reload-rules
$ sudo udevadm trigger

expected result, t-sensor temp2_input file is now linked in /dev/t_sensor_temp

actual result no link in /dev

 $ cat /dev/t_sensor_temp
cat: /dev/t_sensor_temp: No such file or directory

even after rebooting,and running $ sudo udevadm control --reload-rules $ sudo udevadm trigger its still failing to create link.

i have stable links in /dev for gpu and cpu which work perfectly

asus-ec-sensors won't compile

Do you know why your module won't compile?
All I get and another friend gets is this error message.

keith@Serenity:~/Downloads/asus-ec-sensors-master$ make
  CC [M]  /home/keith/Downloads/asus-ec-sensors-master/asus-ec-sensors.o
/home/keith/Downloads/asus-ec-sensors-master/asus-ec-sensors.c: In function ‘scale_sensor_value’:
/home/keith/Downloads/asus-ec-sensors-master/asus-ec-sensors.c:481:18: error: ‘MILLI’ undeclared (first use in this function)
  481 |   return value * MILLI;
      |                  ^~~~~
/home/keith/Downloads/asus-ec-sensors-master/asus-ec-sensors.c:481:18: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [scripts/Makefile.build:281: /home/keith/Downloads/asus-ec-sensors-master/asus-ec-sensors.o] Error 1
make[1]: *** [Makefile:1879: /home/keith/Downloads/asus-ec-sensors-master] Error 2
make: *** [Makefile:32: modules] Error 2

keith@Serenity:~/Downloads/asus-ec-sensors-master$

Add support for x470-f

Hello, I believe x470-f may be supported by this driver. I exhibit similar behavior when using asus-wmi-sensor as mentioned in issue #12.

PNP0C09 show up in dsdt. However; when I try to add support for x470-f loading the modules if fails.

sudo modprobe -v asus-ec-sensors
insmod /lib/modules/6.2.12-1-default/kernel/drivers/hwmon/asus-ec-sensors.ko.zst
modprobe: ERROR: could not insert 'asus_ec_sensors': No such device

dsdt.dsl.txt

/sys/class/dmi/id/board_name:1:ROG STRIX X470-F GAMING
/sys/class/dmi/id/board_vendor:1:ASUSTeK COMPUTER INC.

Let know how I can help you.
Perhaps there is hope this board will be supported someday.

I am using the latest bios (6063).

I appreciate your time.

Add support for Maximus XI Hero (WiFi)

I have a patch to add support for the Maximus XI Hero (first discussed on kernel.org bug #204807). Based on feedback in that thread I've modified it to adjust the MAX_IDENTICAL_BOARD_VARIATIONS, and it works fine. I want to do a few more experiments to understand why it worked without that extra fix before I actually submit the pull request.

Expect to see something early next week. I figured I'd open an issue here to track it and acknowledge the conversation on the other bug thread.

Thanks,
Kyndigen

C7HWIFI/ROG CROSSHAIR VII HERO (WI-FI): assistance in porting from asus-wmi-sensors

Heyo. Above mentioned board is currently supported by the asus-wmi-sensors kmod and I'd like to port it over.
However, I'm not sure as to the mapping between the two. I have a dumped and decompiled dsdt table.
asus-wmi-sensors gives me:

asus_wmi_sensors-virtual-0
Adapter: Virtual device
CPU Core Voltage:          1.31 V  
CPU SOC Voltage:         796.00 mV 
DRAM Voltage:              1.18 V  
VDDP Voltage:            556.00 mV 
1.8V PLL Voltage:          1.81 V  
+12V Voltage:             12.10 V  
+5V Voltage:               4.99 V  
3VSB Voltage:              3.31 V  
VBAT Voltage:              3.18 V  
AVCC3 Voltage:             3.31 V  
SB 1.05V Voltage:          1.07 V  
CPU Core Voltage:          1.34 V  
CPU SOC Voltage:         818.00 mV 
DRAM Voltage:              1.20 V  
CPU Fan:                 1305 RPM
Chassis Fan 1:            901 RPM
Chassis Fan 2:            820 RPM
Chassis Fan 3:              0 RPM
HAMP Fan:                   0 RPM
Water Pump:                 0 RPM
CPU OPT:                    0 RPM
Water Flow:              1114 RPM
AIO Pump:                1137 RPM
CPU Temperature:          +35.0°C  
CPU Socket Temperature:   +36.0°C  
Motherboard Temperature:  +31.0°C  
Chipset Temperature:      +42.0°C  
Tsensor 1 Temperature:   +216.0°C  
CPU VRM Temperature:      +36.0°C  
Water In:                +216.0°C  
Water Out:               +216.0°C  
CPU VRM Output Current:    4.00 A  

with a small patch:

diff --git a/asus-ec-sensors.c b/asus-ec-sensors.c
index 2768b75..43f8632 100644
--- a/asus-ec-sensors.c
+++ b/asus-ec-sensors.c
@@ -311,6 +311,15 @@ static const struct ec_board_info board_info_pro_ws_x570_ace = {
 	.family = family_amd_500_series,
 };
 
+static const struct ec_board_info board_info_crosshair_vii_hero = {
+	.sensors = SENSOR_SET_TEMP_CHIPSET_CPU_MB |
+		/* SENSOR_TEMP_T_SENSOR |SENSOR_FAN_CHIPSET, */
+		SENSOR_TEMP_VRM | SENSOR_SET_TEMP_WATER |
+		SENSOR_FAN_CPU_OPT | SENSOR_CURR_CPU,
+	.mutex_path = ASUS_HW_ACCESS_MUTEX_ASMX,
+	.family = family_amd_400_series,
+};
+
 static const struct ec_board_info board_info_crosshair_viii_dark_hero = {
 	.sensors = SENSOR_SET_TEMP_CHIPSET_CPU_MB |
 		SENSOR_TEMP_T_SENSOR |
@@ -437,6 +446,8 @@ static const struct dmi_system_id dmi_table[] = {
 					&board_info_pro_art_x570_creator_wifi),
 	DMI_EXACT_MATCH_ASUS_BOARD_NAME("Pro WS X570-ACE",
 					&board_info_pro_ws_x570_ace),
+	DMI_EXACT_MATCH_ASUS_BOARD_NAME("ROG CROSSHAIR VII HERO (WI-FI)",
+					&board_info_crosshair_vii_hero),
 	DMI_EXACT_MATCH_ASUS_BOARD_NAME("ROG CROSSHAIR VIII DARK HERO",
 					&board_info_crosshair_viii_dark_hero),
 	DMI_EXACT_MATCH_ASUS_BOARD_NAME("ROG CROSSHAIR VIII FORMULA",

I get the following output:

asusec-isa-0000
Adapter: ISA adapter
CPU_Opt:        0 RPM
Chipset:      +42.0°C  
CPU:          +35.0°C  
Motherboard:  +31.0°C  
VRM:          +36.0°C  
Water_In:      +0.0°C  
Water_Out:     +0.0°C  
CPU:           5.00 A  

It would be helpful if there was a small guide on figuring out what is supported. I thought I'd just enable it all and see
what doesn't work but boy did my kernel not like that.

asus-ec-sensors does not expose any fan speeds on Asus Crosshair X670E Hero motherboard

Installed the latest release and have VRM temps and Water Out temps now. That is very welcome.

I was hoping that the driver would expose the fan header speeds on the board. Sadly it does not. None found.

Out of the seven headers on the board, the nct6775 driver only finds the output of two headers, fan2 and fan7 are the only ones found as identified by sensors on the nct6775 driver output.
But fan2 is mislabeled by the driver as the physical Fan2 header is unoccupied. It should be labeled as physical header Fan6.

The fan header Fan4 on the motherboard where I have my pump plugged into is missing for example.

The Bios sensors page finds all the fan header outputs as reference.

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.