Skip to content

Instantly share code, notes, and snippets.

@applecargo
Forked from nwjlyons/laptop_fan.sh
Created May 8, 2017 14:30
Show Gist options
  • Save applecargo/fc51005c42707e9768a067e5429c9ea1 to your computer and use it in GitHub Desktop.
Save applecargo/fc51005c42707e9768a067e5429c9ea1 to your computer and use it in GitHub Desktop.
Manually control Mac Book Pro laptop fan from linux
# First su in as root
sudo su
# Then set fan control to manual mode
echo 1 > /sys/devices/platform/applesmc.768/fan1_manual
# Then set the fan speed to any value between fan1_min and fan1_max. To view these values
cat /sys/devices/platform/applesmc.768/fan1_min
cat /sys/devices/platform/applesmc.768/fan1_max
# Set the fan speed by writing to fan1_output
echo 6200 > /sys/devices/platform/applesmc.768/fan1_output
(6200 is my max fan speed)
@applecargo
Copy link
Author

doesn't work as is. but a good reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment