Skip to content

Instantly share code, notes, and snippets.

@jordinebot
Created December 15, 2016 07:51
Show Gist options
  • Save jordinebot/1c534e9a2b37a538799b8a75d85c77aa to your computer and use it in GitHub Desktop.
Save jordinebot/1c534e9a2b37a538799b8a75d85c77aa to your computer and use it in GitHub Desktop.
iMac Fan speed controller
#!/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"
#!/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