Conversation
Support the lenovo-legion-go-wmi-fan kernel driver which exposes fan
curve control through hwmon with non-standard constraints:
- Temperature points are firmware-fixed (read-only, 10-100°C in 10°C steps)
- Fan RPM cannot be read (no fan1_input)
- Only PWM curve values (pwm1_auto_point{1-10}_pwm) are writable
Backend changes (fan.py):
- Add fixed_temps field to FanConfig for firmware-imposed temperature points
- Make pwm_input optional in hwmon config parsing (no fan RPM on some hardware)
- Make temp_write optional in curve_path (skip writes when temp is read-only)
- Skip temp file writes in set_fanAuto, set_fanPercent, set_fanCurve when None
- Add _interpolate_to_fixed_temps() to map arbitrary user curves to fixed points
- Return fan_fixed_temps in get_fanConfigList for frontend use
Schema changes (hwmon.json):
- Make temp_write optional in PWMWriteCurvePath (required -> only pwm_write)
- Make PWMInput fields optional (for devices without RPM reading)
- Add fixed_temps array field to PWMWrite definition
Frontend changes:
- Add fan_fixed_temps to FanConfig type and getFanFixedTemps() to BackendData
- Curve editor: lock temperature axis when fixedTemps is set (vertical drag only)
- Curve editor: disable temperature slider for fixed-temp devices
- Curve editor: draw orange dashed guide lines at fixed temperature positions
- Pass fixedTemps prop through FANManageProfileComponent to modal dialogs
New config: legion_wmi_fan.yml with MIN_CURVE defaults from firmware
- Show target speed percentage instead of "0 RPM" when hardware does not support RPM reading (e.g. legion_wmi_fan) - Fix NaN from division by zero when max RPM is 0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on https://github.com/honjow/lenovo-legion-go-wmi-fan