-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix LOQ fancurves #270
base: main
Are you sure you want to change the base?
fix LOQ fancurves #270
Conversation
- fan base start address is moved to first range of values - structure of fan : u8 min cpu temp, u8 max cpu temp, u8 rpm - change values correctly of second range - cpu temp / hyst, gpu temp / hyst address identified
I closed the pull request to check a truncated value between legion_gui and the fancurve, I thought it was something on my PR but it is an issue in the main branch, this :
|
Thanks for the good changes. We will definitely merge that. First, we have to make sure that we do not break compatibility with the old model. The problem that the same value is not read back after writing with legion_gui due to rounding is an open problem. The kernel interface requires that we use a PWM value in 0-255 in hwom and not rpm. So there are some rounding errors. This is not related to your patch.
|
Fancurve
ecmemory with the custom profile for the curves: cat /sys/kernel/debug/legion/ecmemory | hexdump -C
As far I tested the previous code and this PR only changes the values and the sensors reports the original rpms, only in custom mode there are two bytes after each range that shows the current speed for both fans and if they are modified it changes the speed and you can hear the fans using it. PD. This function doesnt allow to modify the speed for the first point. LenovoLegionLinux/kernel_module/legion-laptop.c Line 2151 in 2912438
|
We always assume the frist point is zero but you can change the if to this, but I not sure some older model like to have a value higher that zero (rpm models): if (!(value >= 0 && value <= 255)) { You can also do it like this: switch (fancurve->fan_speed_unit) {
case FAN_SPEED_UNIT_RPM_HUNDRED:
if (!(point_id == 0 ? value == 0 : (value >= 0 && value <= 255))) {
pr_err("Value %d PWM not in allowed range to point with id %d",
value, point_id);
return false;
};
default:
if (!(value >= 0 && value <= 255)) {
pr_err("Value %d PWM not in allowed range to point with id %d",
value, point_id);
return false;
}
} |
Hi, this fixes the following for the LOQ model:
Lenovo Vantage Values:
ecmemory