[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How does one control fans?

> > and tell the kernel to use the ondemand governor for frequency scaling:
> > # echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
> My problem is that /cpufreq/scaling_governor doesn't appear until after
> I do:
> # modprobe acpi_cpufreq
> Is that correct?

I am not sure about that one. I don't have this module loaded (even gives a
"busy" error when modprobing it) and still have the /cpufreq/scaling_governor
available. But I am on the AMD64 kernel, which might be different from x86.

> > (you will have to do that every time you boot, so add a script to your
> > runlevel)
> What? And miss out on all that typing?

If you don't compile your own kernel, you are stuck with the options the 
Debian default kernel uses. This means, it will use the "performance" governor
as default governor. So I wrote a small script, which I put into /etc/init.d
and link into runlevel 2, to select the "ondemand" governor, e.g.:
#! /bin/sh


case "$1" in
        echo -n "Starting $DESC: "
        echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
        echo "$NAME started."
        echo -n "Stopping $DESC: "
        echo "performance" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
        echo "$NAME stopped."
        echo "Usage: $N {start|stop}" >&2
        exit 1

exit 0

Reply to: