Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

CPU Throttling => I don't get it

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
12 posts • Page 1 of 1
Author
Message
jayson
n00b
n00b
Posts: 14
Joined: Fri Jan 05, 2007 11:49 pm

CPU Throttling => I don't get it

  • Quote

Post by jayson » Sun Jan 07, 2007 9:34 pm

Hello!

Configured my kernel and installed powersave, because I want be able to optimize my notebook for optimal energy use.
Kernel works perfect, powersave emerged with no problems ok

Let's throttle the cpu and watch if the cpu frequency changes:
//tty1
jaylab jay # watch -n 4 powersave -r

//tty2
jaylab jay # powersave -p50
CPU 0:
Throttling states : 8
Current state: 4
CPU 1:
Throttling states : 8
Current state: 4
Ok. But the output of powersave -r doesn't change! I always get 1997.352051 MHz although I should get ~1000MHz (as I throttled my cpu frequency by 50%)
Hmm ... maybe powersave -r is wrong. So let's use cpufreq-info.

cpufreq-info tells me ...
cpufrequtils 002: cpufreq-info (C) Dominik Brodowski 2004-2006
Report errors and bugs to linux@brodo.de, please.
analyzing CPU 0:
driver: centrino
CPUs which need to switch frequency at the same time: 0
hardware limits: 1000 MHz - 2.00 GHz
available frequency steps: 2.00 GHz, 1.67 GHz, 1.33 GHz, 1000 MHz
available cpufreq governors: conservative, ondemand, powersave, userspace, performance
current policy: frequency should be within 1000 MHz and 1000 MHz.
The governor "ondemand" may decide which speed to use
within this range.
current CPU frequency is 1000 MHz.
analyzing CPU 1:
driver: centrino
CPUs which need to switch frequency at the same time: 1
hardware limits: 1000 MHz - 2.00 GHz
available frequency steps: 2.00 GHz, 1.67 GHz, 1.33 GHz, 1000 MHz
available cpufreq governors: conservative, ondemand, powersave, userspace, performance
current policy: frequency should be within 1000 MHz and 1000 MHz.
The governor "ondemand" may decide which speed to use
within this range.
current CPU frequency is 1000 MHz.
... that my cpu frequency is 1Ghz as it should.
So let's change it again
powersave -p30
cpufreq-info
same output as above 1GHz
My question is know. What did I do wrong? I don't get any errors and throtteling seems to work ... and is enabled in the kernel.

Thank you for any help!

Best Regards Jacob
Remember: Silly is a state of Mind, Stupid is a way of Life.
-- Dave Butler

My Configuration
Top
bLUEbYTE84
Guru
Guru
User avatar
Posts: 566
Joined: Fri Jul 21, 2006 9:11 pm
Location: universe.tar.gz, src/earth.h, struct homo_sapiens_table

  • Quote

Post by bLUEbYTE84 » Mon Jan 08, 2007 3:11 am

Which type of cpu do you have? Pentium-M?
I have a pentium-m and you absolutely DON'T need a demon whatsoever.
Begin with forgetting about that daemon and unmerge it.
Be sure that you activated the CPU Freq. scaling options, any option for your specific CPU if applicable, and the governors in your kernel.
Then, you set the governor like this:

echo conservative > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
OR
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
OR
echo powersave > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

I get the idea, right?
The default is the performance governor.
I have echo conservative > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor line in my /etc/conf.d/local.start so it is effective at each boot.
Hope this help. Post if you need more info.
Top
jserink
Veteran
Veteran
Posts: 1036
Joined: Fri Jan 30, 2004 7:57 am

cpufreq_powersave

  • Quote

Post by jserink » Mon Jan 08, 2007 3:23 am

Hi There:

Not sure which CPU you're using but Mine is an athlon XPM 2500. Loading cpufreq_powersave as the governor simply sets the CPU to the lowest frequency possible, that's it. Similarly, loading the cpufreq_performance governor sets it to the highest freq possible. if you want dynamic control, you have trhee choices:
1. userspace governor,
2. Ondemand goernor,
3. Conservative governor.

userspace means you set the frequency yourself by setting the appropriate level for the values in /sys/devices/system/cpu/cpu0/cpufreq directory. I recommend rummaging around in that area to get comfortable, look at the settings using cat, you can change settings using echo. You can also use the cpufreq-set command to manipulate things.
Note: Whatever governor is presently being used, the minute you try and set the frequecy manually using cpufreq-set the governor iwl automatically change to userspace.
While userspace is interesting you will quickly get bored with the tedious business of always having to fiddle with the settings.
Ondemand governor toggles you between min freq and max freq depending upon load.
Conservative is much like on demand but moves is steps up and then steps down, depending up CPU loading.

This is all in the kernel docs.

I use the cpufreq_conservative governor and it works excellent. I have to do a small mod to the souce code to get it to work the way I wanted to on my Athlon but it works great now, I need not touch it.

You might have too many things loaded up. if you want to use the kernel governors, the stuff I described here, you do not need cpufreqd, cpudyn, speed freq, etc...

Cheers,
John
Top
jayson
n00b
n00b
Posts: 14
Joined: Fri Jan 05, 2007 11:49 pm

  • Quote

Post by jayson » Mon Jan 08, 2007 7:00 pm

First of all, thanks for your replys!

I have a core duo T2500 @ 2GHz.

@jserink
Thank you for your help. I really appreciate that, but I think that this solution is probably a bit (or a lot :-)) too advanced for me, as I am a Linux newbie :-) and you probably a professional!
Although I am pretty high skilled in PHP and Java I have no clue of C ... and kernel programming ...

@bLUEbYTE84
I activated all (for me) relevant options when compiling the kernel.
Post if you need more info.
That would be very nice!! Thanks a lot!

I really appreciate your help as power management is very very important for me!

Best Regards Jay
Remember: Silly is a state of Mind, Stupid is a way of Life.
-- Dave Butler

My Configuration
Top
tom_bxl
n00b
n00b
User avatar
Posts: 47
Joined: Wed Sep 08, 2004 1:16 pm
Location: Brussels

  • Quote

Post by tom_bxl » Mon Jan 08, 2007 8:00 pm

Have you tried user friendly tools such as the gnome cpu frequency applet (there's probably an equivalent in KDE)? You can change the governors from there with a right-click (without any daemons).

Tom
Top
bLUEbYTE84
Guru
Guru
User avatar
Posts: 566
Joined: Fri Jul 21, 2006 9:11 pm
Location: universe.tar.gz, src/earth.h, struct homo_sapiens_table

  • Quote

Post by bLUEbYTE84 » Mon Jan 08, 2007 9:11 pm

jayson wrote:First of all, thanks for your replys!

too advanced for me, as I am a Linux newbie :-)
Although I am pretty high skilled in PHP and Java I have no clue of C ... and kernel programming ...
No need to worry, you probably won't need to go that far ;)

Hmmm, unfortunately as far as I know there is no support for freq. scaling for those processors yet. At least in the kernel context.
You might be able to get it working by using user-space daemons.
Therefore, maybe someone else should comment on this since I don't have a core duo.

Good luck
Have you tried user friendly tools such as the gnome cpu frequency applet (there's probably an equivalent in KDE)? You can change the governors from there with a right-click (without any daemons).
In order to make those tools function, you need the freq. scaling support in the first place. Therefore, that's not a solution.
Top
tom_bxl
n00b
n00b
User avatar
Posts: 47
Joined: Wed Sep 08, 2004 1:16 pm
Location: Brussels

  • Quote

Post by tom_bxl » Mon Jan 08, 2007 9:40 pm


In order to make those tools function, you need the freq. scaling support in the first place. Therefore, that's not a solution.
Well, if one sees the /sys/device/.../cpufreq/scaling_governor files, in order to be able to "echo something > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor". I would assume (but maybe I'm very wrong :) ) that cpu frequency scaling is available. These little tools are just another way of doing the same thing.
Top
jayson
n00b
n00b
Posts: 14
Joined: Fri Jan 05, 2007 11:49 pm

  • Quote

Post by jayson » Mon Jan 08, 2007 9:42 pm

Frequency scaling also worked with openSuse 10.2, but there i did this via yast.

...

Best Regards Jay
Remember: Silly is a state of Mind, Stupid is a way of Life.
-- Dave Butler

My Configuration
Top
bLUEbYTE84
Guru
Guru
User avatar
Posts: 566
Joined: Fri Jul 21, 2006 9:11 pm
Location: universe.tar.gz, src/earth.h, struct homo_sapiens_table

  • Quote

Post by bLUEbYTE84 » Mon Jan 08, 2007 9:50 pm

tom_bxl wrote:

In order to make those tools function, you need the freq. scaling support in the first place. Therefore, that's not a solution.
Well, if one sees the /sys/device/.../cpufreq/scaling_governor files, in order to be able to "echo something > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor". I would assume (but maybe I'm very wrong :) ) that cpu frequency scaling is available. These little tools are just another way of doing the same thing.
True, but does he have them? That's the question :) Unless I'm missing something, he haven't mentioned.
OP: Please check if you have /sys/devices/system/cpu/cpu0/cpufreq directory.
Top
jayson
n00b
n00b
Posts: 14
Joined: Fri Jan 05, 2007 11:49 pm

  • Quote

Post by jayson » Tue Jan 09, 2007 10:05 am

Yeah. I got this directories and I also got the scaling_governor and tried using them (setting powersave for each cpu), but the cpu frequency stayed the same and nothing changed. so it doesn't work.

best regards jay
Remember: Silly is a state of Mind, Stupid is a way of Life.
-- Dave Butler

My Configuration
Top
jserink
Veteran
Veteran
Posts: 1036
Joined: Fri Jan 30, 2004 7:57 am

Actually, it is working...

  • Quote

Post by jserink » Fri Jan 12, 2007 7:14 am

jayson wrote:Yeah. I got this directories and I also got the scaling_governor and tried using them (setting powersave for each cpu), but the cpu frequency stayed the same and nothing changed. so it doesn't work.

best regards jay
Jay!

Read what you just wrote above and then re-read my post.

You might also want to read where I got the info from...
/usr/src/linux/Documentation/cpu-freq....its all in there in VERY simple text files.

If the CPU frequency is at its lowest and statying there, then its all working as you're using the cpufreq_powersave governor.

if you don't want it low all the time, use a different governor.

Cheers,
john
Top
bLUEbYTE84
Guru
Guru
User avatar
Posts: 566
Joined: Fri Jul 21, 2006 9:11 pm
Location: universe.tar.gz, src/earth.h, struct homo_sapiens_table

  • Quote

Post by bLUEbYTE84 » Tue Jan 16, 2007 12:58 pm

Those two people were experiencing what I see as exact same issue as yours, and it was solved. Therefore I recommend you to check your kernel config once again, very carefully, and building stuff built-in.
http://forums.gentoo.org/viewtopic-t-53 ... ight-.html
Top
Post Reply

12 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic