Tiny Core Linux

Tiny Core Extensions => TCE Tips & Tricks => Topic started by: bmarkus on July 07, 2009, 01:32:54 AM

Title: Cpu frequency scaling basics
Post by: bmarkus on July 07, 2009, 01:32:54 AM
CPU FREQUENCY SCALING BASICS

To reduce power consumption is essential for portable computers but there are no reason not to use on desktop machines. You can save power turning off not needed hardware components like WiFi, Bluetooth, turning off or reduce monitor backlight, spinning down HDD and to control CPU frequency.

CPU frequency scaling is built into 2.6 kernel and available with Tiny Core also, but you need few additional tools and you have to setup it yourself. Most of the modern CPU's and chipsets support frequency scaling, there is a high chance that you can use it.

It is a short introductory article how to enable and use it. There are plenty of additional recources on the net.


TOOLS REQUIRED

You need the cpufreq.tczl extension and its dependencies from the repository.


CPU DRIVER

Next you have to load the proper CPU kernel driver matching your CPU. To identify the CPU type in a terminal window:

cat /proc/cpuinfo

Depending on the CPU, load one of the following modules with the 'modprobe' command:

p4-clockmod (Intel)
powernow-k6 (AMD K6)
powernow-k7 (AMD K7)
powernow-k8 (AMD K8)

If you choose a wrong driver you will get an error message and module is not loaded, nothing goes wrong.

Alternatively you can try

acpi-cpufreq

It is not so efficient as CPU specific modules, but better than nothing.

There are drivers for certain chipsets not only for CPU's but it is out of the scope of this introduction.


VIEW CPU FREQUENCY INFORMATION

Now you can check actual CPU frequency and other information. Type in a terminal window:

cpufreq-info

and you will get a similar screen:

(http://tc.hasix.org/scrcap/cpufreqinfo1.png)


GOVERNORS

Governors are kernel modules changing the CPU frequency. There are different governors implementing different rules:

powersave - sets the lowest possible frequency constantly
performance - sets the possible highest frequency constantly
ondemand - changes frequency automatically based upon actual demand of programs
conservative - same as ondemand but with a different algorithm, better for notebook battery
use
userspace - allows userspace programs (or any process running as root) to set the frequency

Above governors are modules, loaded automatically when needed, but you can modprobe them before using. Default is performance.

For most systems, the Ondemand governor can provide the best compromise between heat emission, power consumption, performance, and manageability. When the system is only busy at specific times of the day, the Ondemand governor will automatically switch between maximum and minimum frequency depending on the load without any further intervention.


SELECT GOVERNOR

At this point everything is prepared but no active governor selected and no running third party daemon installed, so no any power saving yet.

Use the 'cpufreq-set' command to activate one of the governors mentioned above, for example:

cpufreq-set -g ondemand

Please note, if you have a dual-core or multiple-core CPU, you must specify explicitely the CPU. There are CPU's where each core can run with different setting! Example for a dual-core CPU:

cpufreq-set -c 0 -g conservative
cpufreq-set -c 1 -g conservative

You can explicitely specify the frequency also.


MAN PAGES

You can read man pages here:

http://linux.die.net/man/1/cpufreq-info
http://linux.die.net/man/1/cpufreq-set


USER SPACE PROGRAMS

There are user space programs to manage not only cpu frequency but other components also. One of those, cpufreqd is part of the cpufreq.tcel/tcpufreq.tczl extension installed.

For the curious there are many good articles on the net.

Hope it helps a bit to understand and use frequency scaling.
Title: Re: Cpu frequency scaling basics
Post by: Juanito on July 07, 2009, 03:53:01 AM
Thanks for the info

Alternatively you can try

acpi-cpufreq

It is not so efficient as CPU specific modules, but better than nothing.

I thought acpi-cpufreq had taken over from the speedstep module to be the module usually required for Intel cpu's, but I may be mistaken

Quote
Now you can check actual CPU frequency and other information.

If you load the cpufreq_stats and freq_table modules, you can also see a whole bunch of data
Title: Re: Cpu frequency scaling basics
Post by: bmarkus on July 07, 2009, 04:34:36 AM
Thanks for the info

Alternatively you can try

acpi-cpufreq

It is not so efficient as CPU specific modules, but better than nothing.

I thought acpi-cpufreq had taken over from the speedstep module to be the module usually required for Intel cpu's, but I may be mistaken


As far as I know acpi-cpufreq is not Intel specific. There are many contrversary info found on the net. For example REDHAT is advising to use it over p4-clockmode as it reduce not only CPU speed but voltage. On forums there are user reports that acpi-cpufreq doesn't work with certain machines even if equipped with Intel dual-core, can't recognize all possible CPU frequency therefore less efficient, ...

Regarding speedstep I have no experience, I have never used. However there are some info in Wikipedia:

http://en.wikipedia.org/wiki/SpeedStep

For sure one has to play around on the specific machine and fine tune frequency scaling. The good point that if module doesn't match hardware will not load so it is safe to play with different modules.

Title: Re: Cpu frequency scaling basics
Post by: bmarkus on July 07, 2009, 04:53:34 AM
Just found an interesting IBM document released in June 2009 on the topic:

http://publib.boulder.ibm.com/infocenter/lnxinfo/v3r0m0/topic/liaai/cpufreq/liaai-cpufreq_pdf.pdf
Title: Re: Cpu frequency scaling basics
Post by: pema on July 12, 2009, 12:45:00 PM
I would recommend powernowd, solves everything in a zap, why bother with the crapy cpufreq ?
Title: Re: Cpu frequency scaling basics
Post by: bmarkus on July 12, 2009, 01:12:05 PM
I would recommend powernowd, solves everything in a zap, why bother with the crapy cpufreq ?

Please read the article carefully. cpufreq is a 2.6 kernel stuff and the low level part of frequency scaling, far away being crapy. However you are free to use whatever userspace program as you want.

Regarding your advice, it is written on the author's WEB as the latest news:

Quote
What's New (1/27/2008)
Took me long enough, but this is the final release of powernowd. The ondemand kernel governor seems to be the wave of the future, and "good enough for me". I do still use it on older kernels, and it's been rock steady for years. v1.00 is just a couple of small cleanups, and running it through valgrind to clean a couple of pedantic memory issues. PowerNowd does everything it set out to do, and is small, efficient, and complete. Barring any brown-paper-bag style bugs, this will be the final release.

http://www.deater.net/john/powernowd.html

Regards...
Title: Re: Cpu frequency scaling basics
Post by: bigpcman on August 12, 2009, 05:11:36 PM
Code: [Select]
[quote author=bmarkus link=topic=2259.msg11856#msg11856 date=1246955574]
[center][b][size=12pt]CPU FREQUENCY SCALING BASICS[/size][/b][/center]

To reduce power consumption is essential for portable computers but there are no reason not to use on desktop machines. You can save power turning off not needed hardware components like WiFi, Bluetooth, turning off or reduce monitor backlight, spinning down HDD and to control CPU frequency.

CPU frequency scaling is built into 2.6 kernel and available with Tiny Core also, but you need few additional tools and you have to setup it yourself. Most of the modern CPU's and chipsets support frequency scaling, there is a high chance that you can use it.

It is a short introductory article how to enable and use it. There are plenty of additional recources on the net.


[b]TOOLS REQUIRED[/b]

You need the [b]cpufreq.tcel[/b] or [b]cpufreq.tczl[/b] extension and its dependencies from the repository.


[b]CPU DRIVER[/b]

Next you have to load the proper CPU kernel driver matching your CPU. To identify the CPU type in a terminal window:

cat /proc/cpuinfo

Depending on the CPU, load one of the following modules with the 'modprobe' command:

p4-clockmod (Intel)
powernow-k6 (AMD K6)
powernow-k7 (AMD K7)
powernow-k8 (AMD K8)

If you choose a wrong driver you will get an error message and module is not loaded, nothing goes wrong.

Alternatively you can try

acpi-cpufreq

It is not so efficient as CPU specific modules, but better than nothing.

There are drivers for certain chipsets not only for CPU's but it is out of the scope of this introduction.


[b]VIEW CPU FREQUENCY INFORMATION[/b]

Now you can check actual CPU frequency and other information. Type in a terminal window:

cpufreq-info

and you will get a similar screen:

[img]http://tc.hasix.org/scrcap/cpufreqinfo1.png[/img]


[b]GOVERNORS[/b]

Governors are kernel modules changing the CPU frequency. There are different governors implementing different rules:

powersave - sets the lowest possible frequency constantly
performance - sets the possible highest frequency constantly
ondemand - changes frequency automatically based upon actual demand of programs
conservative - same as ondemand but with a different algorithm, better for notebook battery
use
userspace - allows userspace programs (or any process running as root) to set the frequency

Above governors are modules, loaded automatically when needed, but you can modprobe them before using. Default is performance.

For most systems, the Ondemand governor can provide the best compromise between heat emission, power consumption, performance, and manageability. When the system is only busy at specific times of the day, the Ondemand governor will automatically switch between maximum and minimum frequency depending on the load without any further intervention.


[b]SELECT GOVERNOR[/b]

At this point everything is prepared but no active governor selected and no running third party daemon installed, so no any power saving yet.

Use the 'cpufreq-set' command to activate one of the governors mentioned above, for example:

cpufreq-set -g ondemand

Please note, if you have a dual-core or multiple-core CPU, you must specify explicitely the CPU. There are CPU's where each core can run with different setting! Example for a dual-core CPU:

cpufreq-set -c 0 -g conservative
cpufreq-set -c 1 -g conservative

You can explicitely specify the frequency also.


[b]MAN PAGES[/b]

You can read man pages here:

http://linux.die.net/man/1/cpufreq-info
http://linux.die.net/man/1/cpufreq-set


[b]USER SPACE PROGRAMS[/b]

There are user space programs to manage not only cpu frequency but other components also. One of those, cpufreqd is part of the cpufreq.tcel/tcpufreq.tczl extension installed.

For the curious there are many good articles on the net.

Hope it helps a bit to understand and use frequency scaling.

[/quote]
What is the modprobe for the intel atom processor kernel driver?

I don't think it's any of these:
p4-clockmod (Intel)
powernow-k6 (AMD K6)
powernow-k7 (AMD K7)
powernow-k8 (AMD K8)
Title: Re: Cpu frequency scaling basics
Post by: bmarkus on August 12, 2009, 10:01:32 PM
Did you try acpi_cpufreq ? You can try speedstep also, depending on CPU model.
Title: Re: Cpu frequency scaling basics
Post by: bigpcman on August 13, 2009, 06:31:01 AM
Did you try acpi_cpufreq ? You can try speedstep also, depending on CPU model.
Yes, I tried acpi_cpufreq. cpufreq-info responded with "hardware limits: 1.6Ghz - 1.6Ghz". No speed steps present.
Title: Re: Cpu frequency scaling basics
Post by: bmarkus on August 13, 2009, 07:25:28 AM
What is the CPU model?
Title: Re: Cpu frequency scaling basics
Post by: bigpcman on August 13, 2009, 07:34:16 AM
I rebooted and started over and this time I made some progress. I performed the "info steps":
tc@box:~$ sudo modprobe acpi-cpufreq
tc@box:~$ sudo modprobe cpufreq_conservative
tc@box:~$ sudo modprobe cpufreq_ondemand
tc@box:~$ sudo modprobe cpufreq_powersave
tc@box:~$ sudo modprobe cpufreq_userspace
tc@box:~$ sudo acpid
tc@box:~$ sudo cpufreqd

Then ran the cpufreq-info command with the following successful results:
Code: [Select]
tc@box:~$ cpufreq-info
cpufrequtils 005: cpufreq-info (C) Dominik Brodowski 2004-2006
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
  driver: acpi-cpufreq
  CPUs which need to switch frequency at the same time: 0
  hardware limits: 800 MHz - 1.60 GHz
  available frequency steps: 1.60 GHz, 1.33 GHz, 1.07 GHz, 800 MHz
  available cpufreq governors: userspace, powersave, ondemand, conservative, performance
  current policy: frequency should be within 1.60 GHz and 1.60 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 1.60 GHz.
analyzing CPU 1:
  driver: acpi-cpufreq
  CPUs which need to switch frequency at the same time: 1
  hardware limits: 800 MHz - 1.60 GHz
  available frequency steps: 1.60 GHz, 1.33 GHz, 1.07 GHz, 800 MHz
  available cpufreq governors: userspace, powersave, ondemand, conservative, performance
  current policy: frequency should be within 1.60 GHz and 1.60 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 1.60 GHz.
It's interesting that cpufreq does not know about the HD super performance mode (1.8Ghz) that Zandros supports.
Now I will try out the governor.

edit: pulled the ac plug and sure enough the speed dropped down to 800Mhz.

edit2: Looks like cpufreq is not working after all. I performed several cpufreq-set commands and none of them change the speed from 1.6Ghz. For instance:
 sudo cpufreq-set -c 0 -f 800000
 sudo cpufreq-set -c 0 -g powersave

I also tried adding commands for processor 1. Still no dice.

It looks like my initial suspicion that  acpi-cpufreq does not support the atom n270 processor might be correct.
Title: Re: Cpu frequency scaling basics
Post by: bmarkus on August 13, 2009, 10:51:28 AM

It's interesting that cpufreq does not know about the HD super performance mode (1.8Ghz) that Zandros supports.


Most likely because it is not an official CPU frequency, it is overclocking. You may read this:

http://www.liliputing.com/2009/03/intel-atom-n280-cpu-can-hit-175ghz-with-ease.html
Title: Re: Cpu frequency scaling basics
Post by: bigpcman on August 13, 2009, 11:15:58 AM

It's interesting that cpufreq does not know about the HD super performance mode (1.8Ghz) that Zandros supports.


Most likely because it is not an official CPU frequency, it is overclocking. You may read this:

http://www.liliputing.com/2009/03/intel-atom-n280-cpu-can-hit-175ghz-with-ease.html

Thanks for the link. Please see the additions to my previous post for more problems.

Perhaps this has something to do with it:

Code: [Select]
tc@box:~$ sudo cpufreqd-get -l
No cpufreqd socket found

edit: I got rid of the above error by enabling the "enable_remote=1" line in the "general" section of the cpufreqd.conf file. But this did not fix the inability to set the cpu speed.
Title: Re: Cpu frequency scaling basics
Post by: Juanito on August 13, 2009, 01:40:43 PM
If all else fails, read the info file, eh  ;)

It could be that the cpufreq daemon overrides your terminal commands?
Title: Re: Cpu frequency scaling basics
Post by: bigpcman on August 13, 2009, 05:04:54 PM
If all else fails, read the info file, eh  ;)

It could be that the cpufreq daemon overrides your terminal commands?
I'm confused... what do you mean? What are you referring to in the info?

edit 1: Ok, I see what you mean about the daemon. It will once activated at each interval period do whatever the conf file specifies. So since Basic  AC calls for high performance and high performance specifies 100% cpu, the cpu freq stays at 1.6Ghz. I thought the terminal commands were sent to the daemon to execute and would override the conf file settings.

So I changed the Basic AC  setting to set max and min at 800000 and restarted cpufreq. Sure enough the cpu freq is now at 800Mhz.

edit 2: I guess you are suggesting that I didn't execute the sudo "command set" in the info file and that was what was causing my problems.  Well I did but I also did other things that must have messed up the system. A reboot and more exact approach got cpufreq to do what it is suppose to do.

Anyway, thanks for the daemon tip that was what I was missing.

edit 3: As the worm turns... I changed my "Basic AC on" governor setting to "ON Demand High" which has min freq=40% and max freq=100% and then restarted cpufreqd. At idle the cpu is running at 800Mhz using the "ondemand" governor. However, with the cpu running at >85% cpu, cpufreq-info reports the cpu is running at 1.3Ghz (not 1.6Ghz as it should) using the "performance" governor. Now I really am confused.

edit 4: Enjoy your vacation Juanito.   :)

By the way here are some usefull commands:

Code: [Select]
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors - shows all gov's
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - shows current gov
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq - shows current freq
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - shows min freq
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq - shows max freq

Code: [Select]
Title:          cpufreq.tcel info file
Description:    cpufreq for tc_2.X
Version:        2.3.4
Author:         see list of sites below
Original-site:  see list of sites below
Copying-policy: see list of sites below
Size: 65KB
Extension_by:   juanito
Comments:       cpufreqd and cpufrequtils for tinycore_2.x
                requires acpid.tce, cpufreq-2.6.29.1-tinycore.tcem
                ----------
                Example howto:
                $ sudo modprobe acpi-cpufreq [beware - choose the correct module for your cpu]
                $ sudo modprobe cpufreq_conservative
                $ sudo modprobe cpufreq_ondemand
                $ sudo modprobe cpufreq_powersave
                $ sudo modprobe cpufreq_userspace
                $ sudo acpid
                $ sudo cpufreqd
                ----------
                config file at:
                /usr/local/etc/cpufreqd.conf
                ----------
                This extension contains:
                cpufrequtils-005 - GPLv2 - http://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils-005.tar.bz2
                cpufreqd-2.3.4 - GPLv2 - http://garr.dl.sourceforge.net/sourceforge/cpufreqd/cpufreqd-2.3.4.tar.bz2
                ----------
Change-log:     First version
Current:        2009/04/28

Title: Re: Cpu frequency scaling basics
Post by: bmarkus on August 14, 2009, 12:39:06 AM
Did you change the governor to userspace?
Title: Re: Cpu frequency scaling basics
Post by: bigpcman on August 14, 2009, 06:09:54 AM
Did you change the governor to userspace?

I set the governor to "On Demand High" in the Basic section - "AC on" in the cpufreq.conf file. I assume this sets the system governor to "ondemand" as long as the computer is "plugged" into AC and is not running on batteries. When idle the coufreq-info does indeed report "ondemnd" governor active.

However, for some reason the system switches over to the performance mode when the cpu gets busy. But never beyond 1.3Ghz. Strange.

edit: Well I guess I have been a little slow to pick up the fact the cpufreqd daemon is a user space program and overrides/ conflicts with the other governors like "ondemand".

I finally got around to reading the IBM document bmarkus suggested. It states:

Code: [Select]
The "userspace governor"
Use the userspace governor if you want to impose a unique power policy that is not provided by other
kernel governors or if you want to experiment with directly setting different power policies.
This governor allows any user space program to set the processor frequency. User space daemons such as
cpuspeed control the processor speed through the userspace governor interface. Because user space
programs can react to any number of conditions or events, this governor (in conjunction with a user
space program) provides you with the most freedom in setting processor speed. The userspace governor
does not dynamically change the CPU frequency or react to processor load - it only provides a
mechanism to set the frequency (through the use of the scaling_speed parameter discussed later).
The cpuspeed program is an example of a user space program that you can use to control the processor
speed. Red Hat Enterprise Linux 5.3 provides cpuspeed and the daemon runs by default. Other example
daemons that work with the userspace governor to adjust the CPU frequency are:

cpufreqd
http://www.linux.it/~malattia/wiki/index.php/Cpufreqd (http://www.linux.it/~malattia/wiki/
index.php/Cpufreqd)

So by setting the governor to "userspace" directly in the /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor file I finally get the desired effect.

edit2 : It seems that when I edited the cpufreq.conf file I made a mistake so the cpufreqd daemon was not actually running when I got the "userspace" above results. Very interesting eh. That got me to thinking that the "ondemand" governor would run fine without the daemon and sure enough that seems to be the case. But after thinking about this some more, perhaps the bios is scaling the cpu freq and the "cat  scaling_cur_freq" is simply reporting on what the bios is doing. I'm still not sure what is going on.
Title: Re: Cpu frequency scaling basics
Post by: bigpcman on August 14, 2009, 08:59:49 AM
tc2.2 eeepc 900A

Alrighty then, it's to time to start over. I decided to reboot and start over with a simpler approach.

I installed only the "cpufreq-2.6.29.1-tinycore.tcem" extension which has no dependencies.
Next I did a "sudo modprobe acpi-cpufreq".

The modprobe installed the "/sys/devices/system/cpu/cpu0/cpufreq/" directory with all the cpufreq control and status files.
At this point the "cpufreq_governor" was set to performance by default and the cpu speed stayed at 1.6Ghz under all loads.

Next I did a "sudo modprobe cpufreq_ondemand".
Then I changed the "cpufreq_governor" to "ondemand".
Bingo! The cpu speed dropped to 800Mhz at idle and jumped to 1.6Ghz when the cpu load increased. Perfect.

Wow, somehow I got myself way offtrack on this one. In the end the solution was simple but it was a long trip to get here.
Title: Re: Cpu frequency scaling basics
Post by: OldAdamUser2 on October 11, 2009, 05:13:15 PM
Thanks for this great tutorial on power saving. I followed the aadvice on my Eee900 and was able to set up my machine for the first time in a true low-power mode. This is just what I want for reading ebooks and light web browsing.
Title: Re: Cpu frequency scaling basics
Post by: 4-stroke on October 14, 2009, 11:48:51 PM
Just as info:

I've had great success with my Acer Aspire 1360 with AMD sempron CPU by putting this in my bootlocal.sh:

Code: [Select]
modprobe powernow-k8
modprobe cpufreq_ondemand
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

Of course cpufreq-2.6.29.1-tinycore.tcem is needed also.

On my Eeepc900 with the celeron processor loading the acpi-cpufreq module doesn't work and with the p4-clockmod module it just became very sluggish and battery time didn't increase at all.
Title: Re: Cpu frequency scaling basics
Post by: bmarkus on October 15, 2009, 12:19:50 AM
On my Eeepc900 with the celeron processor loading the acpi-cpufreq module doesn't work and with the p4-clockmod module it just became very sluggish and battery time didn't increase at all.

I do not have Eeepc900 in hand but according to different articles its BIOS supports scaling via ACPI so it is expected to work. I see Kernel patches to support Eeepc900 back in November 2008. Do not know wether the current TC kernel supports it or not.
Title: Re: Cpu frequency scaling basics
Post by: 4-stroke on October 15, 2009, 12:37:11 AM
On my Eeepc900 with the celeron processor loading the acpi-cpufreq module doesn't work and with the p4-clockmod module it just became very sluggish and battery time didn't increase at all.

I do not have Eeepc900 in hand but according to different articles its BIOS supports scaling via ACPI so it is expected to work. I see Kernel patches to support Eeepc900 back in November 2008. Do not know wether the current TC kernel supports it or not.

I found the answer in this thread:

http://forum.eeeuser.com/viewtopic.php?id=74209

PS. I've read your pm. I'll try it out when I get home. Thanks! ;D
Title: Re: Cpu frequency scaling basics
Post by: bmarkus on October 15, 2009, 12:41:56 AM
Thanks for the info. Seems that the key is EeePC ACPI Utilities at:

http://sourceforge.net/projects/eeepc-acpi-util/

which is not available (yet) in the TC repo. Strange enough there is an MS .exe binary in the bin folder while it looks a LINUX package.  ???
Title: Re: Cpu frequency scaling basics
Post by: Juanito on October 15, 2009, 01:34:08 AM
You can achieve a lot by playing with the conf file in the cpufreq extension
Title: Re: Cpu frequency scaling basics
Post by: jls on March 16, 2010, 03:15:17 PM
Code: [Select]
root@box:~# cat /proc/cpuinfo
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 6
model           : 8
model name      : AMD Sempron(tm)   2500+
stepping        : 1
cpu MHz         : 1748.190
cache size      : 256 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mp mmxext 3dnowext 3dnow up
bogomips        : 3497.06
clflush size    : 32
power management: ts
root@box:~# modprobe powernow-k7
modprobe: failed to load module powernow-k7: No such device
root@box:~# modprobe acpi-cpufreq
modprobe: failed to load module acpi-cpufreq: No such device
root@box:~#

Title: Re: Cpu frequency scaling basics
Post by: bmarkus on March 16, 2010, 03:31:44 PM
Same result here on TC 2.10rc2 with Sempron 2800+ :(
Title: Re: Cpu frequency scaling basics
Post by: 4-stroke on March 16, 2010, 09:47:10 PM
I have a Sempron 2800+ and I'm using powernow-k8 right now...
Title: Re: Cpu frequency scaling basics
Post by: bmarkus on March 16, 2010, 11:15:35 PM
I have a Sempron 2800+ and I'm using powernow-k8 right now...

On which TC version?
Title: Re: Cpu frequency scaling basics
Post by: 4-stroke on March 16, 2010, 11:39:03 PM
I have a Sempron 2800+ and I'm using powernow-k8 right now...

On which TC version?

2.10rc2
Title: Re: Cpu frequency scaling basics
Post by: bmarkus on March 17, 2010, 12:41:46 AM
Would you check content of /proc/acpi/processor/CPU0 on you machine? Here it shows that power management is not supported by ACPI at all:

Quote
info:

processor id:            0
acpi id:                 0
bus mastering control:   no
power management:        no
throttling control:      no
limit interface:         no

limit:

<not supported>

power:

active state:            C0
max_cstate:              C8
bus master activity:     00000000
maximum allowed latency: 2000000000 usec
states:

throttling

<not supported>

Title: Re: Cpu frequency scaling basics
Post by: 4-stroke on March 17, 2010, 12:53:02 AM
Code: [Select]
tc@box:~$ /proc/acpi/processor/CPU0/cat info
processor id:            0
acpi id:                 0
bus mastering control:   no
power management:        no
throttling control:      no
limit interface:         no

tc@box:/proc/acpi/processor/CPU0$ cat limit
<not supported>

tc@box:/proc/acpi/processor/CPU0$ cat throttling
<not supported>

tc@box:/proc/acpi/processor/CPU0$ cat power
active state:            C0
max_cstate:              C8
bus master activity:     00000000
maximum allowed latency: 2000000000 usec
states:
    C1:                  type[C1] promotion[--] demotion[--] latency[000] usage[00000000] duration[00000000000000000000]
Code: [Select]
tc@box:/proc/acpi/processor/CPU0$ lsmod
Module                  Size  Used by    Not tainted
vfat                    5652  0
fat                    29692  1 vfat
cpufreq_ondemand        2928  1
powernow_k8             8676  0
freq_table              1208  2 cpufreq_ondemand,powernow_k8
oss_usb                92044  1
oss_via823x             7196  1
osscore               509140  4 oss_usb,oss_via823x
rt73usb                13580  0
rt2x00usb               4360  1 rt73usb
rt2x00lib              14536  2 rt73usb,rt2x00usb
rfkill                  4012  2 rt2x00lib
mac80211               82100  2 rt2x00usb,rt2x00lib
cfg80211               21604  2 rt2x00lib,mac80211
pcmcia                 13964  0
firmware_class          3188  2 rt2x00lib,pcmcia
squashfs               11732 55
yenta_socket           13336  2
scsi_wait_scan           260  0
rsrc_nonstatic          5744  1 yenta_socket
parport_pc             18352  0
via_rhine              12476  0
parport                18768  1 parport_pc
wmi                     2952  0
battery                 5976  0
pcmcia_core            16976  3 pcmcia,yenta_socket,rsrc_nonstatic
ac                      1732  0

Same here basically. I know it works though, otherwise my fan runs on full tilt all the time.
Title: Re: Cpu frequency scaling basics
Post by: bmarkus on March 17, 2010, 12:59:06 AM
Thanks for the info. At the moment I'm lost :(
Title: Re: Cpu frequency scaling basics
Post by: 4-stroke on March 17, 2010, 01:24:02 AM
Mine's a "Mobile". There's probably something different with it.

Code: [Select]
tc@box:~$ cat /proc/cpuinfo
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 15
model           : 8
model name      : Mobile AMD Sempron(tm) Processor 2800+
stepping        : 2
cpu MHz         : 800.000
cache size      : 256 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext 3dnowext 3dnow up lahf_lm
bogomips        : 1601.67
clflush size    : 64
power management: ts fid vid ttp
Title: Re: Cpu frequency scaling basics
Post by: curaga on March 17, 2010, 01:36:25 AM
Not all desktop cpus support freq scaling, and especially not all desktop boards.