Bug 628745 - CPU governor limit set at half of actual limit
Summary: CPU governor limit set at half of actual limit
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 13
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-30 22:22 UTC by bztdlinux
Modified: 2011-05-31 22:12 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-05-31 22:12:14 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
cpufreq-info > cpufreq-info.txt (1.28 KB, text/plain)
2010-08-30 22:22 UTC, bztdlinux
no flags Details

Description bztdlinux 2010-08-30 22:22:44 UTC
Created attachment 442051 [details]
cpufreq-info > cpufreq-info.txt

Description of problem:
On power-up, it seems that the ondemand governor for my CPU will only allow each core of my CPU to reach 1200MHz, half of the rated speed. The ondemand governor works fine, but only goes between 800MHz and 1200MHz (see below for workaround).

CPU version:
(model name      : Intel(R) Core(TM)2 Duo CPU     T7500  @ 2.20GHz)

Version-Release number of selected component (if applicable):
$ uname -r
2.6.33.8-149.fc13.x86_64


Steps to Reproduce:
1. Install Fedora on a T61p (or any T7xxx core 2 duo machine I would expect)
2. cat /proc/cpuinfo with a load running to see if maximum speed is reached
3. Install cpufreq-utils
4. Run cpufreq-info and check lower and upper bound freqencies.
  
Actual results:
cpufreq-info: (relevant part displayed, full attached)
  current policy: frequency should be within 800 MHz and 1.20 GHz.
                  The governor "ondemand" may decide which speed to use

Expected results:
cpufreq-info:
  current policy: frequency should be within 800 MHz and 2.20 GHz.
                  The governor "ondemand" may decide which speed to use

Additional info:
There is a workaround to this problem. Installing cpufreq-utils and issuing the following two commands as root will allow the CPU to reach maximum speed:

cpufreq-set --cpu 0 --max 2200MHz
cpufreq-set --cpu 1 --max 2200MHz

Adjust for your CPU speed and number of cores.
The strange thing about this is that only CPU 1 persists after a reboot - cpu 0 gets reset to a max speed of 1200MHz. I would guess that the policy of CPU 1 does not do anything, as both CPUs are tied to the same clock as shown in the cpuinfo log. After a restart and before applying the workaround, the same problem still exists. One small oddity will show up - sometimes cpufreq-info will report different frequencies for each processor, which is impossible and might be related to them being set at different max speeds.

I'm not sure that this is entirely related to the Linux kernel - I'm not sure what, if any, userspace program is responsible for setting the limits and governor. I'm using KDE 4 whose power manager lacks support for changing governor, etc - so I don't believe that is the problem.

Comment 1 Chuck Ebbert 2010-09-01 06:45:29 UTC
Please try kernel-2.6.34.6-47 and see if the problem persists there.

Comment 2 bztdlinux 2010-09-03 13:27:40 UTC
I installed kernel-2.6.34.6-47 along with the other latest updates and the problem still persists - on reboot, both of my cores still look like this:

  hardware limits: 800 MHz - 2.20 GHz
  available frequency steps: 2.20 GHz, 2.20 GHz, 1.60 GHz, 1.20 GHz, 800 MHz
  available cpufreq governors: ondemand, userspace, performance
  current policy: frequency should be within 800 MHz and 1.20 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.

Comment 3 bztdlinux 2010-09-08 19:07:38 UTC
On further inspection, the cpuspeed init script seems in charge of setting this - and also seems to do it incorrectly on bootup... I don't know if this is because my bios or some other /sys file is telling it so, or if this a bug in the script.

Comment 4 Chuck Ebbert 2010-09-14 05:34:09 UTC
Is there anything in /etc/sysconfig/cpuspeed that's overriding the default values?

Comment 5 bztdlinux 2010-09-15 03:50:39 UTC
No, /etc/sysconfig/cpuspeed is left at default. Reading the cpuspeed init.d script, I can't see any errors, so I think the kernel is reporting the wrong max speed for a little while, but then switching to the right max speed too late as the cpuspeed service has already started.

I'm not really sure what would cause a lower max... possibly the bios is enforcing a limit? I might add some debug lines and see where the limit is coming from in /etc/init.d/cpuspeed.

Comment 6 bztdlinux 2010-11-04 23:35:30 UTC
I discovered the problem - it's actually the BIOS speed limit... I replaced my 90w power adapter, and I now realize that it's a 65w one... therefore the BIOS is limiting the CPU frequency to 1.2ghz while on main power. However, the bios limit as read from /sys intermittently showed the 1.2ghz limit (sometimes going to 2.2), but now on F14 it's consistenly at 1.2 with power. CPU speed jumps to normal when removing power (so running from battery).

Comment 7 Bug Zapper 2011-05-31 14:58:18 UTC
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '13'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 13's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 13 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 8 bztdlinux 2011-05-31 22:12:14 UTC
This bug should be closed. It's an issue with Thinkpad laptops while charging the battery while using an under-spec'd power adapter (65W instead of 90w).


Note You need to log in before you can comment on or make changes to this bug.