About MeCurriculumLicensePortfolioProjectsPublicationsBD-blog

Categories: Activism?

Update 06-03-2007: You won't need this script with a kernel >= 2.6.21.

Update 04-21-2007: I heard that you won't need this script with a 2.6.21 kernel, I´m using a 2.6.20 kernel and the problem still exists.

Update 12-25-2006: Renamed the script as fancontrol-bd, because there already exists a program called fancontrol, written in perl

Update 12-14-2006: this method has been tested under various distros (Archlinux, Sabayonlinux, Fedora, Mandriva, Ubuntu) and it really works!

First of all, sorry for my bad English, I didn't write this article in Italian just because a lot of people could benefit from it (lol).

Unfortunately it has been known that some Hp notebooks powered by AMD Turion 64 X2 / Sempron CPUs have got thermal problems. There are a lot of very good tutorials on how to install Linux on the Hp Nx6325 notebook (see Tuxmobil for details), and everybody has his own "solution" to the problem. What I found, following all the tutorials and applying all possible kernels and patches, is that the problem still persists, or is just reduced. My personal solution works and is tested with kernels >= 2.6.17 (I tried 2.6.17, 2.6.18.3, 2.6.19 with all possible patchsets [mm, ck, beyond, ..]).
I noticed that, with every proposed solution, even with a correct DSDT, there was still a big problem: sometimes the fans "forget" to start or to increase their speed. While I was trying several kernels and patchsets, I read this tutorial on tuxmobil, that suggests to add the following lines to /etc/rc.local:

--- snip ---
echo 1 > /proc/acpi/thermal_zone/TZ1/polling_frequency
echo 1 > /proc/acpi/thermal_zone/TZ2/polling_frequency
echo 1 > /proc/acpi/thermal_zone/TZ3/polling_frequency
--- snip ---

With this lines you force your system at boot to set the polling frequency of the fans every 1 second. On my notebook that didn't work.
Well, I was playing with echo and the polling frequency, and I noticed that a

echo 0 > /proc/acpi/thermal_zone/TZ1/polling_frequency

Does refresh the state of the fans. Everytime. No matter if the temp is either rising or diminishing. No matter which value you set to the polling frequency.
The solution I propose is the following (I didn't try it with the broken original DSDT, but I know a friend with my same notebook and the original DSDT, I'll let you know ;-)) yes it works even with a broken original DSDT!:

Create this bash script, as root, called fancontrol-bd, in /usr/bin

#!/bin/sh
#/usr/bin/fancontrol-bd
# bodom_lx <bodom_lx ||AT|| fsfe ||DOT|| org> fan control script
while true;do
echo "0" > /proc/acpi/thermal_zone/TZ1/polling_frequency
# refresh time, in seconds
sleep 20
done

Make it executable:

# chmod 755 /usr/bin/fancontrol-bd

Then add it to the startup of your system, for example in /etc/rc.local

echo "/usr/bin/fancontrol-bd &" >> /etc/rc.local

Up from the next system start, your fan state will be updated every 20 seconds (you can play with this number, but I suggest to set it above 15 seconds because of the infinite loop). Maybe it won't be perfectly synchronized with the temp state (i.e., it could rise the fan speed at 62 degrees instead of 60 degrees, or it could work at 60 degrees precise), but it works. Really. A smaller refresh-number will rise the precision, but I believe that you will be happy anyway ;-)
This method works even with a broken dsdt, but I remember you that a broken dsdt will keep your CPU temp very high anyway.
Please mail me if you find some problems with this method.

 
 

24 Responses to “Hp nx6325 (and friends) thermal problems solved”

  1. manishk Says:

    Interesting stuff.

    I use a HPnx6325 and I'm new to Linux. I never even bothered about the temperature, just because I didnot know how to tweak it.

    Thanks a lot.

    As for the decision in English - its a great decision!! Becuase atleast I benefited from it!! THANK YOU :-)

  2. bodom_lx Says:

    Thanks to you, dude, you're welcome.
    I'm very happy if I'm able to help somebody, even in a foreign language.
    Enjoy our fantastic notebook with the best OS in the world ;-)

  3. Toks Says:

    You are a genius!

    Thanks for ur script works fine with my nx6325 turionx2!!!

    greets from germany

  4. bodom_lx Says:

    Bitteschön Toks, es ist immer eine Freude für mich, eine Bedankung zu empfangen!

    Better if I continue in English, my German "ist ein totaler Mist"..

    Well, a positive feedback and a "thank you" are always the best way to make me feel happy to help somebody.. I discovered this method just for fun, and I'll surely continue to help people, when I'll be able :-P

  5. Enzo Says:

    Thanks!!

    I'm from Argentina, and your script is wanderfull!!!!
    My notebook HP nx6325 semprom is fresh with linux now!

    I'm test this metod in Debian Etch.
    Bye!
    Sorry for my bad English, i speak spanish!

  6. Florian Says:

    thanks man!

    i tried a lot of things, but nothing worked...

    your script is amazing!

    great job !

    thanks
    greetings flo

  7. bodom_lx Says:

    Thanks to all of you :-D

  8. Rhys Says:

    Excellent! This works great on my nx6325 under Fedora 6.
    Thanks so much for sharing your findings!

    Rhys

  9. Ronny Says:

    Great script! I've implemented it and it seemed to work, but sometimes the laptop still overheats without the fan even starting.
    I have an idea that this may have something to do with hibernate, but I'm not sure. Basically, I used to hibernate the computer instead of shutting it down, but then, on occasions, it became very hot, and the fan was not working.
    When I shut it down properly, and restarted it, the fan went on, probably on max, until the temperature was down to normal.
    Does anyone have any idea on how to fix this?

  10. Ronny Says:

    it also seems that the reason behind the pro.blem described above is that the information given in /proc/acpi/thermal_zone/TZ1/temperature is incorrect, as is said 44C even when it was so hot I was afraid to touch the left side of the keyboard...

  11. bodom_lx Says:

    Hhhmmm..never tried kernels with hibernate support..
    I'd be happy to add extra fixes to the script, if somebody reported them in this page..

  12. ronny Says:

    actually, I'm not sure anymore if hibernate is the cause of the problem, because I tried hibernating and then starting up again (from hibernation) and it seemed to work fine this time. Even tried running "openssl speed" to make the processor work hard, and /proc/acpi/thermal_zone/tz1/temperature correctly showed increasing temperature and the fans correctly started at the intervals specified in /proc/acpi/thermal_zone/TZ1/trip_points. I will let you know if I figure out the real cause of the problem.

  13. bodom_lx Says:

    Well, this is just a bash script, it won't fix all acpi kernel problems :D It just helps
    But I would be really glad if you found something interesting to improve it!

  14. jems Says:

    question on hibernate in stock fc6 smp kernel.

    the script attemts to remove button.ko and modprobe -r button goes into 'D' wait state and never finishes.

    an lsmod | grep button doesn't show any module depenances or any users

    lsmod | grep -i button
    button 17249 0

    any ideas?

    Linux localhost.localdomain 2.6.20-1.2933.fc6 #1 SMP Mon Mar 19 11:00:19 EDT 2007 x86_64 x86_64 x86_64 GNU/Linuxc

  15. bodom_lx Says:

    No idea about hibernation, I never tried it..
    But believe me, my script won't remove a kernel module, just see its source code, it just put a "0" inside a file every n seconds..

  16. MAN Says:

    your script, bodom_lx, pretty much saved my sempron's life XD. not only was my fan working faultily... I never really thought it could be a problem as it worked like that right out of the box. That was one hot sempron! my bad :P

    It's now working perfectly, after I followed your instructions. Thanks man!

  17. bodom_lx Says:

    ^_^

  18. michal Says:

    Hi, your script is very interesting. Thanks. I quite new to linux and need it for heavy computations and I do not want to fry my laptop.

    I have a paranoid question. If I change the setup in linux, e.g. pollig freq, trip points, etc. could I messup the machine also when it reboots to win xp? Does it affect BIOS or is it just Linux setting?

    Where can I get more information about which Termal Zone is what, to better understand 'acpi -V' etc.

    Thanks!

  19. bodom_lx Says:

    I believe that if you change the setup in linux, it won´t affect your bios settings / your Xp settings
    You should get some information here:
    http://acpi.sourceforge.net/documentation/index.html ( http://acpi.sourceforge.net/documentation/thermal.html about the thermal zone)
    http://acpi.sourceforge.net/wiki/index.php

  20. michal Says:

    thanks alot

  21. jason Says:

    Any followups on the hibernate problem. I have the modprobe -r button in the D state problem also.

  22. jason Says:

    I have the bios07 and notice that there is often a large spread between the sensor's cpu tempurature setting and the acpi temperature reading.
    the fancontrol-bd doesn't appear to make a difference.

    Adapter: PCI adapter
    Core0 Temp:
    +41°C
    Core1 Temp:
    +47°C

    /proc/acpi/thermal_zone/TZ1/temperature
    temperature: 53 C
    /proc/acpi/thermal_zone/TZ2/temperature
    temperature: 50 C
    /proc/acpi/thermal_zone/TZ3/temperature
    temperature: 31 C
    /proc/acpi/thermal_zone/TZ1/state
    state: active[2]
    /proc/acpi/thermal_zone/TZ2/state
    state: ok
    /proc/acpi/thermal_zone/TZ3/state
    state: ok

  23. jason Says:

    THe machine in question is running 2.6.22.5-49.fc6

  24. bodom_lx Says:

    you should not need my script with a kernel > 2.6.21, it seems that they have fixed the problem. I've got the F.02 bios and it works

Leave a Reply