zeule / asus-ec-sensors

Linux HWMON sensors driver for ASUS motherboards to get sensor readings from the embedded controller
GNU General Public License v2.0
45 stars 21 forks source link

Asus ProArt-X570-CREATOR-WIFI support #17

Closed Dazog closed 2 years ago

Dazog commented 2 years ago

Model: ProArt-X570-CREATOR-WIFI Creator.zip

Attached is the .dat and .dsl

Let me know if you require any more information.

zeule commented 2 years ago

Thank you for the inputs!

Let me know if you require any more information.

We will have to determine which sensors are present in this board. Can be done either via experimenting with this driver or you can look up outputs from Windows monitoring software (ASUS AiSuite or HWINFO).

Dazog commented 2 years ago

I have EC entries for: VRM CPU core Current CPU Core power

in HWinfo64

Screenshot 2022-03-07 103140

zeule commented 2 years ago

Thank you! I will add those plus T_Sensor and CPU_OPT fan, which are also on the internal connectors list at the ASUS tech specs page.

zeule commented 2 years ago

@Dazog, I forgot to ask for the DMI board vendor and name strings. Please, # cat /sys/class/dmi/id/board_{vendor,name}.

Dazog commented 2 years ago

Windows stats this: Screenshot 2022-03-07 110444

I can do the command later in linux for you aswell.

zeule commented 2 years ago

Thank you, that will do. Could you test #18 (branch feature/ProArt-X570-CREATOR-WIFI), please?

Dazog commented 2 years ago

Appears secure boot blocks the loading of modules.

I use it for windows and do not want to disable it.

I have no way to load the module to test this :(

zeule commented 2 years ago

But the kernel makefile should sign out-of-tree modules as well.

sbraz commented 2 years ago

Hi @zeule , I can confirm that the test branch works properly:

# dmidecode -s baseboard-product-name
ProArt X570-CREATOR WIFI
# sensors asusec-isa-0000
asusec-isa-0000
Adapter: ISA adapter
CPU Core:      1.30 V  
CPU_Opt:     1577 RPM
Chipset:      +58.0°C  
CPU:          +57.0°C  
Motherboard:  +35.0°C  
T_Sensor:     -40.0°C  
VRM:          +48.0°C  
CPU:          81.00 A  

Do you think this change will eventually make it into the mainline kernel? That would be awesome :)

I also have a few questions, I apologise if this isn't the right place to ask but I'm having trouble finding out what the various sensors correspond to:

sbraz commented 2 years ago

Also I'm a bit confused by this statement from the README (also mentioned in https://github.com/torvalds/linux/commit/b87611d43757c131e5f272b42f0561faed52029e):

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

And yet:

# cat /sys/class/hwmon/hwmon4/name
asusec

Doesn't it mean that the data is published to the HWMON? Or is there a subtlety which I don't understand?

zeule commented 2 years ago

… I can confirm that the test branch works properly:

Thank you!

Do you think this change will eventually make it into the mainline kernel? That would be awesome :)

Yes, I will submit it, thanks to your test.

  • do you know what the CPU temperature from the EC is? It's different from Tctl, Tccd1and Tccd2:

ASUS AiSuite calls it "CPU Package", as far as I remember.

  • is there a way to find what the values returned by the Super-I/O chip correspond to? e.g.

Theoretically you can decompile your BIOS and find labels there... The only other way is to compare with another software which already knows that. Most of them are Windows application though.

Also I'm a bit confused by this statement from the README…

The EC chip, unlike the Super-I/O one, does not provide critical values (min, max, hyst, etc.).

zeule commented 2 years ago

Mainlined.

sbraz commented 1 year ago

Hi @zeule, I believe you forgot to add the mutex path for this board: https://github.com/torvalds/linux/commit/de8fbac5e59e239b00cdac611784b1bc1ff53d14#diff-637d49de94a4f7fc8228b8fa6dddaac36c7bf4869e219296df524d2fe7000fcaR189-L182 It prevents the module from loading:

asus-ec-sensors asus-ec-sensors: Hardware access guard mutex name is empty 
asus-ec-sensors asus-ec-sensors: Failed to setup state/EC locking: -22
asus-ec-sensors: probe of asus-ec-sensors failed with error -22

The following fixes it, as it uses the same mutex path as other boards:

diff --git a/drivers/hwmon/asus-ec-sensors.c b/drivers/hwmon/asus-ec-sensors.c
index a901e4e33d81..b4d65916b3c0 100644
--- a/drivers/hwmon/asus-ec-sensors.c
+++ b/drivers/hwmon/asus-ec-sensors.c
@@ -299,6 +299,7 @@ static const struct ec_board_info board_info_pro_art_x570_creator_wifi = {
        .sensors = SENSOR_SET_TEMP_CHIPSET_CPU_MB | SENSOR_TEMP_VRM |
                SENSOR_TEMP_T_SENSOR | SENSOR_FAN_CPU_OPT |
                SENSOR_CURR_CPU | SENSOR_IN_CPU_CORE,
+       .mutex_path = ASUS_HW_ACCESS_MUTEX_ASMX,
        .family = family_amd_500_series,
 };
zeule commented 1 year ago

Thank you, the fix was applied and submitted upstream.