[Follow-up to #152057] Please introduce /etc/conf.d/cpufreqd where the user can list necessary modules, e.g. $> cat /etc/conf.d/cpufreqd MODULES="p4-clockmod cpufreq_ondemand" (This would be somewhat similar to the module handling of lm_sensors. Btw, sorry for the confusion I introduced in #152096.) In addition, load the modules configured in /etc/conf.d/cpufreqd when starting /etc/init.d/cpufreqd, e.g. $> diff -u cpufreqd.orig cpufreqd --- cpufreqd.orig 2006-10-25 21:48:33.000000000 +0200 +++ cpufreqd 2006-10-25 21:31:48.000000000 +0200 @@ -31,6 +31,15 @@ } start() { + if [ -f /proc/modules ] ; then + einfo "Loading cpufreqd modules..." + for module in ${MODULES} ; do + ebegin " Loading ${module}" + modprobe ${module} 2> /dev/null + eend ${?} + done + fi + checkconfig || return 1 ebegin "Starting CPU Frequency Daemon" (diff against cpufreqd-2.2.0-r2) At last, please find a way to properly unload any cpufreqd-related modules and stop frequency scaling alltogether. Currently, if cpufreqd is stopped, the corresponding modules are still in use and the currently active governor will continue to handle the scaling of frequencies. Since `cpufreqd start` gets frequency scaling going, I expect `cpufreqd stop` to undo everything.
Created attachment 119502 [details] cpufreqd-conf.d (In reply to comment #0) > [Follow-up to #152057] > > Please introduce /etc/conf.d/cpufreqd where the user can list necessary > modules, e.g. > $> cat /etc/conf.d/cpufreqd > MODULES="p4-clockmod cpufreq_ondemand" > (This would be somewhat similar to the module handling of lm_sensors. > Btw, sorry for the confusion I introduced in #152096.) > > In addition, load the modules configured in /etc/conf.d/cpufreqd when starting > /etc/init.d/cpufreqd, e.g. > $> diff -u cpufreqd.orig cpufreqd Daniel could you please try the attached file, and see if they work ?
Created attachment 119503 [details] cpufreqd-init.d.patch
I tried and it's not that simple. MODULES="p4_clockmod cpufreq_ondemand cpufreq_performance" Shutting down: * Stopping CPU Frequency Daemon ... [ ok ] * Unloading CPU Frequency scaling modules * Unloading p4_clockmod ... [ !! ] * Unloading cpufreq_ondemand ... [ !! ] * Unloading cpufreq_performance ... [ ok ] The modules p4_clockmod and cpufreq_ondemand are in use when attempting to unload them. As there is only one active governor at a time, unloading of cpufreq_performance succeeds: Module Size Used by cpufreq_ondemand 6164 1 p4_clockmod 4756 1 speedstep_lib 3584 1 p4_clockmod freq_table 3848 1 p4_clockmod While there are tons of docs in the net how to enable frequence scaling, there seems to be not a single article that describes how to get rid of it ... (besides removing cpufreqd from the init scripts and rebooting).
(In reply to comment #3) > I tried and it's not that simple. > > MODULES="p4_clockmod cpufreq_ondemand cpufreq_performance" > > Shutting down: > * Stopping CPU Frequency Daemon ... [ ok ] > * Unloading CPU Frequency scaling modules > * Unloading p4_clockmod ... [ !! ] > * Unloading cpufreq_ondemand ... [ !! ] > * Unloading cpufreq_performance ... [ ok ] > > The modules p4_clockmod and cpufreq_ondemand are in use when attempting to > unload them. As there is only one active governor at a time, unloading of > cpufreq_performance succeeds: > Module Size Used by > cpufreq_ondemand 6164 1 > p4_clockmod 4756 1 > speedstep_lib 3584 1 p4_clockmod > freq_table 3848 1 p4_clockmod > > While there are tons of docs in the net how to enable frequence scaling, there > seems to be not a single article that describes how to get rid of it ... > (besides removing cpufreqd from the init scripts and rebooting). Well, simply just put in the governor into MODULES, modprobe will take care of the dependency while loading and unloading.
That's why I quoted the contents of the MODULES variable from /etc/conf.d/cpufreqd in comment #3: MODULES="p4_clockmod cpufreq_ondemand cpufreq_performance" Module Size Used by cpufreq_ondemand 6164 1 p4_clockmod 4756 1 speedstep_lib 3584 1 p4_clockmod freq_table 3848 1 p4_clockmod If you double check my last comment, you will see that unloading of p4_clockmod fails to begin with (cpufreqd is not running when issuing the comand below): $> modprobe -r p4_clockmod FATAL: Module p4_clockmod is in use.
An updated patch would be needed
dropped