Difference between revisions of "Problem with CPU frequency scaling"

From ThinkWiki
Jump to: navigation, search
m
(Explain the 65W AC adapter limitation. Remove potentially hardware-damaging _PPC "workaround")
Line 1: Line 1:
 
{{stub}}
 
{{stub}}
 +
 +
{{WARN|CPU frequency limitation is a safety feature of your ThinkPad, do not work around it!  If you have set the BIOS to performance mode and it is still limiting maximum CPU frequency, there is almost always a damn good reason for that}}
  
 
==Symptom==
 
==Symptom==
If the battery pack is removed and the laptop is powered by AC only, the CPU downclocks to the lowest multiplier and remains locked in low speed. This happens irrespective of the scaling method in use (kernelspace or userspace) and of the frequency governor selected (ondemand, performance, etc.).
+
If the battery pack is removed and the laptop is powered by a 65W AC adapter only, the CPU downclocks to the lowest multiplier and remains locked in low speed. This happens irrespective of the scaling method in use (kernelspace or userspace) and of the frequency governor selected (ondemand, performance, etc.).
  
 
Output of cpufreq-info (on AC power without battery):
 
Output of cpufreq-info (on AC power without battery):
Line 52: Line 54:
 
   current CPU frequency is 1000 MHz (asserted by call to hardware).
 
   current CPU frequency is 1000 MHz (asserted by call to hardware).
  
==Solution==
+
==Explanation==
Other than using the laptop with the battery pack always inserted, no solution is known at this point.
 
  
 +
The 65W AC adaptor does not supply enough power to handle peak power draws from the CPU/disk/GPU on the later ThinkPads.  The battery is required to supply the peak demand and ensure correct system operation.
  
'''Update:'''
+
Messing with this can cause data loss, data corruption, and hardware damage.
  
On my Z61m with a T5500 I had the same problem.
+
==Solution==
After several hours of debugging I noticed, that my ACPI BIOS returns another _PPC value (2) than at boot-time with batery (0).
 
The Kernel-code says:
 
        /*
 
        * _PPC indicates the maximum state currently supported by the platform
 
        * (e.g. 0 = states 0..n; 1 = states 1..n; etc.
 
        */
 
Thats mean, that my Bios says, after batery release only state 2 is possible. There is already a (for me unknown and undocumented) Patch for such a worse ACPI BIOS:
 
  
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=623b78c39c4525731f852072edd742cc4fba6786
+
# Buy a 90W AC adapter
 +
# Don't use the laptop without the battery pack
  
You only have to add "processor.ignore_ppc=1" to your kernel parameters and everything works fine.
+
Other than using the laptop with the battery pack always inserted, no solution is known at this point.
  
Tested with 2.6.26-rc1 on a Z61m with a 1.67GHz T5500 Processor.
+
== Affected Models ==
 
 
'''Update 2:'''
 
  
The Patch above seems to be available since 2.6.25
+
* {{Z61m}}
 +
* {{T61}}
 +
* {{T60p}}
  
== Affected Models ==
+
Probably ALL Lenovo ThinkPads.  One can actually track this through the DSDT, but it is not worth the effort.
{{Z61m}}<br />
 
{{T61}}<br />
 
{{T60p}}
 

Revision as of 03:35, 5 November 2010

This page is a stub

You can help ThinkWiki by expanding it.

ATTENTION!
CPU frequency limitation is a safety feature of your ThinkPad, do not work around it! If you have set the BIOS to performance mode and it is still limiting maximum CPU frequency, there is almost always a damn good reason for that

Symptom

If the battery pack is removed and the laptop is powered by a 65W AC adapter only, the CPU downclocks to the lowest multiplier and remains locked in low speed. This happens irrespective of the scaling method in use (kernelspace or userspace) and of the frequency governor selected (ondemand, performance, etc.).

Output of cpufreq-info (on AC power without battery):

 analyzing CPU 0:
 driver: centrino
 CPUs which need to switch frequency at the same time: 0 1
 hardware limits: 1000 MHz - 1.83 GHz
 available frequency steps: 1.83 GHz, 1.33 GHz, 1000 MHz
 available cpufreq governors: ondemand, userspace, powersave, performance
 current policy: frequency should be within 1000 MHz and 1000 MHz.
                 The governor "ondemand" may decide which speed to use
                 within this range.
 current CPU frequency is 1000 MHz (asserted by call to hardware).
 
 analyzing CPU 1:
 driver: centrino
 CPUs which need to switch frequency at the same time: 0 1
 hardware limits: 1000 MHz - 1.83 GHz
 available frequency steps: 1.83 GHz, 1.33 GHz, 1000 MHz
 available cpufreq governors: ondemand, userspace, powersave, performance
 current policy: frequency should be within 1000 MHz and 1000 MHz.
                 The governor "ondemand" may decide which speed to use
                 within this range.
 current CPU frequency is 1000 MHz (asserted by call to hardware).

Output of cpufreq-info (on AC power with battery plugged in):

 analyzing CPU 0:
 driver: centrino
 CPUs which need to switch frequency at the same time: 0 1
 hardware limits: 1000 MHz - 1.83 GHz
 available frequency steps: 1.83 GHz, 1.33 GHz, 1000 MHz
 available cpufreq governors: ondemand, userspace, powersave, performance
 current policy: frequency should be within 1000 MHz and 1.83 GHz.
                 The governor "ondemand" may decide which speed to use
                 within this range.
 current CPU frequency is 1000 MHz (asserted by call to hardware).
 
 analyzing CPU 1:
 driver: centrino
 CPUs which need to switch frequency at the same time: 0 1
 hardware limits: 1000 MHz - 1.83 GHz
 available frequency steps: 1.83 GHz, 1.33 GHz, 1000 MHz
 available cpufreq governors: ondemand, userspace, powersave, performance
 current policy: frequency should be within 1000 MHz and 1.83 GHz.
                 The governor "ondemand" may decide which speed to use
                 within this range.
 current CPU frequency is 1000 MHz (asserted by call to hardware).

Explanation

The 65W AC adaptor does not supply enough power to handle peak power draws from the CPU/disk/GPU on the later ThinkPads. The battery is required to supply the peak demand and ensure correct system operation.

Messing with this can cause data loss, data corruption, and hardware damage.

Solution

  1. Buy a 90W AC adapter
  2. Don't use the laptop without the battery pack

Other than using the laptop with the battery pack always inserted, no solution is known at this point.

Affected Models

Probably ALL Lenovo ThinkPads. One can actually track this through the DSDT, but it is not worth the effort.