Page 1 of 2 12 LastLast
Results 1 to 10 of 25

Thread: HOWTO Control Fan Speed

Hybrid View

  1. #1
    Join Date
    Sep 2006
    Location
    Bruxelles, Belgium
    Beans
    657

    HOWTO Control Fan Speed

    This is how fan speeds should be managed using powersaved . I do not guarantee that it will work on any system, use it at your own risk. Some steps also might be superfluous.
    More documetation (read it to be familiar with what will happen) before proceeding can be found here: http://powersave.sourceforge.net/powersave/Thermal.html
    I will also show the readings on my system (HP 6820s, Core2 Duo T7250, 4GB Ram, ATI X1350, Kubuntu 8.04) in order to get a better idea of what you should see.
    1. First of all, some check are necessary:
    Code:
    cat /proc/acpi/thermal_zone/*/trip_points
    The result is some blah blah about trip points, temperatures etc. You should see something here, I still do not know if it is absolutely necessary for something to appear in order for thermal throttling to be supported on the system. My output:
    Code:
    critical (S5):           256 C
    active[0]:               80 C: devices=C36B
    active[1]:               72 C: devices=C36C
    active[2]:               62 C: devices=C36D
    active[3]:               45 C: devices=C36E
    active[4]:               30 C: devices=C36F
    critical (S5):           108 C
    passive:                 105 C: tc1=1 tc2=2 tsp=300 devices=CPU0 CPU1
    critical (S5):           110 C
    active[0]:               105 C: devices=C372
    active[1]:               70 C: devices=C370
    active[2]:               60 C: devices=C371
    critical (S5):           108 C
    passive:                 60 C: tc1=1 tc2=2 tsp=300 devices=CPU0 CPU1
    critical (S5):           110 C
    In order to continue, you have to install powersaved:
    Code:
    sudo apt-get install powersaved
    This might lead to the removal of apmd and powernowd, not to worry . Check that powersaved is in the autostart process list and reboot.
    2. The next step is to see which thermal device is actually active (in my case only one, the processor). To do this, do a:
    Code:
    sudo powersave -T
    My output:
    Code:
    Thermal Device no. 0:
    Temperature: 53
    Critical: 108
    Passive: 105
    Thermal Device no. 1:
    Temperature: 57
    State: ACTIVE
    Critical: 256
    Active 0: 80
    Active 1: 72
    Active 2: 62
    Active 3: 45
    Active 4: 30
    Thermal Device no. 2:
    Temperature: 50
    Critical: 110
    Thermal Device no. 3:
    Temperature: 33
    Critical: 108
    Passive: 60
    Thermal Device no. 4:
    Temperature: 50
    Critical: 110
    Active 0: 105
    Active 1: 70
    Active 2: 60
    So, in my case Thermal Device 1 is active. I did a double check with:
    Code:
    cat /proc/acpi/thermal_zone/TZ1/trip_points
    Result:
    Code:
    critical (S5):           108 C
    passive:                 105 C: tc1=1 tc2=2 tsp=300 devices=CPU0 CPU1
    3. The final step is editing the config file with the desired trip points
    Code:
    sudo kate /etc/powersave/thermal
    There are several modifications that have to be done:
    Code:
    #Enable thermal management
    ENABLE_THERMAL_MANAGEMENT="yes"
    #Use fan to cool the device
    COOLING_POLICY="active"
    
    #Temperature Trip Points
    THERMAL_CRITICAL_X="95"
    THERMAL_HOT_X="90"
    THERMAL_PASSIVE_X="40"
    THERMAL_ACTIVE_X_0="50"
    THERMAL_ACTIVE_X_1="62"
    The X stands for the ACTIVE thermal device, in my case X is 1 so a line would look like
    Code:
    THERMAL_PASSIVE_1="40"
    . The numbers are the temperatures. Basically, it means that starting from 40C the fans will start to spin, increasing speed when each trip point is reached.
    I still do not know how how reliable the reported trip points (fan speeds) are. What I did was to take the results from the thermal device 0:
    Code:
    cat /proc/acpi/thermal_zone/TZ0/trip_points
    which are:
    Code:
    critical (S5):           256 C
    active[0]:               80 C: devices=C36B
    active[1]:               72 C: devices=C36C
    active[2]:               62 C: devices=C36D
    active[3]:               45 C: devices=C36E
    active[4]:               30 C: devices=C36F
    and made the assumption that the active device has also 5 trip points (TZ0 is the thermal zone for Core0 and TZ1 is the thermal zone for Core1). What is confusing is that powersave -T reports Thermal Device 1 with the powr trip points of thermal zone 0, I suppose the system is not yet fully supported. Everyone is free to decide how many trip points to choose.
    4. Last but not least, reboot.
    You can test if it is working by monitoring temperatures while running glxgears or something like that.
    Hope this helps.

    UPDATE: Changed thermal variables to correct ones
    Last edited by zgornel; July 2nd, 2008 at 11:46 AM.

  2. #2
    Join Date
    Mar 2008
    Beans
    50

    Re: HOWTO Control Fan Speed

    Nice tutorial, this is exactly what I was looking for. However, this is my output of sudo powersave -T after a reboot:

    Code:
    Device no. 0:
    Temperature: 46
    Critical: 100
    Passive: 96
    Thermal Device no. 1:
    Temperature: 51
    Critical: 127
    It says neither of my thermal devices are active, so I don't know what to do about editing etc/powersave. Also, the outputs of
    Code:
    cat /proc/acpi/thermal_zone/TZ1/trip_points
    and
    Code:
    cat /proc/acpi/thermal_zone/TZ0/trip_points
    are that the respective files/directories could not be found.

    I am slightly worried, because some googling showed that the operating range for my processor (Intel T8300, 2.4ghz Core 2 Duo) is between 45 to 95F, and running just Firefox I'm getting temps of between 110-120F.

    I would greatly appreciate any help!
    Last edited by ahmedh; July 12th, 2008 at 08:22 AM.

  3. #3
    Join Date
    Sep 2006
    Location
    Bruxelles, Belgium
    Beans
    657

    Re: HOWTO Control Fan Speed

    What version of Ubuntu are you running ? The thing is the T8300 might just be a bit too new to work with powersave (actually the acpi version of the system). Before Hardy I had problems in 7.10 (the fans would stop but would not start). There is another ugly way of cooling your machine, by enabling the fans (still, if they are supported) manually. By the way, 120F is not at all much for a Core2 at that frequency. 120F would mean more or less 50C and that is also what I'm having on a T7250 at 2GHz (normal load).

  4. #4
    Join Date
    Mar 2008
    Beans
    50

    Re: HOWTO Control Fan Speed

    It's 8.04, the most recent release.

    Oh okay, that's good. My fan does turn on, but it seems to always be on. I installed acpitool to monitor the fan speed, and it ranges from about 2400-2800 RPM. I haven't performed any heavy-load operations yet, so at idle with the temp that high I got a bit worried, that the fan should be spinning faster (it also doesn't help that it's nearly silent--that's why installed acpitool, to make sure that it was actually on!). So do you think I should just let it be and not worry about it?
    Last edited by ahmedh; July 12th, 2008 at 10:49 PM.

  5. #5
    Join Date
    Sep 2006
    Location
    Bruxelles, Belgium
    Beans
    657

    Re: HOWTO Control Fan Speed

    At those temperatures, there absolutely no problems. Critical values for Core2 CPUs are over 80C (at about 90C-100C the CPU shuts down). If you want to see if you have support for multiple fan speeds in ACPI try
    Code:
    ls /proc/acpi/fan
    If more hex code like directories are present, means that each one is associated to a fan (actually not a physical fan but a fan speed) and I can help you from there. If nothing is listed, you have to rely on BIOS to regulate the fan speed.

  6. #6
    Join Date
    Mar 2008
    Beans
    50

    Re: HOWTO Control Fan Speed

    Okay, thank you!

  7. #7
    Join Date
    Jan 2009
    Beans
    6

    Re: HOWTO Control Fan Speed

    Quote Originally Posted by zgornel View Post
    What version of Ubuntu are you running ? The thing is the T8300 might just be a bit too new to work with powersave (actually the acpi version of the system). Before Hardy I had problems in 7.10 (the fans would stop but would not start). There is another ugly way of cooling your machine, by enabling the fans (still, if they are supported) manually. By the way, 120F is not at all much for a Core2 at that frequency. 120F would mean more or less 50C and that is also what I'm having on a T7250 at 2GHz (normal load).
    Hi,

    I've got a similar question to the above ...

    Thermal Device no. 0:
    Temperature: 29
    Critical: 100
    Passive: 90
    Active 0: 85


    Processors 2
    Model Intel(R) Pentium(R) 4 CPU 2.80GHz @ 35°C
    CPU Speed 2.81 GHz

    Kernel Version 2.6.24-22-server (SMP)
    Distro Name Ubuntu 8.04.1

    It's an old Shuttle computer and I'd really like the fans off whenever possible and appreciate any pointers

    Thanks

    edit :

    Further info :

    root@ubuntu:~# cat /proc/acpi/thermal_zone/THRM/trip_points
    critical (S5): 100 C
    passive: 90 C: tc1=4 tc2=3 tsp=60 devices=CPU0
    active[0]: 85 C: devices= FAN

    root@ubuntu:~# ls /proc/acpi/fan
    FAN
    Last edited by elyobelyob; January 8th, 2009 at 04:54 PM.

  8. #8
    Join Date
    Jan 2009
    Beans
    6

    Re: HOWTO Control Fan Speed

    Further info ...

    root@ubuntu:~# cat /proc/acpi/thermal_zone/THRM/trip_points
    critical (S5): 100 C
    passive: 90 C: tc1=4 tc2=3 tsp=60 devices=CPU0
    active[0]: 85 C: devices= FAN

    root@ubuntu:~# ls /proc/acpi/fan
    FAN

  9. #9
    Join Date
    Jan 2009
    Beans
    6

    Re: HOWTO Control Fan Speed

    Quote Originally Posted by elyobelyob View Post
    Hi,

    I've got a similar question to the above ...

    Thermal Device no. 0:
    Temperature: 29
    Critical: 100
    Passive: 90
    Active 0: 85


    Processors 2
    Model Intel(R) Pentium(R) 4 CPU 2.80GHz @ 35°C
    CPU Speed 2.81 GHz

    Kernel Version 2.6.24-22-server (SMP)
    Distro Name Ubuntu 8.04.1

    It's an old Shuttle computer and I'd really like the fans off whenever possible and appreciate any pointers

    Thanks
    Further info :

    root@ubuntu:~# cat /proc/acpi/thermal_zone/THRM/trip_points
    critical (S5): 100 C
    passive: 90 C: tc1=4 tc2=3 tsp=60 devices=CPU0
    active[0]: 85 C: devices= FAN

    root@ubuntu:~# ls /proc/acpi/fan
    FAN

  10. #10
    Join Date
    Oct 2008
    Beans
    49

    Re: HOWTO Control Fan Speed

    Thanks for this post-- it looks to be just what I'm looking for-- but I tried the steps you suggested and it did not work.

    I have a brand new system, running ubuntu 9.10: AMD Athlon dual core 5050e, I don't know how to tell what kind of motherboard it is but it definitely has ACPI support.

    I installed powersaved (along with all the acoutrements), rebooted, edited the config files and restarted powersaved, but the fan continues to run at blazing top speed. The CPU temperature is 40C. The trip points I set in /etc/powersaved/thermal are:

    THERMAL_HOT_0="65"
    THERMAL_CRITICAL_0="70"
    THERMAL_PASSIVE_0="35"
    THERMAL_ACTIVE_0_0="45"
    THERMAL_ACTIVE_0_1="55"

    but when I cat /proc/acpi/thermal_zone/THRM/trip_points I get:

    critical (S5): 60 C
    active[0]: 50 C: devices= FAN

    so they're not showing up at all. And, as I mentioned, the fan is still full blast.

    help?

    thanks in advance

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •