hwmon fan setting#314
Merged
jannau merged 2 commits intoAsahiLinux:bits/110-smcfrom Aug 31, 2024
Merged
Conversation
ccc12d2 to
24c1838
Compare
Member
Author
|
Rebased on top of asahi-wip |
Signed-off-by: Janne Grunau <j@jannau.net>
The SMC provides an interface for manually controlling the speeds of any fans attached to it. Expose this via the standard hwmon interface. Once a fan is in manual control, the SMC makes no attempts to save users from themselves. It is possible to write arbitrary values outside of the SMC's reported safe range. The driver therefore does its own sanity checking. Since we are unsure whether or not leaving the fans in manual mode can cause damage to Apple Silicon devices, this functionality is gated behind a very explicit and scary-sounding unsafe module parameter. Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
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.
Using the standard hwmon interface, it is now possible to manually set the fan speed for any enumerated fans hanging off the SMC.
Attempting to set the fan speed to 0 will restore automatic control. Additionally, it is not possible to set a fan speed outside of the safe range reported by the SMC (reported in the fan hwmon min/max attributes). It is also not possible to turn the fans off manually for safety reasons. The SMC will turn them off opportunistically when they are under automatic control.
Currently, this functionality is gated behind an unsafe module parameter.