LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-03-2008, 07:55 AM   #1
jena
LQ Newbie
 
Registered: Jan 2008
Posts: 16

Rep: Reputation: 0
Cpufreq ondemand works just to one frequency


Hello!!!
This is my first post in this forum...i'm sorry for my bad english but it's not my mother language...
I have a problem with cpufreq...i use the ondemand governor but the problem is what it works just to frequency 498 MHz but my processor support 498 MHz, 598 MHz, 698 MHz, 1.1 GHz like you can see in the cpufreq-info out:
Code:
cpufreq-info
analyzing CPU 0:
driver: powernow-k7
CPUs which need to switch frequency at the same time: 0
hardware limits: 498 MHz - 1.1 GHz
available frequency steps: 498 MHz, 598 MHz, 698 MHz, 1.1 GHz
available cpufreq governors: performance, conservative, ondemand, userspace
current policy: frequency should be within 498 MHz and 498 MHz.
The governor "ondemand" may decide which speed to use within this range.
current CPU frequency is 498 MHz (asserted by call to hardware)
I would what the ondemand governor use all the frequencis aviable...
I use slackware 11 and the kernel 2.6.17.13...
I hope you can help me...
Thank you!!!

Last edited by jena; 01-03-2008 at 08:00 AM.
 
Old 01-03-2008, 01:30 PM   #2
hkoster1
Member
 
Registered: Dec 2007
Location: Amsterdam
Distribution: Debian testing/Sid (AMD64)
Posts: 32

Rep: Reputation: 15
How do you know that the processor isn't stepping very quickly from max to min, and vice versa?

For an intermediate setting to stick for some extended period you would need to run a task that loads the processor uniformly to a corresponding intermediate level for the same extended period. There aren't many tasks that I can think of that would do that -- a lengthy compilation would most likely load the processor 100%.

So, the most common case is that people either stress the processor 100% (doing some processor-intensive task) or that they let the computer idle along. If that applies to you, then you would exactly observe what you're posting about.

FWIW, my own AMD Opteron 165 processor (also using ondemand) runs either at 1.83GHz or at 1.00GHz, while dmesg shows that there are in theory six levels in between. I've noticed the same on my MacBook running Mac OS X (using CoreTemp).

Oops: on rereading your post it appears that the range of frequencies is stuck at that low value. Can you confirm that /sys/devices/system/cpu//cpufreq/cpuinfo_max_freq and _min_freq are indeed the same?

Last edited by hkoster1; 01-03-2008 at 01:50 PM. Reason: Second thought...
 
Old 01-04-2008, 08:35 AM   #3
jena
LQ Newbie
 
Registered: Jan 2008
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by hkoster1 View Post
Oops: on rereading your post it appears that the range of frequencies is stuck at that low value. Can you confirm that /sys/devices/system/cpu//cpufreq/cpuinfo_max_freq and _min_freq are indeed the same?
Thank you very much for your answer!!!
You understand my problem...
/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq look like this:
Code:
1096392
And /sys/devices/system/cpu//cpufreq/cpuinfo_min_freq look like this:
Code:
498360
So the content of the files aren't the same but the values are respectively the max and the min aviable for my cpu...
looking the content of all files in /sys/devices/system/cpu/cpu0/cpufreq i saw that the content of the file scaling_max_freq and scaling_min_freq is the same:
Code:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
498360
Code:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
498360
I think this is the problem...because i think the content of scaling_max_freq should be 1096392...
I tried to change it by root with:
Code:
echo 1096392 >/sys/devices//system/cpu/cpu0/cpufreq/scaling_max_freq
But the content dosen't change:
Code:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
498360
I tried to change with the text editor kate...i open the file and repleaced 498360 with 1096392 and i save the file but if i reopen the file it looks empty...
At reboot it's again 498360...
I don't understand because i can not change it...
I hope you can help me...
Thank you very much!!!

Last edited by jena; 01-04-2008 at 08:37 AM.
 
Old 01-04-2008, 08:55 AM   #4
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
Hi.

You're right - the scaling_max_freq and scaling_min_freq should be different if you're using ondemand.

What do you get from 'cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor' ?

Dave
 
Old 01-05-2008, 07:35 AM   #5
jena
LQ Newbie
 
Registered: Jan 2008
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by ilikejam View Post
What do you get from 'cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor' ?
Thank you for your answer!!!
The out of cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor is:
Code:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
ondemand
I don't know what try to do for make it works right way...
I hope you can help me...
Thank you!!!
 
Old 01-05-2008, 08:07 AM   #6
search1267
LQ Newbie
 
Registered: Jan 2008
Posts: 1

Rep: Reputation: 0
thank u tips
 
Old 01-05-2008, 01:38 PM   #7
hkoster1
Member
 
Registered: Dec 2007
Location: Amsterdam
Distribution: Debian testing/Sid (AMD64)
Posts: 32

Rep: Reputation: 15
Not being familiar with Slackware, I can only describe how I would solve your problem in my own Debian installation:

1. Edit the file /etc/init.d/cpufrequtils with root privileges.
Look for the two definitions of $MAX_SPEED and $MIN_SPEED.

Now, on my computer these are both set to "0", meaning that
the values in /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
and ..//scaling_min_freq are found elsewhere. This "elsewhere" is
not working right on your computer, so you need to supply these
values yourself (rounded in MHz):

$MAX_SPEED="1100"
$MIN_SPEED="500"

2. Still with root privileges, restart the script:

# /etc/init.d/cpufrequtils restart

This causes the proper values for scaling_{min,max}_freq, which should also survive a reboot.

Now, the above works with Debian -- it may be a bit different with Slack, but it shouldn't be a whole lot different. You could start (still as root) by running the command (from the /etc directory)

# grep 'MAX_SPEED' -r *

and watch the output. If there is a file init.d/cpufrequtils listed then you're in luck (see above), otherwise a bit of detective work is required. You might also look for a file /etc/default/cpufrequtils (in my case there isn't one), which may contain speed specifications.

Good hunting!

Last edited by hkoster1; 01-05-2008 at 02:31 PM. Reason: Clarification 2x
 
Old 01-05-2008, 05:38 PM   #8
jena
LQ Newbie
 
Registered: Jan 2008
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by hkoster1 View Post
1. Edit the file /etc/init.d/cpufrequtils with root privileges.
Look for the two definitions of $MAX_SPEED and $MIN_SPEED.
Thank you for your answer!!!
I look for the /etc/init.d/cpufrequtils but there isn't...i haven't this file...and if i try restart it this is the out:
Code:
/etc/init.d/cpufrequtils restart
bash: /etc/init.d/cpufrequtils: No such file or directory
Quote:
You could start (still as root) by running the command (from the /etc directory)# grep 'MAX_SPEED' -r *
I try this comand and the out is:
Code:
# cd /etc
# grep 'MAX_SPEED' -r *
#
Quote:
You might also look for a file /etc/default/cpufrequtils (in my case there isn't one), which may contain speed specifications.
I have searched for /etc/default/cpufrequtils but there isn't...i have just /etc/cpufreqd.conf and this is its contained:
Code:
# this is a comment
# see CPUFREQD.CONF(5) manpage for a complete reference

[General]
pidfile=/var/run/cpufreqd.pid
poll_interval=2
verbosity=4
#enable_remote=1
#remote_group=root
[/General]

#[acpi]
#acpid_socket=/var/run/acpid.socket
#[/acpi]

#[nforce2_atxp1]
#vcore_path=/some/path
#vcore_default=1500
#[/nforce2_atxp1]

#[sensors_plugin]
#sensors_conf=/some/file
#[/sensors_plugin]

[Profile]
name=On Demand High
minfreq=40%
maxfreq=100%
policy=ondemand
[/Profile]

[Profile]
name=On Demand Low
minfreq=20%
maxfreq=80%
policy=ondemand
[/Profile]

[Profile]
name=Performance High
minfreq=100%
maxfreq=100%
policy=performance
#exec_post=echo 8 > /proc/acpi/sony/brightness
[/Profile]

[Profile]
name=Performance Low
minfreq=80%
maxfreq=80%
policy=performance
[/Profile]

[Profile]
name=Powersave High
minfreq=70%
maxfreq=70%
policy=powersave
[/Profile]

[Profile]
name=Powersave Low
minfreq=30%
maxfreq=30%
policy=powersave
[/Profile]

#[Profile]
#name=Conservative High
#minfreq=33%
#maxfreq=100%
#policy=conservative
#[/Profile]
#
#[Profile]
#name=Conservative Low
#minfreq=0%
#maxfreq=66%
#policy=conservative
#[/Profile]

##
# Basic states
##
# when AC use performance mode
[Rule]
name=AC Rule
ac=on                    # (on/off)
profile=Performance High
[/Rule]
 
# conservative mode when not AC
[Rule]
name=AC Off - Low Battery
ac=off                   # (on/off)
battery_interval=0-30
#exec_post=echo 5 > /proc/acpi/sony/brightness
profile=Powersave Low
[/Rule]

# conservative mode when not AC
[Rule]
name=AC Off - Medium Battery
ac=off                   # (on/off)
battery_interval=30-70
#exec_post=echo 5 > /proc/acpi/sony/brightness
profile=On Demand Low
[/Rule]

# stay in performance mode for the first minutes
[Rule]
name=AC Off - High Power
ac=off                   # (on/off)
battery_interval=70-100
#exec_post=echo 5 > /proc/acpi/sony/brightness
profile=On Demand High
[/Rule]

##
# Special Rules
##
# CPU Too hot!
[Rule]
name=CPU Too Hot
acpi_temperature=55-100
cpu_interval=50-100
profile=Performance Low
[/Rule]

# use performance mode if I'm watching a movie
# I don't care for batteries! 
# But don't heat too much.
[Rule]
name=Movie Watcher
programs=xine,mplayer,gmplayer
battery_interval=0-100
acpi_temperature=0-60
cpu_interval=0-100
profile=Performance High
[/Rule]
I don't think this is what i was searching for...
I hope you can help me...
Thank you!!!

Last edited by jena; 01-05-2008 at 05:42 PM.
 
Old 01-07-2008, 07:22 AM   #9
jena
LQ Newbie
 
Registered: Jan 2008
Posts: 16

Original Poster
Rep: Reputation: 0
Can anyone help me?
Thank you!!!
 
Old 01-09-2008, 09:02 AM   #10
jena
LQ Newbie
 
Registered: Jan 2008
Posts: 16

Original Poster
Rep: Reputation: 0
The problem is a bug...like described here...
Thank you!!!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CPUFREQ won't retain ondemand setting 4TElevn Linux - Software 4 12-10-2007 12:09 PM
Cpufreq: setting ondemand failed Matz Linux - Laptop and Netbook 3 10-08-2007 02:26 AM
FC5, core duo T2600, cpufreq works just for cpu0 Tijn Linux - Hardware 3 10-16-2006 04:03 AM
anyone know how to setup 'ondemand' governor with cpufreq ? -=Graz=- Ubuntu 3 05-15-2006 06:21 PM
ATi TV Wonder Pro CX88 TV card: sound works, but uses wrong frequency Electrode Linux - Hardware 3 04-13-2005 12:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration