5 minute howto: automatic fan control (updated)

Discussion in 'Linux' started by annafil, Sep 10, 2008.

  1. annafil

    annafil

    Joined:
    Aug 12, 2008
    Messages:
    327
    Likes Received:
    0
    Location:
    Malaysia
    Note: The commands that control the fan are borrowed from macles.blogspot.com. I've just automated the process ;)

    Update: Casao pointed out a couple of problems with the install.sh (like the fact that it wasn't there). I've updated the tarball already with some changes. Same url. Thanks Casao!

    This script turns the fan to its highest setting when the AC adapter is plugged in (because the lappie can get a little warm when it's on your lap and charging). When the AC adapater isn't plugged in, it drops to normal mode. Read below for how to turn off the fan while on battery.

    It is written and tested for linpus, but should probably work on Ubuntu as well

    Step 1
    Download this tarball, extract, run

    Code:
    chmod +x install.sh
    sudo ./install.sh
    Then to refresh your acpi, run

    Code:
    sudo killall acpid
    sudo acpid
    Done. It's one step :) Try plugging out the power cord and plugging it back in, give it a couple of seconds and listen to the fan sound.

    If you want to turn the fan off while on battery (not recommended, do at your own risk, but if you're REALLY desperate for battery life), run

    Code:
    sudo mousepad /etc/acpi/events/acoff.conf
    Change

    Code:
    action=/home/user/bin/fanlow
    to
    Code:
    action=/home/user/bin/fanoff
    Then to the reset acpi thing.
     
    annafil, Sep 10, 2008
    #1
    1. Advertisements

  2. annafil

    hiker_jon

    Joined:
    Aug 24, 2008
    Messages:
    28
    Likes Received:
    0
    Hi,
    Could you say a little more about what this does and why? For instance it seems to deal with the fan differently than the noisy fan hack on the wiki (I would link to it, but I see its been spammed again). Do you think that one is too aggressive about turning off the fan?
    Jon
     
    hiker_jon, Sep 13, 2008
    #2
    1. Advertisements

  3. annafil

    annafil

    Joined:
    Aug 12, 2008
    Messages:
    327
    Likes Received:
    0
    Location:
    Malaysia
    The noisy fan hack turns off the noisy fan when it gets too loud. The noisy fan in that case is actually a symptom of other issues, so this isn't related.

    This howto is for those who have a normal working fan, and who, like me, feel that when the AC adapter is plugged in the laptop gets too hot. So this howto gives you the option of turning up the fan speed automatically
     
    annafil, Sep 13, 2008
    #3
  4. annafil

    Poelsa

    Joined:
    Oct 8, 2008
    Messages:
    10
    Likes Received:
    0
    I have made no hacks to my fan, but i think it is a bit loud compared to my macbook (when the mac is as silent as it gets) is it possible to reduce the fan speed without running the first part of this mod?
    I do not want it to run faster when connected to the ac, as it does not get warm, so i can't really se any use of running that part.

    This is my first post here by the way, and my first day on linux, so treat me nice please :)
     
    Poelsa, Oct 9, 2008
    #4
  5. annafil

    annafil

    Joined:
    Aug 12, 2008
    Messages:
    327
    Likes Received:
    0
    Location:
    Malaysia
    Poelsa: yes there is a way to simply shut it off. Download the archive linked in the post, extract the "fanoff" file.

    Right click on it, find Permissions and make sure "Executable" is set. You should be able to double click on it and turn off the fan.

    If you want to to make this more permanent, I would suggest looking on this forum for how to add things to system startup.
     
    annafil, Oct 9, 2008
    #5
  6. annafil

    Poelsa

    Joined:
    Oct 8, 2008
    Messages:
    10
    Likes Received:
    0
    And I thought Linux was hard :)
    Thank you for the quick reply, i extracted the three scripts and just tested it, is there a speed between low and none by the way?
    Give it a day and the fan probably won't bother me at all.

    I have to say that from what I have done with the one today, it seems as though my macbook will stay at home when I leave in the future.
     
    Poelsa, Oct 9, 2008
    #6
  7. annafil

    annafil

    Joined:
    Aug 12, 2008
    Messages:
    327
    Likes Received:
    0
    Location:
    Malaysia
    Poelsa... Unfortunately, there are only three hardware fixed speeds for the fan, as far as I can tell

    :) Glad you're enjoying the new toy
     
    annafil, Oct 10, 2008
    #7
  8. annafil

    shancial

    Joined:
    Aug 4, 2008
    Messages:
    1
    Likes Received:
    0
    Annafil, i now have a problem. i applied your hack and it works fantastic, but i need to get the fan with AC to dynamic again. the fan noise on full is too loud for me to use at night. so, i need to leave battery fan action alone but change the AC fan to dynamic again, could yyou help me?
     
    shancial, Dec 3, 2008
    #8
  9. annafil

    gnash

    Joined:
    Dec 3, 2008
    Messages:
    11
    Likes Received:
    0
    I've applied this and it's screwed up on mine.

    I've found that with this:
    Fanhigh - low speed fan(barely audible)
    Fanlow - high speed fan(audible)
    Oh well I've just swap these values and now it works the way its actually supposed to!! Figured it out just in time too as I can feel the keypad getting hot :roll:
     
    gnash, Dec 4, 2008
    #9
  10. annafil

    dskid807

    Joined:
    Nov 18, 2008
    Messages:
    82
    Likes Received:
    0
    How remove this hack? Please replay or PM me with instructions.
     
    dskid807, Dec 11, 2008
    #10
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.