cpufrequtils for x86_64

If there's software you need and you can't find, make a request for it.
User avatar
Duncan_Idaho
Posts: 216
Joined: 19. Sep 2009, 01:43
Location: Sietch Tabr, Planet Arrakis

cpufrequtils for x86_64

Post by Duncan_Idaho »

hi salix team :mrgreen:
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 :geek:
thanks in advance
User avatar
thenktor
Salix Wizard
Posts: 2426
Joined: 6. Jun 2009, 14:47
Location: Franconia
Contact:

Re: cpufrequtils for x86_64

Post 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
Image
burnCDDA (burns audio CDs)
geBIERt (German beer blog)
User avatar
Duncan_Idaho
Posts: 216
Joined: 19. Sep 2009, 01:43
Location: Sietch Tabr, Planet Arrakis

Re: cpufrequtils for x86_64

Post 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?
:?:
User avatar
thenktor
Salix Wizard
Posts: 2426
Joined: 6. Jun 2009, 14:47
Location: Franconia
Contact:

Re: cpufrequtils for x86_64

Post by thenktor »

Yes add it to rc.local ;)
Image
burnCDDA (burns audio CDs)
geBIERt (German beer blog)
User avatar
Duncan_Idaho
Posts: 216
Joined: 19. Sep 2009, 01:43
Location: Sietch Tabr, Planet Arrakis

Re: cpufrequtils for x86_64

Post by Duncan_Idaho »

done, thank you :)
User avatar
gapan
Salix Wizard
Posts: 6241
Joined: 6. Jun 2009, 17:40

Re: cpufrequtils for x86_64

Post 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. :D
It didn't use to.
Image
Image
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: cpufrequtils for x86_64

Post 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. :D
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.
Image
User avatar
thenktor
Salix Wizard
Posts: 2426
Joined: 6. Jun 2009, 14:47
Location: Franconia
Contact:

Re: cpufrequtils for x86_64

Post 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. :D
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?
Image
burnCDDA (burns audio CDs)
geBIERt (German beer blog)
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: cpufrequtils for x86_64

Post 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. :D
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:

Code: Select all

grep -i default_gov /boot/config
Image
User avatar
gapan
Salix Wizard
Posts: 6241
Joined: 6. Jun 2009, 17:40

Re: cpufrequtils for x86_64

Post 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.
Image
Image
Post Reply