This is the old SliTaz forum - Please use the main forum.slitaz.org

powerbox / cpufreq_ondemand
  • Hi , i want to scale my Atom Cpu from my eee . So I did this

    # tazpkg get-install linux-acpi
    # tazpkg get-install linux-cpufreq

    # modprobe p4_clockmod
    # modprobe cpufreq_ondemand

    but ...

    modprobe: module cpufreq_ondemand not found
    modprobe: failed to load module cpufreq_ondemand: No such file or directory

    :( ---------------
    then i check

    # cd /sys/devices/system/cpu/cpu0/cpufreq
    # echo ondemand > scaling_governor
    # more cpuinfo_cur_freq

    gives me

    1599996
    -----------------------------------

    What can i do ? Where's the Powerbox project ?? Can we have a kind of lauchbar applet for autoCPU scale like in Ubuntu ?


    thx
  • jozeejozee May 2010
    Earlier, the project went into hibernation as I had been busy with other things and we had also frozen changes to linux kernel. Now, with 3.0 released and things getting better and I have some freetime these days, I am hoping to finish powerbox soon (among many other things on my todo list).

    Edit : Oh, I forgot to ask you what are your min/max scaling freq? BTW, ondemand is already compiled in linux kernel. So, 3.0 can do power management.
  • slicelslicel May 2010
    This issue is another topic that after much asking and researching I had documented in detail on the old forum.

    Slitaz 3 might be a little different but I think I added these to the /etc/rcS.conf LOAD_MODULES line inside the quotes-
    ac battery acpi-cpufreq cpufreq_ondemand


    I think scaling only worked when unplugged (on battery).

    I changed /etc/init.d/local.sh to scale on ac and add lesswatts.org scripts but I might comment out at least one of these scripts because sometimes something causes my hard drive to make frequent whirring sounds and I do not know if that is excessive startups-

    #!/bin/sh
    # /etc/init.d/local.sh - Local startup commands.
    # All commands here will be executed at boot time.
    #
    . /etc/init.d/rc.functions

    echo "Starting local startup commands... "

    # Enable mobile CPU dynamic frequency scaling
    modprobe acpi-cpufreq
    modprobe cpufreq_ondemand
    cd /sys/devices/system/cpu/cpu0/cpufreq
    echo ondemand > scaling_governor
    # if you have a dual core
    cd /sys/devices/system/cpu/cpu1/cpufreq
    echo ondemand > scaling_governor

    # Enable laptop mode
    # When laptop mode is enabled, the kernel will try to be smart
    # about when to do IO, to give the disk and the SATA links as
    # much time as possible in a low power state.

    if [ ! -e /proc/sys/vm/laptop_mode ] ; then
    echo "Kernel does not have support for laptop mode."
    else
    echo "Enabling laptop mode"
    echo 5 > /proc/sys/vm/laptop_mode
    fi

    # AC97 audio power saving mode
    # The AC97 onboard audio chips support power saving, where the
    # analog parts (codec) are powered down when no program is using
    # the audio device.

    if [ -e /sys/module/snd_ac97_codec/parameters/power_save ] ; then
    echo "Enabling AC97 audio power saving mode"
    echo 1 > /sys/module/snd_ac97_codec/parameters/power_save
    echo 1 > /dev/dsp
    fi

    # The VM writeback time
    # The VM subsystem caching allows the kernel to group consecutive
    # writes into one big write, and to generally optimize the disk IO
    # to be the most efficient.

    if [ -e /proc/sys/vm/dirty_writeback_centisecs ] ; then
    echo "Writeback time set to 1500ms"
    echo 6000 > /proc/sys/vm/dirty_writeback_centisecs
    fi

    # Lesswatts.org tricks
    # Multicore scheduler http://www.lesswatts.org/tips/cpu.php
    echo 1 > /sys/devices/system/cpu/sched_mc_power_savings
    # Filesystem relatime http://www.lesswatts.org/tips/disks.php
    mount -o remount,relatime /
    # Hard disk power management http://www.lesswatts.org/tips/disks.php
    hdparm -B 1 -S 12 /dev/sda
    # Disable hal polling http://www.lesswatts.org/tips/disks.php
    hal-disable-polling --device /dev/scd0
    # Restart hal polling by commenting previous line and uncommenting next line http://www.lesswatts.org/tips/disks.php
    # hal-disable-polling --device /dev/scd0 --enable-polling
    # Disable WiFi radio RFkill http://www.lesswatts.org/tips/wireless.php
    for i in `find /sys -name "rf_kill" ; do echo 1 > $i ; done
    # Restart WiFi by commenting previous line and uncommenting next line http://www.lesswatts.org/tips/wireless.php
    # for i in `find /sys -name "rf_kill" ; do echo 0 > $i ; done
    # Disable gigabit http://www.lesswatts.org/tips/ethernet.php
    ethtool -s eth0 autoneg off speed 100
    # Enable gigabit by commenting previous line and uncommenting next line http://www.lesswatts.org/tips/ethernet.php
    # ethtool -s eth0 autoneg on speed 1000



    I rescued fragments of old forum material on adding additional power management to slitaz-

    http://forum.slitaz.org/index.php/discussion/39/power-management-how-to/
  • @Jozee , my cpu is an atom 1.6 ghz .  But i would like to have it running at 200mhz when I'm doing nothing
    , 800 mhz for basic things to 1600 mhz for tasks flash playing.
    Of course, it would be great ti have cpu on demand not only when the computer is on battery. It's mainly for temperature and thus noise reduction.

    @slicel,
    does your scripts works ? can we put it safely in local.sh ? 
  • slicelslicel May 2010
    The scripts reduced power on ac.

    I forget how many of the lesswatts scripts worked.

    The only potentially adverse behavior that I noticed was that some websites caused frequent hd whirring so it might be better not to do hd management.

    Do not do gigabit kill or rfkill if you use gigabit or wifi.
  • kultexkultex May 2010
    200MHz is something you can dream - use powertop to find out your possible P-States and it depends what Atom you have - I think its a N270 and the Atom 270 P-States are (when my brain still remembers good):
    1600 / 1333 / 1067 / 800
  • kultexkultex May 2010
    @moulefrite  200MHz is something you can dream - use powertop to find out your possible P-States and it depends what Atom you have - I think its a N270 and the Atom 270 P-States are (when my brain still remembers good):

    1600 / 1333 / 1067 / 800
  • moulefritemoulefrite August 2010

    Hi Kultex and Slicel

    I've managed to lower the frenquencies on my eee 900A to 200 Mhz . But I'm not sure it lows the temperature ! Indeed, running applications just takes more time (as the amount of computation is the same) and there's never a state when the CPU is not busy (at least X serveur, lxpanel ...) . Beside this, I've read that Atom are clever and will in anytime lower freq if necessary.

    So , actually my fan is broken :( And i wish to reduce max the heat of the CPU

    I've read that lowerinf the VOLTAGE is the the thing to do. How can I do it yith Slitaz ?

    Thx

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

SliTaz Social