msi-ec icon indicating copy to clipboard operation
msi-ec copied to clipboard

Basic and Advanced fan modes

Open glpnk opened this issue 1 year ago • 7 comments

MsiFanControl project is a replacement app for "WMI1" devices, which allows setting Fan into Auto, Basic and Advanced mode with fan curve. This app is made for Windows and utilizes ACPI-WMI subsystem to Read/Write data to EC.

Fan mode switching is handled by System[9] register, which corresponds to 0xF4 EC address (according to mapping from DSDT tables). Values used by this project are slightly different, but control bits are similar to our.

For Basic fan mode, it sets System[10] register, which corresponds to 0xF5 EC address. Input data should be in range [-15;15] which is turned to value where: ((value < 0) << 7) | ((value < 0) ? -value : value)

WMI1 to EC map Image

glpnk avatar Mar 02 '25 11:03 glpnk

@honjow Hi! Today I found you making fan curve hwmon support. Which hwmon entries you use for curve?

glpnk avatar Mar 08 '25 19:03 glpnk

@honjow Hi! Today I found you making fan curve hwmon support. Which hwmon entries you use for curve?

Yes, sorry I just saw the message. First, I re-applied #143 as a base based on the latest version. The standard hwmon entries used are fan1_input, fan1_label, pwm1_enable, etc. However, the standard hwmon entries currently do not have direct support for fan curves, so I referred to the implementation methods of some other devices and used custom entries like pwm1_auto_pointX_pwm, pwm1_auto_pointX_temp.

Image

honjow avatar Mar 11 '25 00:03 honjow

@honjow Looks nice.

Have you seen this module? https://github.com/torvalds/linux/blob/master/drivers/platform/x86/msi-wmi-platform.c

It uses WMI-ACPI interface to access EC. MSI call it WMI2. After them, we call older layout as WMI1 (on screenshot above).

Image

From what can you see here:

  • Temperature — is current temperature and temp curve
  • Fan — is fan curve, realtime % RPM and RPM
  • Thermal — seems to be pwm[1-*]_auto_point[1-*]_temp_hyst

I think msi-wmi-platform is a better base for Claws, Gaming series and newer devices.

You can find more info in #98

glpnk avatar Mar 11 '25 06:03 glpnk

@honjow Looks nice.

Have you seen this module? https://github.com/torvalds/linux/blob/master/drivers/platform/x86/msi-wmi-platform.c

It uses WMI-ACPI interface to access EC. MSI call it WMI2. After them, we call older layout as WMI1 (on screenshot above).

Image

From what can you see here:

  • Temperature — is current temperature and temp curve
  • Fan — is fan curve, realtime % RPM and RPM
  • Thermal — seems to be pwm[1-*]_auto_point[1-*]_temp_hyst

I think msi-wmi-platform is a better base for Claws, Gaming series and newer devices.

You can find more info in #98

It does look better. I did see it while browsing the kernel source code. But there is limited information available, and I am not familiar with WMI. So in the end, what I found was msi-ec.

honjow avatar Mar 11 '25 07:03 honjow

Do you have telegram?

glpnk avatar Mar 11 '25 07:03 glpnk

Do you have telegram?

yes

honjow avatar Mar 11 '25 07:03 honjow

@honjow wrote you email with telegram account

glpnk avatar Mar 11 '25 11:03 glpnk