Skip to content

hwmon fan setting#314

Merged
jannau merged 2 commits intoAsahiLinux:bits/110-smcfrom
chadmed:hwmon-fanset
Aug 31, 2024
Merged

hwmon fan setting#314
jannau merged 2 commits intoAsahiLinux:bits/110-smcfrom
chadmed:hwmon-fanset

Conversation

@chadmed
Copy link
Copy Markdown
Member

@chadmed chadmed commented Aug 7, 2024

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.

@jannau jannau force-pushed the asahi-wip branch 2 times, most recently from ccc12d2 to 24c1838 Compare August 21, 2024 20:21
@chadmed
Copy link
Copy Markdown
Member Author

chadmed commented Aug 28, 2024

Rebased on top of asahi-wip

@chadmed chadmed changed the base branch from asahi-wip to bits/110-smc August 30, 2024 07:37
jannau and others added 2 commits August 30, 2024 17:39
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>
@jannau jannau merged commit 77e8da6 into AsahiLinux:bits/110-smc Aug 31, 2024
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