Howto get CPU frequency scaling to work in 2.xx
Posted: Sat 21 Oct 2006, 16:38
Here's how to get CPU frequency scaling to work in Puppy 2.xx:
(these examples are for a 'centrino' laptop with a Pentium-M, but modules are included for many types of CPU)
For 2.13 and 2.14, you don't need to download anything - the necessary modules are already included in zdrv_2.13/2.14. Just make sure that file is copied to the same location as your pup_213/214 file.
-----------------------------------------------------------------------
Only for 2.11/2.12:
Download http://www.puppyos.com/test/all-modules ... 202.tar.gz
From the file all-modules-k2.6.16.7-PUP202.tar.gz, extract the modules from
all-modules/kernel/arch/i386/kernel/cpu/cpufreq/
and
all-modules/kernel/drivers/cpufreq/
and copy them all into a new Puppy folder /lib/modules/2.6.16.7/cpufreq/
Run depmod so Puppy will find the new modules
# depmod
-----------------------------------------------------------------------
Also see HairyWill's post further down on this page
Load these modules:
# modprobe cpufreq_userspace
# modprobe speedstep_centrino
See what CPU frequency settings are avaiable:
# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
1600000 1600000 1600000 1400000 1200000 1000000 800000 600000
Check the current frequency setting:
# cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
1600000
I chose to lower the CPU freq to 1GHz (lower heat, quieter fan but still snappy response on my Dell Inspiron 510m with 1.6GHz Dothan Pentium-M)
# echo 1000000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
Check again the current frequency setting:
# cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
1000000
This is how you would set the CPU freq manually. There are other "governors" (ie, mechanisms to steer the CPU frequency) available:
# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
userspace performance
If you also load modules "cpufreq_powersave" and "cpufreq_conserative" you'll get even more governors to play with:
# modprobe cpufreq_powersave
# modprobe cpufreq_conservative
# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
conservative powersave userspace performance
I can't remember exactly how the governors work but info can be found on the net. "conservative" "powersave" "performance" all adjust the CPU freq automatically using different algorithms.
To use a different governor, e.g. "powersave":
# echo powersave > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
To have the settings I want at bootup, I put these lines in /etc/rc.d/rc.local:
modprobe cpufreq_userspace
modprobe speedstep_centrino
echo 1000000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
Paul
(these examples are for a 'centrino' laptop with a Pentium-M, but modules are included for many types of CPU)
For 2.13 and 2.14, you don't need to download anything - the necessary modules are already included in zdrv_2.13/2.14. Just make sure that file is copied to the same location as your pup_213/214 file.
-----------------------------------------------------------------------
Only for 2.11/2.12:
Download http://www.puppyos.com/test/all-modules ... 202.tar.gz
From the file all-modules-k2.6.16.7-PUP202.tar.gz, extract the modules from
all-modules/kernel/arch/i386/kernel/cpu/cpufreq/
and
all-modules/kernel/drivers/cpufreq/
and copy them all into a new Puppy folder /lib/modules/2.6.16.7/cpufreq/
Run depmod so Puppy will find the new modules
# depmod
-----------------------------------------------------------------------
Also see HairyWill's post further down on this page
Load these modules:
# modprobe cpufreq_userspace
# modprobe speedstep_centrino
See what CPU frequency settings are avaiable:
# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
1600000 1600000 1600000 1400000 1200000 1000000 800000 600000
Check the current frequency setting:
# cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
1600000
I chose to lower the CPU freq to 1GHz (lower heat, quieter fan but still snappy response on my Dell Inspiron 510m with 1.6GHz Dothan Pentium-M)
# echo 1000000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
Check again the current frequency setting:
# cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
1000000
This is how you would set the CPU freq manually. There are other "governors" (ie, mechanisms to steer the CPU frequency) available:
# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
userspace performance
If you also load modules "cpufreq_powersave" and "cpufreq_conserative" you'll get even more governors to play with:
# modprobe cpufreq_powersave
# modprobe cpufreq_conservative
# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
conservative powersave userspace performance
I can't remember exactly how the governors work but info can be found on the net. "conservative" "powersave" "performance" all adjust the CPU freq automatically using different algorithms.
To use a different governor, e.g. "powersave":
# echo powersave > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
To have the settings I want at bootup, I put these lines in /etc/rc.d/rc.local:
modprobe cpufreq_userspace
modprobe speedstep_centrino
echo 1000000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
Paul