Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
cpufreqd issues - Cannot set policy
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
mroconnor
Guru
Guru


Joined: 24 Feb 2006
Posts: 402
Location: USA

PostPosted: Thu Jul 17, 2008 4:52 pm    Post subject: cpufreqd issues - Cannot set policy Reply with quote

I get this message in /var/log/messages about every 2 seconds:
Code:
Jul 17 12:41:01 cosmo cpufreqd: cpufreqd_loop            : Cannot set policy, Rule unchanged ("AC Rule").
Jul 17 12:41:03 cosmo cpufreqd: cpufreqd_set_profile     : Couldn't set profile "Performance Low" set for cpu0 (1667000-1667000-performance)
Jul 17 12:41:03 cosmo cpufreqd: cpufreqd_loop            : Cannot set policy, Rule unchanged ("AC Rule").
Jul 17 12:41:05 cosmo cpufreqd: cpufreqd_set_profile     : Couldn't set profile "Performance Low" set for cpu0 (1667000-1667000-performance)
Jul 17 12:41:05 cosmo cpufreqd: cpufreqd_loop            : Cannot set policy, Rule unchanged ("AC Rule").
Jul 17 12:41:07 cosmo cpufreqd: cpufreqd_set_profile     : Couldn't set profile "Performance Low" set for cpu0 (1667000-1667000-performance)
Jul 17 12:41:07 cosmo cpufreqd: cpufreqd_loop            : Cannot set policy, Rule unchanged ("AC Rule").
Jul 17 12:41:09 cosmo cpufreqd: cpufreqd_set_profile     : Couldn't set profile "Performance Low" set for cpu0 (1667000-1667000-performance)
Jul 17 12:41:09 cosmo cpufreqd: cpufreqd_loop            : Cannot set policy, Rule unchanged ("AC Rule").
Jul 17 12:41:11 cosmo cpufreqd: cpufreqd_set_profile     : Couldn't set profile "Performance Low" set for cpu0 (1667000-1667000-performance)
Jul 17 12:41:11 cosmo cpufreqd: cpufreqd_loop            : Cannot set policy, Rule unchanged ("AC Rule").
Jul 17 12:41:13 cosmo cpufreqd: cpufreqd_set_profile     : Couldn't set profile "Performance Low" set for cpu0 (1667000-1667000-performance)


What would cause that? I have all the governors in the kernel, I assume it is something in the config? Thanks for the assistance.
Back to top
View user's profile Send private message
avieth
Veteran
Veteran


Joined: 17 Sep 2004
Posts: 1945
Location: Canada

PostPosted: Thu Jul 17, 2008 5:35 pm    Post subject: Reply with quote

Are you sure that your CPU supports frequency scaling?
Back to top
View user's profile Send private message
mroconnor
Guru
Guru


Joined: 24 Feb 2006
Posts: 402
Location: USA

PostPosted: Thu Jul 17, 2008 5:42 pm    Post subject: Reply with quote

Code:
mroconnor@cosmo ~ $ uname -p
Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz


It just never goes past 1.0+Ghz anymore. :?
Back to top
View user's profile Send private message
avieth
Veteran
Veteran


Joined: 17 Sep 2004
Posts: 1945
Location: Canada

PostPosted: Thu Jul 17, 2008 6:05 pm    Post subject: Reply with quote

Did you check out this guide?

You should have ACPI drivers, particularly the "ACPI Processor P-States driver" which supports the Intel Core 2 Duo.

Also, check if you have this directory:

/sys/devices/system/cpu/cpu0/cpufreq
Back to top
View user's profile Send private message
mroconnor
Guru
Guru


Joined: 24 Feb 2006
Posts: 402
Location: USA

PostPosted: Thu Jul 17, 2008 6:37 pm    Post subject: Reply with quote

Yes I have done that and definitly have that directory. It seems that doing this:
Code:

 cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq


Always returns a value of 200000 when on AC and 1000000 when on battery. Nothing in between. Funny enough conky reads values of 1221687684560.00Ghz for cpu0/1.

Code:
cosmo coretemp.0 # cpufreq-info
cpufrequtils 002: cpufreq-info (C) Dominik Brodowski 2004-2006
Report errors and bugs to linux@brodo.de, please.
analyzing CPU 0:
  driver: acpi-cpufreq
  CPUs which need to switch frequency at the same time: 0 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, userspace, powersave, ondemand, performance
  current policy: frequency should be within 2.00 GHz and 2.00 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 2.00 GHz (asserted by call to hardware).
analyzing CPU 1:
  driver: acpi-cpufreq
  CPUs which need to switch frequency at the same time: 0 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, userspace, powersave, ondemand, performance
  current policy: frequency should be within 2.00 GHz and 2.00 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 2.00 GHz (asserted by call to hardware).
Back to top
View user's profile Send private message
dark_knight
Tux's lil' helper
Tux's lil' helper


Joined: 22 Apr 2006
Posts: 112

PostPosted: Thu Jul 17, 2008 9:47 pm    Post subject: Reply with quote

I have encountered the same problem, and probably other people too...
https://forums.gentoo.org/viewtopic-t-684833-highlight-cpufreqd.html
https://forums.gentoo.org/viewtopic-t-698691-highlight-cpufreqd.html

The only explanation that I've found so far is this one: with kernel 2.6.25, part of the frequency scaling handling was rewritten, adding some extra "features". One of these (this is an assumption of mine, I've not googled for it neither grepped the sources) is to avoid an inconsistent setting of the frequencies: the currently allowed minimum frequency, obviously, cannot be higher than the maximum one, so a script like this one should fail:
Code:
darkplace dark # cd /sys/devices/system/cpu/cpu0/cpufreq/
darkplace cpufreq # cat scaling_available_frequencies
1600000 1400000 1200000 1000000 800000 600000
darkplace cpufreq # cat scaling_governor scaling_max_freq scaling_min_freq
ondemand
1400000
600000
darkplace cpufreq # echo 1600000 > scaling_min_freq
bash: echo: write error: Invalid argument
darkplace cpufreq # cat scaling_governor scaling_max_freq scaling_min_freq
ondemand
1400000
600000

Indeed, it fails, and I don't recall seeing those failures before 2.6.25.
Probably cpufreqd (whose last release is dated 30 Nov 2006) does not follow the right order of operations when setting the minimum and maximum frequencies via sysfs, thus failing in changing the rule.

EDIT: Yes, my assumptions were correct. I investigated the issue and found that the incorrect code resides in the package sys-power/cpufrequtils, that handles policy change within the function sysfs_set_policy. A new version of cpufrequtils that solves the issue has been released (check version 004 @ http://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils.html ), but it is not in portage yet.
_________________
You can say that you are a true Gentoo-addicted when you type emerge --update --deep --newuse happiness.
Back to top
View user's profile Send private message
mroconnor
Guru
Guru


Joined: 24 Feb 2006
Posts: 402
Location: USA

PostPosted: Fri Jul 18, 2008 2:55 pm    Post subject: Reply with quote

@dark_knight: Thanks for the info, I can now stop emerging, re-emerging and triple check configs looking for where I went wrong.

/me waits for portage tree updates.
Back to top
View user's profile Send private message
Abraxas
l33t
l33t


Joined: 25 May 2003
Posts: 814

PostPosted: Sun Jul 20, 2008 10:10 pm    Post subject: Reply with quote

No need to wait for portage updates. Just copy the existing ebuild into an overlay and rename it to the latest version. You have to delete the "epatch" line because the patch doesn't work with the latest version but after that everything is working fine for me now.
Back to top
View user's profile Send private message
mroconnor
Guru
Guru


Joined: 24 Feb 2006
Posts: 402
Location: USA

PostPosted: Tue Jul 22, 2008 12:49 pm    Post subject: Reply with quote

@Abraxas:Thanks for the help, I'll do that today.

Not sure if you use conky but does this help conky display the correct CPU speed?

Thanks again.
Back to top
View user's profile Send private message
Abraxas
l33t
l33t


Joined: 25 May 2003
Posts: 814

PostPosted: Tue Jul 29, 2008 1:56 pm    Post subject: Reply with quote

mroconnor wrote:
@Abraxas:Thanks for the help, I'll do that today.

Not sure if you use conky but does this help conky display the correct CPU speed?

Thanks again.


I started using conky about six months ago and haven't had a problem with displaying the correct CPU speed.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum