Skip to content

Instantly share code, notes, and snippets.

@relict007
Last active December 23, 2015 04:29
Show Gist options
  • Save relict007/6580430 to your computer and use it in GitHub Desktop.
Save relict007/6580430 to your computer and use it in GitHub Desktop.
Script for fan control on Dell laptops using i8k package. You need to have i8k support in kernel also. Just run this and it will control the fans automatically.
#!/bin/bash
#set -x
&> /dev/null
while [ 1 ]
do
temp=$(i8kctl temp)
#echo $temp
if [[ $temp -ge "0" && $temp -le "50" ]]
then
i8kfan -1 0
else if [[ $temp -ge "51" && $temp -le "65" ]]
then
i8kfan -1 2
else
i8kfan -1 3
fi
fi
sleep 3s
i8kctl
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment