# 2.6.23: CPU-Frequency limited to 1GHz when under load

## enkil

Ever since I upgraded to 2.6.23-gentoo, my CPU frequency scaling seems to be broken somehow. Whenever there is load on the CPU, the frequency range changes from 1.00GHz - 2.00GHz to 1.00GHz - 1.00GHz (limiting the CPU to 1.00GHz). CPU is a Core2Duo T7200.

This only happens with 2.6.23-gentoo, previous kernels (e.g 2.6.22-gentoo-r8) doesn't show this behaviour...

Here's the output from acpitool:

```
  CPU type               : Intel(R) Core(TM)2 CPU         T7200  @ 2.00GHz 

  Min/Max frequency      : 1000/2000 MHz

  Current frequency      : 1000 MHz

  Frequency governor     : ondemand 

  Freq. scaling driver   : acpi-cpufreq 

  Cache size             : 4096 KB

  Bogomips               : 3994.11 

  Bogomips               : 3990.08 

  # of CPU's found       : 2

  Processor ID           : 0

  Bus mastering control  : yes

  Power management       : yes

  Throttling control     : yes

  Limit interface        : yes

  Active C-state         : C3

  C-states (incl. C0)    : 4

  Usage of state C1      : 13880 (2.7 %)

  Usage of state C2      : 85894 (16.7 %)

  Usage of state C3      : 415525 (80.6 %)

  T-state count          : 8

  Active T-state         : T0

  Processor ID           : 1

  Bus mastering control  : yes

  Power management       : yes

  Throttling control     : yes

  Limit interface        : yes

  Active C-state         : C3

  C-states (incl. C0)    : 4

  Usage of state C1      : 19260 (1.9 %)

  Usage of state C2      : 217470 (21.5 %)

  Usage of state C3      : 359383 (35.5 %)

  T-state count          : 8

  Active T-state         : T0

  Thermal zone 1 : ok, 44 C

  Trip points : 

  ------------- 

  critical (S5):           127 C

  Thermal zone 2 : ok, 42 C

  Trip points : 

  ------------- 

  critical (S5):           99 C

  passive:                 95 C: tc1=5 tc2=4 tsp=600 devices=CPU0 CPU1 
```

Kernel config for ACPI / Frequency scaling:

```
#

# Power management options (ACPI, APM)

#

CONFIG_PM=y

# CONFIG_PM_LEGACY is not set

# CONFIG_PM_DEBUG is not set

CONFIG_PM_SLEEP_SMP=y

CONFIG_PM_SLEEP=y

CONFIG_SUSPEND_SMP_POSSIBLE=y

CONFIG_SUSPEND=y

CONFIG_HIBERNATION_SMP_POSSIBLE=y

# CONFIG_HIBERNATION is not set

CONFIG_ACPI=y

CONFIG_ACPI_SLEEP=y

# CONFIG_ACPI_PROCFS is not set

CONFIG_ACPI_PROC_EVENT=y

CONFIG_ACPI_AC=y

CONFIG_ACPI_BATTERY=y

CONFIG_ACPI_BUTTON=y

# CONFIG_ACPI_VIDEO is not set

CONFIG_ACPI_FAN=y

CONFIG_ACPI_DOCK=y

# CONFIG_ACPI_BAY is not set

CONFIG_ACPI_PROCESSOR=y

CONFIG_ACPI_HOTPLUG_CPU=y

CONFIG_ACPI_THERMAL=y

# CONFIG_ACPI_ASUS is not set

# CONFIG_ACPI_TOSHIBA is not set

CONFIG_ACPI_BLACKLIST_YEAR=2001

CONFIG_ACPI_DEBUG=y

# CONFIG_ACPI_DEBUG_FUNC_TRACE is not set

CONFIG_ACPI_EC=y

CONFIG_ACPI_POWER=y

CONFIG_ACPI_SYSTEM=y

CONFIG_X86_PM_TIMER=y

CONFIG_ACPI_CONTAINER=y

#

# CPU Frequency scaling

#

CONFIG_CPU_FREQ=y

CONFIG_CPU_FREQ_TABLE=y

CONFIG_CPU_FREQ_DEBUG=y

# CONFIG_CPU_FREQ_STAT is not set

# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set

CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y

CONFIG_CPU_FREQ_GOV_PERFORMANCE=y

CONFIG_CPU_FREQ_GOV_POWERSAVE=y

CONFIG_CPU_FREQ_GOV_USERSPACE=y

CONFIG_CPU_FREQ_GOV_ONDEMAND=y

CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y

#

# CPUFreq processor drivers

#

CONFIG_X86_ACPI_CPUFREQ=y

# CONFIG_X86_POWERNOW_K6 is not set

# CONFIG_X86_POWERNOW_K7 is not set

# CONFIG_X86_POWERNOW_K8 is not set

# CONFIG_X86_GX_SUSPMOD is not set

# CONFIG_X86_SPEEDSTEP_CENTRINO is not set

# CONFIG_X86_SPEEDSTEP_ICH is not set

# CONFIG_X86_SPEEDSTEP_SMI is not set

# CONFIG_X86_P4_CLOCKMOD is not set

# CONFIG_X86_CPUFREQ_NFORCE2 is not set

# CONFIG_X86_LONGRUN is not set

# CONFIG_X86_LONGHAUL is not set

# CONFIG_X86_E_POWERSAVER is not set

#

# shared options

#

# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set

# CONFIG_X86_SPEEDSTEP_LIB is not set
```

Any ideas?Last edited by enkil on Wed Oct 24, 2007 11:44 am; edited 1 time in total

----------

## snIP3r

hi!

i don't know if this is a good idea but i would reinstall the cpufreqd and then restart the daemon. perhaps this might help...

HTH

snIP3r

----------

## enkil

I'm currently not using cpufreqd... I'm setting the governor to ondemand via cpufrequtils. I think this is a kernel-issue, because this problem onlyhappens with 2.6.23. I tried to shut down everything that could possibly control frequency scaling, but even when I'm on a console without X or acpid the same thing happens: When the CPU is under load for like 30 seconds, the max frequency is set to 1.00 GHz. When I change the governor to e.g. performance, max frequency is still set to 1.00 GHz.

When the CPU is idle again for maybe one minute, max frequency is returned to 2.00 GHz. Could be that acpi is trying to avoid overheating or something, but the CPU temperature is far below critical. Usually the CPU idles at 40-45°C, AFAIK the temperature gets critical way obove 100°C for mobile Core2Duo CPUs.

----------

## toralf

Do you use CONFIG_X86_ACPI_CPUFREQ or CONFIG_X86_SPEEDSTEP_CENTRINO ?

----------

## enkil

I'm using CONFIG_X86_ACPI_CPUFREQ. I tried using Enhanced Speedstep, but I get no frequency scaling at all with Enhanced Speedstep.

----------

## Ishiki

I've similar problem. My CPU is Core 2 Duo T5500 on a notebook. With 2.6.22 everything runs flawlessly, but 2.6.23 prevents me from using frequency scaling. I can't even load speedstep_centrino module (fails with 'no such device'), and I have CONFIG_X86_ACPI_CPUFREQ=y...

Any ideas ?

----------

## HymnToLife

 *Ishiki wrote:*   

>  I can't even load speedstep_centrino module (fails with 'no such device'), and I have CONFIG_X86_ACPI_CPUFREQ=y...
> 
> Any ideas ?

 

Load acpi-cpufreq instead.

----------

## toralf

 *HymnToLife wrote:*   

>  *Ishiki wrote:*    I can't even load speedstep_centrino module (fails with 'no such device'), and I have CONFIG_X86_ACPI_CPUFREQ=y...
> 
> Any ideas ? 
> 
> Load acpi-cpufreq instead.

 And furthermore the centrino modul is deprecated in future kernel versins and fully replaced by the acpi module.

----------

## HymnToLife

 *toralf wrote:*   

>  *HymnToLife wrote:*    *Ishiki wrote:*    I can't even load speedstep_centrino module (fails with 'no such device'), and I have CONFIG_X86_ACPI_CPUFREQ=y...
> 
> Any ideas ? 
> 
> Load acpi-cpufreq instead. And furthermore the centrino modul is deprecated in future kernel versins and fully replaced by the acpi module.

 

Well, it's been like this since 2.6.19

----------

## Ishiki

Yes, acpi-cpufreq, in theory, should support Core 2 Duo, but only in theory, as modprobe acpi-cpufreq results in "no such device".

acpi-cpufreq does nothing in 2.6.22 also, where I have to load speedstep_centrino for CPU freq. to work. In 2.6.23 nothing is right...

----------

## arwing

I seem to have the same issue with my Core 2 Quadro using the 2.6.23 acpi_cpufreq module.

cpufreq-info tells me  

```

analyzing CPU 0:

  driver: acpi-cpufreq

  CPUs which need to switch frequency at the same time: 0

  hardware limits: 600 MHz - 900 MHz

  available frequency steps: 900 MHz, 600 MHz

  available cpufreq governors: conservative, ondemand, powersave, userspace, performance

  current policy: frequency should be within 600 MHz and 900 MHz.

                  The governor "ondemand" may decide which speed to use

                  within this range.

  current CPU frequency is 900 MHz (asserted by call to hardware).

```

for all four cores.

I might have some fuzzy math skills but 900 MHz is far from 2.4 GHz  

all the cores switch perfectly between 600MHz and 900MHz under load.

I expect it might be a BIOS misconfiguration, but I'd have no idea where to look.

----------

## daithi

Similar issue for me here. Just went to tuxonice-2.6.23-r1 and had the same CPU freq scaling options selected. Back to older kernel for me!

----------

## kries

I have the same problem with my Core2 and 2.6.23.

Under load it steps back to 1000.

Has anybody found a solution for this problem?

```
processor       : 0

vendor_id       : GenuineIntel

cpu family      : 6

model           : 15

model name      : Intel(R) Core(TM)2 CPU         T7200  @ 2.00GHz

stepping        : 6

cpu MHz         : 2000.000

cache size      : 4096 KB

physical id     : 0

siblings        : 2

core id         : 0

cpu cores       : 2

fdiv_bug        : no

hlt_bug         : no

f00f_bug        : no

coma_bug        : no

fpu             : yes

fpu_exception   : yes

cpuid level     : 10

wp              : yes

flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr lahf_lm

bogomips        : 3997.90

clflush size    : 64

processor       : 1

vendor_id       : GenuineIntel

cpu family      : 6

model           : 15

model name      : Intel(R) Core(TM)2 CPU         T7200  @ 2.00GHz

stepping        : 6

cpu MHz         : 2000.000

cache size      : 4096 KB

physical id     : 0

siblings        : 2

core id         : 1

cpu cores       : 2

fdiv_bug        : no

hlt_bug         : no

f00f_bug        : no

coma_bug        : no

fpu             : yes

fpu_exception   : yes

cpuid level     : 10

wp              : yes

flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr lahf_lm

bogomips        : 3994.66

clflush size    : 64
```

at 95° coretemp it gradually lowers the freq to 1000.

cat /proc/acpi/thermal_zone/THM/trip_points says:

```
critical (S5):           126 C
```

/var/log/messages:

```
Nov 28 19:30:11 localhost acpid: notifying client 10422[103:443]

Nov 28 19:30:11 localhost acpid: notifying client 11519[0:0]

Nov 28 19:30:11 localhost acpid: notifying client 24625[0:0]

Nov 28 19:30:11 localhost acpid: notifying client 26152[0:0]

Nov 28 19:30:11 localhost acpid: executing action "/etc/acpi/default.sh processor CPU1 00000080 00000001"

Nov 28 19:30:11 localhost logger: ACPI event unhandled: processor CPU1 00000080 00000001

Nov 28 19:30:11 localhost acpid: action exited with status 0

Nov 28 19:30:11 localhost acpid: completed event "processor CPU1 00000080 00000001"

Nov 28 19:30:40 localhost acpid: received event "processor CPU0 00000080 00000002"

Nov 28 19:30:40 localhost acpid: notifying client 10422[103:443]

Nov 28 19:30:40 localhost acpid: notifying client 11519[0:0]

Nov 28 19:30:40 localhost acpid: notifying client 24625[0:0]

Nov 28 19:30:40 localhost acpid: notifying client 26152[0:0]

Nov 28 19:30:40 localhost acpid: executing action "/etc/acpi/default.sh processor CPU0 00000080 00000002"

Nov 28 19:30:40 localhost logger: ACPI event unhandled: processor CPU0 00000080 00000002

Nov 28 19:30:40 localhost acpid: action exited with status 0

Nov 28 19:30:40 localhost acpid: completed event "processor CPU0 00000080 00000002"

Nov 28 19:30:40 localhost acpid: received event "processor CPU1 00000080 00000002"

Nov 28 19:30:40 localhost acpid: notifying client 10422[103:443]

Nov 28 19:30:40 localhost acpid: notifying client 11519[0:0]

Nov 28 19:30:40 localhost acpid: notifying client 24625[0:0]

Nov 28 19:30:40 localhost acpid: notifying client 26152[0:0]

Nov 28 19:30:40 localhost acpid: executing action "/etc/acpi/default.sh processor CPU1 00000080 00000002"

Nov 28 19:30:40 localhost logger: ACPI event unhandled: processor CPU1 00000080 00000002

Nov 28 19:30:40 localhost acpid: action exited with status 0

Nov 28 19:30:40 localhost acpid: completed event "processor CPU1 00000080 00000002"

```

any ideas?

thanks,

kries

----------

## aysther

I also have a similar problem, with a Core 2 Q6600 I get the following:

```
quadshark ~ # modprobe acpi_cpufreq

FATAL: Error inserting acpi_cpufreq (/lib/modules/2.6.23-gentoo-r3/kernel/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.ko): No such device

quadshark ~ # 
```

So I don't know what to do with that. I've tried googling and I don't get much.

----------

## aguettinger

I don't now if this is related, but the ondemand governor behaves strange on my Athlon64 3400+. Very unpredictable.

When running 'prime95 -t' torture stress test in the terminal with ondemand,  the frequency stays at 1 Ghz.

```
cpufrequtils 002: cpufreq-info (C) Dominik Brodowski 2004-2006

Report errors and bugs to linux@brodo.de, please.

analyzing CPU 0:

  driver: powernow-k8

  CPUs which need to switch frequency at the same time: 0

  hardware limits: 1000 MHz - 2.40 GHz

  available frequency steps: 2.40 GHz, 2.20 GHz, 2.00 GHz, 1.80 GHz, 1000 MHz

  available cpufreq governors: conservative, ondemand, powersave, userspace, performance

  current policy: frequency should be within 1000 MHz and 2.40 GHz.

                  The governor "ondemand" may decide which speed to use

                  within this range.

  current CPU frequency is 1000 MHz (asserted by call to hardware).
```

When I switch to conservative, the CPU frequency immediately rises to 2.4 Ghz.

```

cpufrequtils 002: cpufreq-info (C) Dominik Brodowski 2004-2006

Report errors and bugs to linux@brodo.de, please.

analyzing CPU 0:

  driver: powernow-k8

  CPUs which need to switch frequency at the same time: 0

  hardware limits: 1000 MHz - 2.40 GHz

  available frequency steps: 2.40 GHz, 2.20 GHz, 2.00 GHz, 1.80 GHz, 1000 MHz

  available cpufreq governors: conservative, ondemand, powersave, userspace, performance

  current policy: frequency should be within 1000 MHz and 2.40 GHz.

                  The governor "conservative" may decide which speed to use

                  within this range.

  current CPU frequency is 2.40 GHz (asserted by call to hardware).
```

And switching back to ondemand: $echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

```

cpufrequtils 002: cpufreq-info (C) Dominik Brodowski 2004-2006

Report errors and bugs to linux@brodo.de, please.

analyzing CPU 0:

  driver: powernow-k8

  CPUs which need to switch frequency at the same time: 0

  hardware limits: 1000 MHz - 2.40 GHz

  available frequency steps: 2.40 GHz, 2.20 GHz, 2.00 GHz, 1.80 GHz, 1000 MHz

  available cpufreq governors: conservative, ondemand, powersave, userspace, performance

  current policy: frequency should be within 1000 MHz and 2.40 GHz.

                  The governor "ondemand" may decide which speed to use

                  within this range.

  current CPU frequency is 1000 MHz (asserted by call to hardware).
```

Is conservative more conservative than ondeman? Or is ondmean broken?

However, on ondemand, if I move this firefox window only some inches it jumps to 2.4 Ghz and back to 1 Ghz. Or if I scroll up and down with my mouse in this window. So why not during a torture test?

I stick to 'conservative' for the moment.

regards

Andy

PS: When I press the submit button, the frequency also jumps to 2.4 Ghz and back to 1 Ghz.

```
Portage 2.1.3.19 (default-linux/amd64/2007.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.23-gentoo-r3 x86_64)

=================================================================

System uname: 2.6.23-gentoo-r3 x86_64 AMD Athlon(tm) 64 Processor 3400+

Timestamp of tree: Tue, 18 Dec 2007 03:00:01 +0000

ccache version 2.4 [enabled]

app-shells/bash:     3.2_p17

dev-java/java-config: 1.3.7, 2.0.33-r1

dev-lang/python:     2.4.4-r6

dev-python/pycrypto: 2.0.1-r6

dev-util/ccache:     2.4-r7

sys-apps/baselayout: 1.12.9-r2

sys-apps/sandbox:    1.2.18.1-r2

sys-devel/autoconf:  2.13, 2.61-r1

sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10

sys-devel/binutils:  2.18-r1

sys-devel/gcc-config: 1.3.16

sys-devel/libtool:   1.5.24

virtual/os-headers:  2.6.22-r2

ACCEPT_KEYWORDS="amd64"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-march=k8 -O2 -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/share/X11/xkb"

CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/udev/rules.d"

CXXFLAGS="-march=k8 -O2 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="ccache distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"

GENTOO_MIRRORS="http://mirror.switch.ch/ftp/mirror/gentoo/ http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"

LANG="en_GB"

LC_ALL="en_GB"

LINGUAS="en en_GB de fr it"

MAKEOPTS="-j2"

PKGDIR="/usr/portage/packages"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY="/usr/local/portage"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="X a52 aac acl acpi aim alsa amd64 avahi berkdb bitmap-fonts cairo caps cdr clamav cli cracklib crypt cups dbus divx dlloader dri dvd dvdr dvdread eds emacs emboss encode esd evo exif fam ffmpeg firefox flac foomaticdb fortran gdbm gif gnome gpm gstreamer gtk gtk2 hal iconv ipod ipv6 isdnlog jpeg kerberos ldap lm_sensors mad midi mikmod mmx mp3 mpeg mplayer mudflap ncurses nls nomirrors nptl nptlonly ogg opengl openmp oss pam pcre pdf perl png ppds pppd python qt3support quicktime readline reflection sdl session spell spl sse sse2 ssl svg tcpd tiff truetype truetype-fonts type1-fonts unicode vorbis xcomposite xml xorg xscreensaver xv xvid zlib" ALSA_CARDS="via82xx" ALSA_PCM_PLUGINS="dmix" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="canon" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_GB de fr it" USERLAND="GNU" VIDEO_CARDS="nvidia"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

```

----------

## aysther

I solved my problem by flashing the BIOS of my motherboard to the most recent version. Everything works fine now. It was a GA-X38T-Q6 .

----------

