pity-riotous
pity-riotous
pity-riotous
pity-riotous
hyenas
hyenas
hyenas
hyenas
Linux on your Apple Mac | iLinux • View topic - How-to: Keeping Your Laptop Cool

How-to: Keeping Your Laptop Cool

How-to: Keeping Your Laptop Cool

Postby linuxopjemac » Wed Jul 13, 2011 9:44 am

As far as I know, the lack of cpu scaling on macbook(pro)s is a big problem. Don't bother using your brain to find a solution, for I am here to do that for you. Note that the script will not work very properly on the new quad-core computers. You can do some tweaking to get it running though.

Step 0: If you read the official Ubuntu MacbookPro page, you can skip this.
We need to ensure that sensors are working properly here. Do these things:
apt-get install lm-sensors
sensors-detect (make sure you allow it to edit /etc/modules)
And for now:
Code: Select all
modprobe coretemp


Step 1: Put the following script in /usr/local/sbin:
Code: Select all
TEMP1=55000
TEMP2=65000
FANSPEEDLOW=2000
FANSPEED1=4000
FANSPEED2=6200

COUNT=1

for i in `seq 1 9`
do

CURRTEMP1=`cat /sys/devices/platform/coretemp.0/temp1_input`
CURRTEMP2=`cat /sys/devices/platform/coretemp.1/temp1_input`

if test $CURRTEMP1 -ge $TEMP2; then
echo $FANSPEED2 > /sys/devices/platform/applesmc.768/fan1_min
elif test $CURRTEMP1 -ge $TEMP1; then
echo $FANSPEED1 > /sys/devices/platform/applesmc.768/fan1_min
else
echo $FANSPEEDLOW > /sys/devices/platform/applesmc.768/fan1_min
fi

echo "Sleeping for 6 seconds"
echo $i

sleep 6

done

Step 2: Add this script to root's crontab. It needs to run every minute. Here is my crontab line:
Code: Select all
* * * * * /usr/local/sbin/temp.sh >> /var/log/temp.sh.log

Use google if you don't know how to do this. You're a linux user now, get used to it.

Step 3: Check /var/log/temp.sh.log to see if things are working

Step 4: Tweak the values to suit your temperature needs. Resting that hot computer on your leg is bad for your sperm count you know.
linuxopjemac
Site Admin
 
Posts: 541
Joined: Tue Feb 02, 2010 8:48 am

Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron
pity-riotous
pity-riotous
pity-riotous
pity-riotous
hyenas
hyenas
hyenas
hyenas