Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#6440 - cpufreq : doesn't load values for other processors
Attached to Project:
Arch Linux
Opened by alexandre (_alexmyself) - Saturday, 17 February 2007, 13:33 GMT
Last edited by Aaron Griffin (phrakture) - Sunday, 02 December 2007, 21:45 GMT
Opened by alexandre (_alexmyself) - Saturday, 17 February 2007, 13:33 GMT
Last edited by Aaron Griffin (phrakture) - Sunday, 02 December 2007, 21:45 GMT
|
Detailshello,
i have cpufreq in rc.conf,daemon i have P4 m which is hypertreading and so appears as two processors when i boot cpufreq doesn't set the second processor, i have to do: cpufreq-set --cpu 1 --governor powersave, for the second to be set like in my /etc/conf.d/cpufreq i'll try modify cpufreq script but this will be my first step in bash so....so i'm afraid :) |
This task depends upon
###############################################################################################
###############################################################################################
#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
# source application-specific settings
[ -f /etc/conf.d/cpufreq ] && . /etc/conf.d/cpufreq
case "$1" in
start)
stat_busy "Setting cpufreq governing rules"
params=""
if [ -n $governor ]; then
mod="cpufreq_$governor"
modprobe $mod > /dev/null 2>&1
params="-g $governor"
if [ $? -eq 0 ]; then
#################################################
#find how many processors have to be set
#where
cpu_location='/sys/devices/system/cpu/'
#count in a temp file (this help me to correctly handle `ls` output)
`touch temp_cpu_$$`
`ls $cpu_location > temp_cpu_$$`
#list just the directories in $cpu_tab[]
declare -i cpu_index
cpu_index=0
while read temp_cpu_line;
do
[ -d "$cpu_location$temp_cpu_line" ] && cpu_tab[$cpu_index]=$temp_cpu_line && cpu_index+=1
done < temp_cpu_$$
#kill the temp file
rm temp_cpu_$$
#################################################
if [ "$min_freq" != "" ]; then
params="$params -d $min_freq"
fi
if [ "$max_freq" != "" ]; then
params="$params -u $max_freq"
fi
else
stat_busy " Cannot load governor module '$governor'"
stat_fail
exit
fi
fi
if [ "$params" != "" ]; then
#################################################
#set for each cpu in $cpu_tab[]
cpu_index=0
for a_cpu in "${cpu_tab[@]}"
do
`cpufreq-set --cpu $cpu_index $params`
cpu_index+=1
done
#################################################
#cpufreq-set $params
stat_done
else
stat_busy " Invalid configuration in /etc/conf.d/cpufreq"
stat_fail
fi
;;
stop)
# nothing to do
;;
restart)
$0 start
;;
set)
# TODO: make callable... "cpufreq set 800MHz"
;;
*)
echo "usage: $0 {start|stop|restart}"
esac
exit 0
###############################################################################################
###############################################################################################
better here:
http://forums.archlinux.fr/post3705.html#3705
i've another (simple) version for the cpufreq rc script: http://dump.mookooh.org/cpufreq.diff