Bug 447975

Summary: 2.5GHz Q9300 CPU frequency defaults to 2.0
Product: [Fedora] Fedora Reporter: Henri Ala-Peijari <redhatbugzilla>
Component: gnome-power-managerAssignee: David Zeuthen <davidz>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 9CC: davej, drees76, jarod, mclasen, nhorman, richard
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-04-15 16:11:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Henri Ala-Peijari 2008-05-22 18:19:25 UTC
Description of problem:
Intel Q9300 quad-core cpu and DG33FBC motherboard + Fedora 9 64bit. CPU runs at
2.0ghz (add-to-panel CPU frequency scaling monitor for each core). Every time I
boot the system, I have to change each core from 2.0Ghz to 2.5Ghz. 
Checked with BOINC and result was about 5500MIPS and when changed to higher cpu
frequency result was about 6900MIPS.

Version-Release number of selected component (if applicable):


How reproducible:
Every time Fedora is booted, CPU is scaled to 2.0Ghz as default.

Steps to Reproduce:
1.Boot fedora9 64bit on DG33BFC with Q9300 CPU
2.Log on and check cpu frequency monitor for each core.
3.CPU has been scaled to 2.0Ghz but can be changed to 2.5 from the software.
Settings can't be saved so after next boot same problem.
  
Actual results:
Q9300 CPU scaled to 2.0Ghz

Expected results:
Q9300 CPU frequency at 2.5Ghz

Additional info:

Comment 1 Dave Jones 2008-05-22 18:52:27 UTC
ah, I bet this is one of those 'run loads in the background when idle' kind of
apps..  For these, we have a tunable.

try..

echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/ignore_nice_load
echo 0 > /sys/devices/system/cpu/cpu1/cpufreq/ondemand/ignore_nice_load
echo 0 > /sys/devices/system/cpu/cpu2/cpufreq/ondemand/ignore_nice_load
echo 0 > /sys/devices/system/cpu/cpu3/cpufreq/ondemand/ignore_nice_load


Comment 2 Henri Ala-Peijari 2008-05-22 20:39:31 UTC
Thanks, I just needed to enter the first line (echo 0 >
/sys/devices/system/cpu/cpu0/cpufreq/ondemand/ignore_nice_load) and it changed
performance for all cores (cpu1...etc don't even have the ignore_nice_load file). 

I tried putting this command on my /etc/rc.d/rc.local but it didn't work. Where
should I put this command to run it after boot? 

In my humble opinion this should be the default and a lot of people - or should
we say many BOINC projects - will end up with -25% CPU power. I didn't even
notice significant power consumption difference (but I acknowledge that my
wattage meter may not be completely accurate in measuring computer PSU's) so I
don't see any point why the default should not be 100%. 


Comment 3 Dave Jones 2008-05-22 20:56:48 UTC
actually, thinking about it, that _should_ be the default.  Checking confirms,
that is the kernel default.  It looks like /etc/sysconfig/cpuspeed should
control it, but even when IGNORE_NICE there is set to 0, something is changing
it to a 1

Comment 4 Henri Ala-Peijari 2008-05-22 21:07:51 UTC
I talked about this on the SETI@home website 
http://setiathome.berkeley.edu/forum_thread.php?id=47203
and they pointed out that some BIOSes now have the EIST. I disabled the
"Enhanced Intel SpeedStep" from the BIOS and everything works.


Comment 5 Dave Jones 2008-05-22 21:53:48 UTC
So I tracked this down.  This gets set to '1' when we log into gnome, when
gnome-power-manager starts up.

This code...

        on_ac = gpm_ac_adapter_is_present (cpufreq->priv->ac_adapter);

        if (on_ac == TRUE) {
                gpm_conf_get_bool (cpufreq->priv->conf,
GPM_CONF_CPUFREQ_USE_NICE, &cpufreq_consider_nice);
                gpm_conf_get_string (cpufreq->priv->conf,
GPM_CONF_CPUFREQ_POLICY_AC, &cpufreq_policy);
                gpm_conf_get_uint (cpufreq->priv->conf,
GPM_CONF_CPUFREQ_PERFORMANCE_AC, &cpufreq_performance);
        } else {
                gpm_conf_get_bool (cpufreq->priv->conf,
GPM_CONF_CPUFREQ_USE_NICE, &cpufreq_consider_nice);
                gpm_conf_get_string (cpufreq->priv->conf,
GPM_CONF_CPUFREQ_POLICY_BATT, &cpufreq_policy);
                gpm_conf_get_uint (cpufreq->priv->conf,
GPM_CONF_CPUFREQ_PERFORMANCE_BATT, &cpufreq_performance);
        }

seems to want to only adjust settings when we're on battery, but as you can see,
we do exactly the same thing for the nice setting regardless of power source.

Comment 6 Dave Jones 2008-06-30 19:40:03 UTC
*** Bug 453460 has been marked as a duplicate of this bug. ***

Comment 7 Richard Hughes 2009-04-15 16:11:59 UTC
All this code got ripped out long ago from g-p-m.