Page 1 of 2
cpufrequtils for x86_64
Posted: 15. Jan 2010, 19:31
by Duncan_Idaho
hi salix team
I'd like to have cpufrequtils available in the x86_64 repo because my desktop's processor is running at full throttle all the time and it's kinda noisy
thanks in advance
Re: cpufrequtils for x86_64
Posted: 16. Jan 2010, 12:46
by thenktor
Just use something like this:
Code: Select all
# powernow
/sbin/modprobe cpufreq_ondemand
/sbin/modprobe powernow-k8
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 40 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold
Re: cpufrequtils for x86_64
Posted: 16. Jan 2010, 17:42
by Duncan_Idaho
thanks thenkor
but I have a doubt, do I have to do that every time the machine boot?
in that case, adding them to /etc/rc.d/rc.local is ok?

Re: cpufrequtils for x86_64
Posted: 16. Jan 2010, 17:53
by thenktor
Yes add it to rc.local

Re: cpufrequtils for x86_64
Posted: 16. Jan 2010, 19:02
by Duncan_Idaho
done, thank you

Re: cpufrequtils for x86_64
Posted: 16. Jan 2010, 22:15
by gapan
Hmm... strange. Scaling works fine for me out of the box, no tweaking at all required. I'm not saying it's strange that it doesn't work for you, I'm saying it's strange that it works for me.

It didn't use to.
Re: cpufrequtils for x86_64
Posted: 16. Jan 2010, 23:44
by Shador
Default governor is afaik:
Code: Select all
CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
So it's indeed weird that it works for you out of the box.

Maybe it's the xfce-power-manager? (BTW did you find any lightweight alternative for it?)
I recently read that the conservative governor was better suited for energy-critical applications like laptops, because it slowly rises clock, whereas ondemand jumps to the highest possible immediatly, which makes it more suited for desktops.
Re: cpufrequtils for x86_64
Posted: 17. Jan 2010, 02:24
by thenktor
gapan wrote:Hmm... strange. Scaling works fine for me out of the box, no tweaking at all required. I'm not saying it's strange that it doesn't work for you, I'm saying it's strange that it works for me.

It didn't use to.
For sure it works without any tweaking on my notebook, but I've never really tested on my desktop PC. Perhaps the kernel makes some difference between CPUs?
Re: cpufrequtils for x86_64
Posted: 17. Jan 2010, 13:49
by Shador
thenktor wrote:gapan wrote:Hmm... strange. Scaling works fine for me out of the box, no tweaking at all required. I'm not saying it's strange that it doesn't work for you, I'm saying it's strange that it works for me.

It didn't use to.
For sure it works without any tweaking on my notebook, but I've never really tested on my desktop PC. Perhaps the kernel makes some difference between CPUs?
It didn't on my laptop, I still assume you're running some program like xfce-power-manager, which changes the governor.
I don't think the kernel devs would want to make any such assumptions, especially as there's the default governor config options, which is set to userspace on salix/slackware:
Shador wrote:Code:
CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
Try yourself:
Re: cpufrequtils for x86_64
Posted: 17. Jan 2010, 13:56
by gapan
No, I'm not running xfce-power-manager or anything like it (I haven't found anything like it anyway). I'm usually running e16 and the governor that is used by default here is the ondemand one.
Code: Select all
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
ondemand
and I can also see it's the one loaded by default in /etc/rc.d/rc.modules:
Code: Select all
### CPU frequency scaling policies:
#
# Use the CPUFreq governor 'powersave' as default. This sets the
# frequency statically to the lowest frequency supported by the CPU.
#/sbin/modprobe cpufreq_powersave
#
# Use the CPUFreq governor 'performance' as default. This sets the
# frequency statically to the highest frequency supported by the CPU.
#/sbin/modprobe cpufreq_performance
#
# Use the CPUFreq governor 'conservative' as default. This allows you
# to get a full dynamic frequency capable system by simply loading your
# cpufreq low-level hardware driver. Be aware that not all cpufreq
# drivers support the 'conservative' governor -- the fallback governor
# will be the 'performance' governor.
#/sbin/modprobe cpufreq_conservative
#
# Use the CPUFreq governor 'ondemand' as default. This allows you to
# get a full dynamic frequency capable system by simply loading your
# cpufreq low-level hardware driver. Be aware that not all cpufreq
# drivers support the 'ondemand' governor -- the fallback governor will
# be the performance governor. This seems to be the most-recommended
# scaling policy, so rc.modules will try to load this by default.
/sbin/modprobe cpufreq_ondemand 2>/dev/null
### CPU scaling governor:
#
# Set the default scaling_governor to be used (such as userspace or ondemand)
# if there is a CPUFreq scaling policy module loaded that supports it:
SCALING_GOVERNOR=ondemand
#
# Try to enable the scaling_governor selected above:
if [ -r /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors ]; then
if grep -wq "$SCALING_GOVERNOR" /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors ; then
if [ -r /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ]; then
for SYSCPUFILE in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor ; do
echo "$SCALING_GOVERNOR" > $SYSCPUFILE
done
fi
fi
fi
fi # End enabling CPU scaling support
Maybe it has to do with the cpu.