View previous topic :: View next topic |
Author |
Message |
dbezona n00b
Joined: 06 Feb 2003 Posts: 68
|
Posted: Wed Feb 19, 2003 9:47 pm Post subject: System fan control |
|
|
So I am hoping someone can help me with this, as it seems to be a somewhat obscure problem (many searches have turned up little).
I have a Sony Vaio desktop (not laptop) system - P4 1.7GHz
The issue is that without manual intervention, the system fans run at full blast under Linux - apparently the BIOS in most systems control this, but apparently not mine. (This didn't happen under Windows)
My solution, up until now, is using lm_sensors and a shell script to turn the fans down at boot time, and then GKrellm to monitor the temps, and run a couple of other scripts to turn up the fans if the temperatures exceed a certain point.
It works fairly well, really, but I am just wondering if there is something missing here - I have been able to find so little reference to the issue in any of the searches I have done over the last few months, I just find it a bit odd.
Anyway, if anyone has any ideas on better ways to handle this, I would be grateful. |
|
Back to top |
|
|
AlterEgo Veteran
Joined: 25 Apr 2002 Posts: 1619
|
Posted: Wed Feb 19, 2003 10:25 pm Post subject: |
|
|
Your solution is quite nice: good thinking
but it is risky: what happens if gkrellm were to crash?
(be glad it's not an Atlon processor you've got: it would die very quickly).
I don't think there's something like speedfan for linux:
maybe you can talk the owner into giving access to the source code:
http://www.almico.com/speedfan.php |
|
Back to top |
|
|
dbezona n00b
Joined: 06 Feb 2003 Posts: 68
|
Posted: Wed Feb 19, 2003 10:39 pm Post subject: |
|
|
AlterEgo wrote: | Your solution is quite nice: good thinking |
Thanks
Quote: | but it is risky: what happens if gkrellm were to crash?
(be glad it's not an Atlon processor you've got: it would die very quickly). |
That's really the main reason I am pursuing the question. Not so much that I worry about the system frying (it rarely gets hot enough to trigger even the warn level script, and has never hit the "OHMYGODITSONFIRE!!!" script), but it does require having GKrellm (or some other sensor monotoring app) running all of the time.
Mostly I am curious as to why this isn't just handled either by the BIOS, or at the kernel level, since it seems like such a fundamental thing... |
|
Back to top |
|
|
Malakin Veteran
Joined: 14 Apr 2002 Posts: 1692 Location: Victoria BC Canada
|
|
Back to top |
|
|
EvilTwinSkippy n00b
Joined: 20 Feb 2003 Posts: 63 Location: Philadelphia, PA
|
Posted: Thu Feb 20, 2003 10:52 pm Post subject: Neat Solution |
|
|
I know it's been said before, but that's a damn cool solution to the problem. (Pardon the pun.)
I would like to point out that a lot of desktops these days are actually using laptop parts. (Hell some dell laptops are starting to use desktop parts, but I digress.)
About the only thing that I would suggest is dropping a watchdog script in your crontab. The watchdog script simply ps's to see if your monitor is working, and if it isn't rekick it. I use that for a tcl script that maintains my cluster of data center servers. The script syncronizes the passwords, downloads patches, and keeps the clocks in tune. Until I discovered ssh, I would have this script execute every hour.
Now, I was actually doing the opposite to what your script needs to do. Instead of restarting
a stopped program, my script was killing a stuck one. Later on I adapted it to restart dead services. _________________ I've found that people will take what you say more seriously if you tell them Ben Franklin said it first. |
|
Back to top |
|
|
hotcamus n00b
Joined: 07 Jan 2003 Posts: 12 Location: Canary Islands - Spain
|
Posted: Fri Feb 21, 2003 4:51 pm Post subject: |
|
|
In my case, a Compaq Presario laptop, the problem of having the fans running at full speed was an ACPI issue.
Now, with the 2.4.20 vanilla-kernel and its corresponding ACPI patch, the fans work well, as in windows. |
|
Back to top |
|
|
dbezona n00b
Joined: 06 Feb 2003 Posts: 68
|
Posted: Fri Feb 21, 2003 9:16 pm Post subject: |
|
|
hotcamus wrote: | In my case, a Compaq Presario laptop, the problem of having the fans running at full speed was an ACPI issue.
Now, with the 2.4.20 vanilla-kernel and its corresponding ACPI patch, the fans work well, as in windows. |
Thanks for the suggestion - I recompiled with all of the ACPI stuff enabled, and unfortunately, it didn't work for my system <*sigh*> |
|
Back to top |
|
|
AlterEgo Veteran
Joined: 25 Apr 2002 Posts: 1619
|
Posted: Fri Feb 21, 2003 9:24 pm Post subject: |
|
|
dbezona,
would you mind posting your fanspeed-control-script?
* curious * |
|
Back to top |
|
|
dbezona n00b
Joined: 06 Feb 2003 Posts: 68
|
Posted: Fri Feb 21, 2003 9:43 pm Post subject: |
|
|
Hehe - sure. Actually, calling it a "script" is generous.
Basically, lm_sensors provides an interface to the various sensors chips within /proc - some of them are manually configurable, two of them (at least for my chip set) provide a method to control the fan speed, simply by changing the value like you would any plain text file.
So, here is my boot-time "script", which turns the fans to a very low speed:
Code: |
echo 50 | cat > /proc/sys/dev/sensors/w83627hf-isa-0290/pwm1
echo 100 | cat > /proc/sys/dev/sensors/w83627hf-isa-0290/pwm2
|
The values can range from 0 to 255 - there really isn't that granular of control - I think most systems have 2 or 3 speeds, so just sort of generalize, and play with the values until the fans respond as you want them.
In my setup, GKrellm simply executes one of two other files that simply write different (higher) values to the pwmx interfaces based on the warning level for the temperature sensors (which is a function of the GKrellm sensors module).
On my system, it idles around 38-40 degrees (C), and the comfortable maximum temp is around 60 degrees (although supposedly, it can go higher, but why push it?), So, I set my "warn" level to bump the fans up to about 50%, and if it gets over 60, I bump the fans up full (hasn't happened yet).
Unfortunately, GKrellm doesn't allow for running a script when the warning recovers, so I have to manually run a lower-speed script once the system cools down, but it's a minor inconvenience. |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Fri Feb 21, 2003 9:58 pm Post subject: |
|
|
You could have the script run a job after 5 minutes (or something) that turns them down. If the warning comes again, they'd turn up again. Something like that anyway. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
dbezona n00b
Joined: 06 Feb 2003 Posts: 68
|
Posted: Sat Feb 22, 2003 8:27 pm Post subject: |
|
|
kanuslupus wrote: | You could have the script run a job after 5 minutes (or something) that turns them down. If the warning comes again, they'd turn up again. Something like that anyway. |
That's a very good idea indeed. Thanks! |
|
Back to top |
|
|
|