Skip to content

Conversation

@Jiogo18
Copy link
Contributor

@Jiogo18 Jiogo18 commented Sep 20, 2025

Add the fan_speed_rpm entry to use the address 0xcc..0xcd (or 0xc8..0xc9) for CPU fan and 0xca..0xcb for GPU fan, like MControlCenter does.
Discussion with @mutchiko dmitry-s93/MControlCenter#267

realtime_fan_speed

The current realtime_fan_speed (0x71 and 0x89) is the fan % target speed for fan mode.
Ideally, it should include "target", "driving" or "control" in its name.

For example, when cooler boost is enabled, fan mode continues to change the target speed according to the temperature.

  • dGPU at D3cold, 0x89 is 0, while fan_speed_rpm indicates 6075 rpm.
  • For the CPU fan, the temperature decreases and so does the value at 0x71, while fan_speed_rpm reports 8275.

For now, I named the new value fan_speed_rpm to distinguish both.

About the magic number 480000

But now I wonder if MSI Center report is good. RPM above 4000 seems unreal.
By analyzing the audio with my CPU fan, I get

target speed Frequency 480000/n
50% 1980 Hz 3000 rpm
100% 3930 Hz 6000 rpm
150% 5470 Hz 8275 rpm

This is more likely 320000 for my CPU fan, with 100% speed targeting 4000 rpm.

https://download-2.msi.com/archive/mnu_exe/mb/MSICENTER.pdf slide 97, graphs show different RPM at 100% (~2100, 2702, and ~4500). It's also not impossible that they have different numerators, it could be a fan_speed_rpm_magic_number.

@glpnk
Copy link
Collaborator

glpnk commented Sep 21, 2025

You don't mentioned your device, but I will assume it's new enough, like Intel core 11 gen+ or AMD 6 gen+.

We have msi-wmi-platform driver which returns fans RPM through hwmon API, which can be viewed using lm-sensors.

This is more likely 320000 for my CPU fan, with 100% speed targeting 4000 rpm.

You should not compare different types of fans.

dGPU at D3cold, 0x89 is 0, while fan_speed_rpm indicates 6075 rpm.

Cooler Boost just bypasses fan curve completely. You should not account it as rule.

By analyzing the audio with my CPU fan, I get

Do you have broken fan blade, or any other audible marker? Maybe you can get laser tachometer readings as proof?

@Jiogo18
Copy link
Contributor Author

Jiogo18 commented Oct 5, 2025

MSI Bravo 15 A4DDR
CPU: AMD Ryzen 5 4600H
GPU: AMD Radeon RX 5500M

I have trouble using sensors. I don't have CPU fan, and I only have GPU fan1 at 65535 RPM.
Does msi-wmi use this exact value? Relying on msi-ec seems more straightforward.

On the other hand, isn't this the same case as for realtime_temperature also reported with sensors?

Cooler Boost just bypasses fan curve completely

Yes, it illustrates realtime_fan_speed is not the real/current fan speed.

You should not compare different types of fans.

True, I was confused because I got no frequency spike at the exact rpm. But by looking again, I also get spikes above rpm.
So forget it, I will trust existing values.

@glpnk
Copy link
Collaborator

glpnk commented Oct 5, 2025

Okay, your model is "WMI1", so msi-wmi-platform is useless for you.

I have trouble using sensors. I don't have CPU fan, and I only have GPU fan1 at 65535 RPM.

How many fans you exactly have?

If you have single fan, than it probably follows only CPU fan curve

@Jiogo18
Copy link
Contributor Author

Jiogo18 commented Oct 5, 2025

The laptop has 2 fans, one "CPU" and one GPU. GPU fan is often off.

sensors

iGPU, CPU?

amdgpu-pci-0800
Adapter: PCI adapter
vddgfx:        1.09 V
vddnb:       937.00 mV
edge:         +43.0°C
PPT:           4.00 W
sclk:         400 MHz

GPU off

amdgpu-pci-0300
Adapter: PCI adapter
vddgfx:           N/A
ERROR: Can't get value of subfeature fan1_min: Can't read
ERROR: Can't get value of subfeature fan1_max: Can't read
fan1:             N/A  (min =    0 RPM, max =    0 RPM)
edge:             N/A  (crit = +100.0°C, hyst = -273.1°C)
                       (emerg = +105.0°C)
junction:         N/A  (crit = +100.0°C, hyst = -273.1°C)
                       (emerg = +105.0°C)
mem:              N/A  (crit = +105.0°C, hyst = -273.1°C)
                       (emerg = +110.0°C)
ERROR: Can't get value of subfeature power1_cap: Can't read
PPT:              N/A  (cap =   0.00 W)
pwm1:             N/A
sclk:             N/A
mclk:             N/A

GPU on

amdgpu-pci-0300
Adapter: PCI adapter
vddgfx:        6.00 mV
fan1:        65535 RPM  (min =    0 RPM, max = 3350 RPM)
edge:         +48.0°C  (crit = +100.0°C, hyst = -273.1°C)
                       (emerg = +105.0°C)
junction:     +48.0°C  (crit = +100.0°C, hyst = -273.1°C)
                       (emerg = +105.0°C)
mem:           +0.0°C  (crit = +105.0°C, hyst = -273.1°C)
                       (emerg = +110.0°C)
PPT:           4.00 W  (cap =  85.00 W)
pwm1:             12%
sclk:           0 Hz
mclk:         100 MHz

@Jiogo18
Copy link
Contributor Author

Jiogo18 commented Dec 10, 2025

I don't know why I kept this as a draft for so long. It's ready, expect it only contain address for my laptop.

Okay, your model is "WMI1", so msi-wmi-platform is useless for you.

If I understand correctly from your comments, msi-wmi-platform is for WMI2 and not implemented (yet?) for WMI1?

Is it why cat /sys/class/hwmon/hwmon5/fan1_input reports 65535?
temp1_input works well for CPU and GPU (just off by 2-4 degrees with hwmon1 the CPU).
hwmon1/fan1_input doesn't exist, perhaps it's not considered as the CPU fan?

I agree having access from standard API would be great. If you have an idea how I can help, let me know.
Though, I find it more straightforward (for MControlCenter and equivalent) to read directly from msi-ec.

@Jiogo18 Jiogo18 marked this pull request as ready for review December 10, 2025 04:24
@glpnk
Copy link
Collaborator

glpnk commented Dec 10, 2025

Is it why cat /sys/class/hwmon/hwmon5/fan1_input reports 65535?

I see this a reason to keep this as draft

@Jiogo18
Copy link
Contributor Author

Jiogo18 commented Dec 14, 2025

hwmon:

  • GPU: hwmon5/name is amdgpu. By debugging, found that drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c returns 0xffff. Is it possible that the fan is not connected to the GPU?
  • CPU: hwmon1/name is acpitz. It should contain fan1_input, right?

Same result with linux-lts.

The feature is functional and ready. If you prefer not to support it, I'd appreciate your thoughts, so I can focus on troubleshooting hwmon in a discussion instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants