Created
December 15, 2016 07:51
-
-
Save jordinebot/1c534e9a2b37a538799b8a75d85c77aa to your computer and use it in GitHub Desktop.
iMac Fan speed controller
This file contains 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
#!/bin/bash | |
# Set fan 1 to forced mode | |
smc -k "FS! " -w 0002 | |
# Set fan 1 to required RPM (Use rpm2hex to get the value) | |
RPM="$(rpm2hex $1)" | |
smc -k F1Tg -w ${RPM:2:4} | |
echo "Fan 1 set to $RPM RPM" |
This file contains 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
#!/bin/bash | |
python -c "print hex($1 << 2)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment