Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
System fan control
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
dbezona
n00b
n00b


Joined: 06 Feb 2003
Posts: 68

PostPosted: Wed Feb 19, 2003 9:47 pm    Post subject: System fan control Reply with quote

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
View user's profile Send private message
AlterEgo
Veteran
Veteran


Joined: 25 Apr 2002
Posts: 1619

PostPosted: Wed Feb 19, 2003 10:25 pm    Post subject: Reply with quote

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
View user's profile Send private message
dbezona
n00b
n00b


Joined: 06 Feb 2003
Posts: 68

PostPosted: Wed Feb 19, 2003 10:39 pm    Post subject: Reply with quote

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
View user's profile Send private message
Malakin
Veteran
Veteran


Joined: 14 Apr 2002
Posts: 1692
Location: Victoria BC Canada

PostPosted: Thu Feb 20, 2003 4:17 am    Post subject: Reply with quote

Quote:
(be glad it's not an Atlon processor you've got: it would die very quickly).

Most motherboards have thermal protection and P4's are putting out more heat then Athlons these days.

CPU thermal comparison:
http://www.anandtech.com/cpu/showdoc.html?i=1718&p=4

P4 3.06Ghz is 82 watts:
http://www17.tomshardware.com/cpu/20021114/p4_306ht-04.html

AMD XP3000+ is 74.3 watts
http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/26237.pdf
Back to top
View user's profile Send private message
EvilTwinSkippy
n00b
n00b


Joined: 20 Feb 2003
Posts: 63
Location: Philadelphia, PA

PostPosted: Thu Feb 20, 2003 10:52 pm    Post subject: Neat Solution Reply with quote

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
View user's profile Send private message
hotcamus
n00b
n00b


Joined: 07 Jan 2003
Posts: 12
Location: Canary Islands - Spain

PostPosted: Fri Feb 21, 2003 4:51 pm    Post subject: Reply with quote

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
View user's profile Send private message
dbezona
n00b
n00b


Joined: 06 Feb 2003
Posts: 68

PostPosted: Fri Feb 21, 2003 9:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
AlterEgo
Veteran
Veteran


Joined: 25 Apr 2002
Posts: 1619

PostPosted: Fri Feb 21, 2003 9:24 pm    Post subject: Reply with quote

dbezona,
would you mind posting your fanspeed-control-script?
* curious *
Back to top
View user's profile Send private message
dbezona
n00b
n00b


Joined: 06 Feb 2003
Posts: 68

PostPosted: Fri Feb 21, 2003 9:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 16144
Location: Colorado

PostPosted: Fri Feb 21, 2003 9:58 pm    Post subject: Reply with quote

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.
_________________
lolgov. 'cause where we're going, you don't have civil liberties.

In Loving Memory
1787 - 2008
Back to top
View user's profile Send private message
dbezona
n00b
n00b


Joined: 06 Feb 2003
Posts: 68

PostPosted: Sat Feb 22, 2003 8:27 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum