View previous topic :: View next topic |
Author |
Message |
mroconnor Guru
Joined: 24 Feb 2006 Posts: 402 Location: USA
|
Posted: Thu Jul 17, 2008 4:52 pm Post subject: cpufreqd issues - Cannot set policy |
|
|
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 |
|
|
avieth Veteran
Joined: 17 Sep 2004 Posts: 1945 Location: Canada
|
Posted: Thu Jul 17, 2008 5:35 pm Post subject: |
|
|
Are you sure that your CPU supports frequency scaling? |
|
Back to top |
|
|
mroconnor Guru
Joined: 24 Feb 2006 Posts: 402 Location: USA
|
Posted: Thu Jul 17, 2008 5:42 pm Post subject: |
|
|
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 |
|
|
avieth Veteran
Joined: 17 Sep 2004 Posts: 1945 Location: Canada
|
Posted: Thu Jul 17, 2008 6:05 pm Post subject: |
|
|
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 |
|
|
mroconnor Guru
Joined: 24 Feb 2006 Posts: 402 Location: USA
|
Posted: Thu Jul 17, 2008 6:37 pm Post subject: |
|
|
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 |
|
|
dark_knight Tux's lil' helper
Joined: 22 Apr 2006 Posts: 112
|
Posted: Thu Jul 17, 2008 9:47 pm Post subject: |
|
|
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 |
|
|
mroconnor Guru
Joined: 24 Feb 2006 Posts: 402 Location: USA
|
Posted: Fri Jul 18, 2008 2:55 pm Post subject: |
|
|
@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 |
|
|
Abraxas l33t
Joined: 25 May 2003 Posts: 814
|
Posted: Sun Jul 20, 2008 10:10 pm Post subject: |
|
|
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 |
|
|
mroconnor Guru
Joined: 24 Feb 2006 Posts: 402 Location: USA
|
Posted: Tue Jul 22, 2008 12:49 pm Post subject: |
|
|
@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 |
|
|
Abraxas l33t
Joined: 25 May 2003 Posts: 814
|
Posted: Tue Jul 29, 2008 1:56 pm Post subject: |
|
|
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 |
|
|
|