Thursday, June 02, 2005

PWM fan control and power management on the st62k

I was about to order a replacement fan for my Shuttle when I stumbled upon pwmconfig. It's part of the lm_sensors pack and is used to discover PWM (pulse-width-modulation I guess) controllable fans on your system.

It found that fan1 (the only connected fan) was controlled by PWM and manageable via the lm_sensors /sys interface.

It writes a config for fancontrol which can be used to manage the fan with greater flexibility than the BIOS. It can switch the fan off completely and/or run it as low as 1000RPM by monitoring one of the 3 onboard temp sensors (RS300, CPU, system). It's a shell script and could be easily changed to support the ACPI thermal zone (/proc/acpi/thermal_zone/THRM/temperature) or perhaps even the smartd temp reading from your disk...

Here's what I have in /etc/fancontrol:
NB. This is for information only. Do not use this unless you know exactly what you're doing and don't hold me responsible for melting your shuttle or burning your house down!
INTERVAL=10
FCFANS= 1-0228/pwm1=1-0228/fan1_input
MINSTART= 1-0228/pwm1=10
MINSTOP= 1-0228/pwm1=2
# system temp control
FCTEMPS= 1-0228/pwm1=1-0228/temp3_input
MINTEMP= 1-0228/pwm1=42
MAXTEMP= 1-0228/pwm1=60
My fan is now spinning at 1360RPM most of the time and down to 1040RPM on occasions. These speeds are much quieter than the 1900RPM ultra-low setting used by the smart setting in the BIOS.

I combined this with p4-clockmod cpufreq management using cpudynd and my box now runs at 1.26GHz most of the time, only ramping up to 2.53GHz when there's something to do...

Finally, I tried undervolting the CPU in the BIOS. This worked great for a few days but then I suddenly (and alarmingly) found that my shuttle wouldn't boot. The fan would come on but there was no display and I couldn't even power it off without killing the power at the wall-socket! I don't know if this had anything to do with the undervolting but the only way I could get any life from my box was to clear the CMOS and reset the BIOS. I've left the CPU voltage at default for now...

1 Comments:

Anonymous Anonymous said...

I've tried pwmconfig on my st62k, and it claims "/usr/sbin/pwmconfig: There are no pwm-capable sensor modules installed"

Any clues?

6:44 am  

Post a Comment

<< Home