Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Gentoo User (http://www.linux-archive.org/gentoo-user/)
-   -   Core i7 M620 power management problem (http://www.linux-archive.org/gentoo-user/470269-core-i7-m620-power-management-problem.html)

"Stefan G. Weichinger" 12-29-2010 05:35 PM

Core i7 M620 power management problem
 
Am 29.12.2010 18:40, schrieb Paul Hartman:

> So it seems similar to yours except that your max_freq and min_freq
> are the same! Which matches what you say about it never going faster
> than the minimum speed.

cpufreq-set -u ?

Bill Longman 12-29-2010 05:48 PM

Core i7 M620 power management problem
 
On Wed, Dec 29, 2010 at 10:35 AM, Stefan G. Weichinger <lists@xunil.at> wrote:

Am 29.12.2010 18:40, schrieb Paul Hartman:



> So it seems similar to yours except that your max_freq and min_freq

> are the same! Which matches what you say about it never going faster

> than the minimum speed.



cpufreq-set -u ?




10:46:36# cpufreq-set -u 2667000
~
10:47:00# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_*
2667000 2666000 2533000 2399000 2266000 2133000 1999000 1866000 1733000 1599000 1466000 1333000 1199000

conservative ondemand userspace powersave performance
1199000
acpi-cpufreq
performance
1199000
1199000
<unsupported>

See what I mean?
--
Bill Longman

"Stefan G. Weichinger" 12-29-2010 06:55 PM

Core i7 M620 power management problem
 
Am 29.12.2010 19:48, schrieb Bill Longman:

> 10:47:00# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_*
> 2667000 2666000 2533000 2399000 2266000 2133000 1999000 1866000 1733000
> 1599000 1466000 1333000 1199000
> conservative ondemand userspace powersave performance
> 1199000
> acpi-cpufreq
> performance
> 1199000
> 1199000
> <unsupported>
>
> See what I mean?

I see it but I don't have a solution.

Maybe some strange limitation within the BIOS of the motherboard?
Ah, you wrote that Win does fine ... so ...

Do you have the correct CPU chosen in your kernel-config?

Maybe someone with a core i7 could help out here better than me ...

google finds me this one pointing at apic:

http://ubuntuforums.org/archive/index.php/t-1000132.html

?

"Stefan G. Weichinger" 12-29-2010 06:57 PM

Core i7 M620 power management problem
 
addition: some also point at enabling EIST in BIOS ....

Bill Longman 12-29-2010 07:51 PM

Core i7 M620 power management problem
 
Yeah, the cpufreq utils show all the relevant information. I use the acpi-cpufreq driver and when I didn't use it nothing happened. cpufreq-aperf shows each CPU at 1.2GHz. I'll look at the EIST in BIOS, too. Thanks for the pointers.




Here's an interesting item:

12:41:00# cat /sys/devices/system/cpu/cpu0/cpufreq/bios_limit
1199000

which sort of jives with the "asserted by call to hardware" in the cpufreq-info section:

analyzing CPU 3:
* driver: acpi-cpufreq
* CPUs which run at the same hardware frequency: 0 1 2 3
* CPUs which need to have their frequency coordinated by software: 3
* maximum transition latency: 10.0 us.
* hardware limits: 1.20 GHz - 2.67 GHz

* available frequency steps: 2.67 GHz, 2.67 GHz, 2.53 GHz, 2.40 GHz, 2.27 GHz, 2.13 GHz, 2.00 GHz, 1.87 GHz, 1.73 GHz, 1.60 GHz, 1.47 GHz, 1.33 GHz, 1.20 GHz
* available cpufreq governors: conservative, ondemand, userspace, powersave, performance

* current policy: frequency should be within 1.20 GHz and 1.20 GHz.
***************** The governor "performance" may decide which speed to use
***************** within this range.
* current CPU frequency is 1.20 GHz (asserted by call to hardware).

* cpufreq stats: 2.67 GHz:0.25%, 2.67 GHz:0.01%, 2.53 GHz:0.01%, 2.40 GHz:0.01%, 2.27 GHz:0.01%, 2.13 GHz:0.01%, 2.00 GHz:0.01%, 1.87 GHz:0.01%, 1.73 GHz:0.01%, 1.60 GHz:0.01%, 1.47 GHz:0.01%, 1.33 GHz:0.01%, 1.20 GHz:99.61%* (28)


So, why are there micro-spikes of higher frequencies in the above stats? The stats section says there are only five transitions.

--
Bill Longman

Paul Hartman 12-29-2010 11:22 PM

Core i7 M620 power management problem
 
On Wed, Dec 29, 2010 at 2:51 PM, Bill Longman <bill.longman@gmail.com> wrote:
>> Yeah, the cpufreq utils show all the relevant information. I use the
>> acpi-cpufreq driver and when I didn't use it nothing happened. cpufreq-aperf
>> shows each CPU at 1.2GHz. I'll look at the EIST in BIOS, too. Thanks for the
>> pointers.
>
> Here's an interesting item:
>
> 12:41:00# cat /sys/devices/system/cpu/cpu0/cpufreq/bios_limit
> 1199000
>
> which sort of jives with the "asserted by call to hardware" in the
> cpufreq-info section:
> analyzing CPU 3:
> * driver: acpi-cpufreq
> * CPUs which run at the same hardware frequency: 0 1 2 3
> * CPUs which need to have their frequency coordinated by software: 3
> * maximum transition latency: 10.0 us.
> * hardware limits: 1.20 GHz - 2.67 GHz
> * available frequency steps: 2.67 GHz, 2.67 GHz, 2.53 GHz, 2.40 GHz, 2.27
> GHz, 2.13 GHz, 2.00 GHz, 1.87 GHz, 1.73 GHz, 1.60 GHz, 1.47 GHz, 1.33 GHz,
> 1.20 GHz
> * available cpufreq governors: conservative, ondemand, userspace, powersave,
> performance
> * current policy: frequency should be within 1.20 GHz and 1.20 GHz.
> ***************** The governor "performance" may decide which speed to use
> ***************** within this range.
> * current CPU frequency is 1.20 GHz (asserted by call to hardware).
> * cpufreq stats: 2.67 GHz:0.25%, 2.67 GHz:0.01%, 2.53 GHz:0.01%, 2.40
> GHz:0.01%, 2.27 GHz:0.01%, 2.13 GHz:0.01%, 2.00 GHz:0.01%, 1.87 GHz:0.01%,
> 1.73 GHz:0.01%, 1.60 GHz:0.01%, 1.47 GHz:0.01%, 1.33 GHz:0.01%, 1.20
> GHz:99.61%* (28)
>
> So, why are there micro-spikes of higher frequencies in the above stats? The
> stats section says there are only five transitions.

I ran cpufreq-info on my i7 920, and everything looked normal for mine
compared to yours. And I have tens of thousands of transitions on each
CPU (currently at 8 days uptime)

Can you use cpufreq-set to change the max limit or lock it to a higher
speed? If it works, that's a good sign... if it gets changed back
maybe some userspace powersaving program is messing with it. Like
gnome/KDE or something. If you boot to console and don't start X, does
this problem still happen? I wonder if it happens in X maybe the few
times at greater speeds happened before X loaded. Just a WAG. :)

For example, on my laptop (not an i7, but an old Athlon from 2004),
the KDE laptop powersaving stuff does not work properly, it either
locks me at slowest speed, or highest speed, or... but I think in my
case it's related to the corrupt DSDT, crappy BIOS and complete
inability for it to read the battery state most of the time... It
doesn't know if it's plugged in or on battery, or how much battery
life is left, or it thinks 84% remains and that number never changes
(until laptop suddenly dies without warning). Of course all of that
works perfectly fine in Windows on the same machine...

In my kernel config on my i7, in the cpufreq sections I have this:

#
# CPU Frequency scaling
#
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_TABLE=y
# CONFIG_CPU_FREQ_DEBUG is not set
CONFIG_CPU_FREQ_STAT=y
# CONFIG_CPU_FREQ_STAT_DETAILS is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
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_PCC_CPUFREQ is not set
CONFIG_X86_ACPI_CPUFREQ=y
# CONFIG_X86_POWERNOW_K8 is not set
# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
# CONFIG_X86_P4_CLOCKMOD is not set


I can send you my entire .config if you want to compare.

Mick 12-29-2010 11:43 PM

Core i7 M620 power management problem
 
On Wednesday 29 December 2010 20:51:05 Bill Longman wrote:
> > Yeah, the cpufreq utils show all the relevant information. I use the
> > acpi-cpufreq driver and when I didn't use it nothing happened.
> > cpufreq-aperf shows each CPU at 1.2GHz. I'll look at the EIST in BIOS,
> > too. Thanks for the pointers.
>
> Here's an interesting item:
>
> 12:41:00# cat /sys/devices/system/cpu/cpu0/cpufreq/bios_limit
> 1199000
>
> which sort of jives with the "asserted by call to hardware" in the
> cpufreq-info section:
> analyzing CPU 3:
> driver: acpi-cpufreq
> CPUs which run at the same hardware frequency: 0 1 2 3
> CPUs which need to have their frequency coordinated by software: 3
> maximum transition latency: 10.0 us.
> hardware limits: 1.20 GHz - 2.67 GHz
> available frequency steps: 2.67 GHz, 2.67 GHz, 2.53 GHz, 2.40 GHz, 2.27
> GHz, 2.13 GHz, 2.00 GHz, 1.87 GHz, 1.73 GHz, 1.60 GHz, 1.47 GHz, 1.33 GHz,
> 1.20 GHz
> available cpufreq governors: conservative, ondemand, userspace,
> powersave, performance
> current policy: frequency should be within 1.20 GHz and 1.20 GHz.
> The governor "performance" may decide which speed to use
> within this range.
> current CPU frequency is 1.20 GHz (asserted by call to hardware).
> cpufreq stats: 2.67 GHz:0.25%, 2.67 GHz:0.01%, 2.53 GHz:0.01%, 2.40
> GHz:0.01%, 2.27 GHz:0.01%, 2.13 GHz:0.01%, 2.00 GHz:0.01%, 1.87 GHz:0.01%,
> 1.73 GHz:0.01%, 1.60 GHz:0.01%, 1.47 GHz:0.01%, 1.33 GHz:0.01%, 1.20
> GHz:99.61% (28)
>
> So, why are there micro-spikes of higher frequencies in the above stats?
> The stats section says there are only five transitions.

Just a wild guess: are you running some desktop applet that manages the cpu
frequency and is stuck on manual with a low setting?

I have the i7 Q 720 @ 1.60GHz, which is supposedly go up to 2.8G with turbo
boost, but can't say that I have ever seen it going that high ... not sure if
there's a setting somewhere I should tweak. This is from cpuinfo:

=========================
$ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 30
model name : Intel(R) Core(TM) i7 CPU Q 720 @ 1.60GHz
stepping : 5
cpu MHz : 931.000
cache size : 6144 KB
physical id : 0
siblings : 8
core id : 0
cpu cores : 4
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 11
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 syscall nx rdtscp lm
constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf
pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2
popcnt lahf_lm ida dts tpr_shadow vnmi flexpriority ept vpid
bogomips : 3192.42
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
=========================
As you can see power management is also blank.

These are my frequencies:

$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_*
1597000 1596000 1463000 1330000 1197000 1064000 931000
conservative userspace powersave ondemand performance
931000
acpi-cpufreq
ondemand
1597000
931000
<unsupported>

PS. Any ideas what makes that turbo thingy kick in?
--
Regards,
Mick

Bill Longman 12-30-2010 01:56 AM

Core i7 M620 power management problem
 
On Wed, Dec 29, 2010 at 4:22 PM, Paul Hartman <paul.hartman+gentoo@gmail.com> wrote:



I ran cpufreq-info on my i7 920, and everything looked normal for mine

compared to yours. And I have tens of thousands of transitions on each

CPU (currently at 8 days uptime)



Can you use cpufreq-set to change the max limit or lock it to a higher

speed? If it works, that's a good sign... if it gets changed back

maybe some userspace powersaving program is messing with it. Like

gnome/KDE or something. If you boot to console and don't start X, does

this problem still happen? I wonder if it happens in X maybe the few

times at greater speeds happened before X loaded. Just a WAG. :)



For example, on my laptop (not an i7, but an old Athlon from 2004),

the KDE laptop powersaving stuff does not work properly, it either

locks me at slowest speed, or highest speed, or... but I think in my

case it's related to the corrupt DSDT, crappy BIOS and complete

inability for it to read the battery state most of the time... It

doesn't know if it's plugged in or on battery, or how much battery

life is left, or it thinks 84% remains and that number never changes

(until laptop suddenly dies without warning). Of course all of that

works perfectly fine in Windows on the same machine...



In my kernel config on my i7, in the cpufreq sections I have this:



#

# CPU Frequency scaling

#

CONFIG_CPU_FREQ=y

CONFIG_CPU_FREQ_TABLE=y

# CONFIG_CPU_FREQ_DEBUG is not set

CONFIG_CPU_FREQ_STAT=y

# CONFIG_CPU_FREQ_STAT_DETAILS is not set

# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set

# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set

CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y

# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set

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_PCC_CPUFREQ is not set

CONFIG_X86_ACPI_CPUFREQ=y

# CONFIG_X86_POWERNOW_K8 is not set

# CONFIG_X86_SPEEDSTEP_CENTRINO is not set

# CONFIG_X86_P4_CLOCKMOD is not set





I can send you my entire .config if you want to compare.




Yes, mine is quite similar:

# CPU Frequency scaling
#
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_TABLE=y
CONFIG_CPU_FREQ_DEBUG=y
CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_FREQ_STAT_DETAILS=y

CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
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_PCC_CPUFREQ is not set

CONFIG_X86_ACPI_CPUFREQ=y
# CONFIG_X86_POWERNOW_K8 is not set
# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
# CONFIG_X86_P4_CLOCKMOD is not set

#
# shared options
#
# CONFIG_X86_SPEEDSTEP_LIB is not set

CONFIG_CPU_IDLE=y
CONFIG_CPU_IDLE_GOV_LADDER=y
CONFIG_CPU_IDLE_GOV_MENU=y
CONFIG_INTEL_IDLE=y
I do run KDE but it is independent of KDE. I don't run kdm by default, just the console, and it is still the same. In fact, the KDE power stuff is not even around. Could that mean it's just a USE flag issue? It doesn't seem it because I have acpi and udev.


--
Bill Longman

Bill Longman 12-30-2010 02:16 AM

Core i7 M620 power management problem
 
On Wed, Dec 29, 2010 at 4:43 PM, Mick <michaelkintzios@gmail.com> wrote:


Just a wild guess: *are you running some desktop applet that manages the cpu

frequency and is stuck on manual with a low setting?



I have the i7 Q 720 @ 1.60GHz, which is supposedly go up to 2.8G with turbo

boost, but can't say that I have ever seen it going that high ... not sure if

there's a setting somewhere I should tweak. *This is from cpuinfo:



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

$ cat /proc/cpuinfo

processor * * * : 0

vendor_id * * * : GenuineIntel

cpu family * * *: 6

model * * * * * : 30

model name * * *: Intel(R) Core(TM) i7 CPU * * * Q 720 *@ 1.60GHz

stepping * * * *: 5

cpu MHz * * * * : 931.000

cache size * * *: 6144 KB

physical id * * : 0

siblings * * * *: 8

core id * * * * : 0

cpu cores * * * : 4

apicid * * * * *: 0

initial apicid *: 0

fpu * * * * * * : yes

fpu_exception * : yes

cpuid level * * : 11

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 syscall nx rdtscp lm

constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf

pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2

popcnt lahf_lm ida dts tpr_shadow vnmi flexpriority ept vpid

bogomips * * * *: 3192.42

clflush size * *: 64

cache_alignment : 64

address sizes * : 36 bits physical, 48 bits virtual

power management:

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

As you can see power management is also blank.



These are my frequencies:



$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_*

1597000 1596000 1463000 1330000 1197000 1064000 931000

conservative userspace powersave ondemand performance

931000

acpi-cpufreq

ondemand

1597000

931000

<unsupported>



PS. *Any ideas what makes that turbo thingy kick in?
The only thing that runs at boot is cpufrequtils and here is the config for it:

# Options when starting cpufreq (given to the `cpufreq-set` program)

START_OPTS="--governor performance"

# Options when stopping cpufreq (given to the `cpufreq-set` program)
STOP_OPTS="--governor performance"

# Extra settings to write to sysfs cpufreq values.

#SYSFS_EXTRA="ondemand/ignore_nice_load=1 ondemand/up_threshold=70"
SYSFS_EXTRA="ondemand/ignore_nice_load=1"

And since I have power mgmt debug turned on, all my logs are belong to pm:
e1000e 0000:00:19.0: __pm_runtime_resume()!

e1000e 0000:00:19.0: __pm_runtime_resume() returns 1!
scsi host1: __pm_runtime_resume()!
scsi host1: __pm_runtime_resume() returns 1!
scsi host1: __pm_runtime_resume()!
scsi host1: __pm_runtime_resume() returns 1!

scsi host1: __pm_runtime_resume()!
scsi host1: __pm_runtime_resume() returns 1!
scsi host1: __pm_runtime_resume()!
etc, etc, etc, ad nauseum....

And even when I try this kind of thing:
/sys/devices/system/cpu

19:08:23# for a in cpu?/cpufreq/scaling_max_freq; do** echo -n 2667000 > $a; done
/sys/devices/system/cpu
19:09:05# cat cpu?/cpufreq/scaling_max_freq
1199000
1199000
1199000
1199000
/sys/devices/system/cpu

19:09:20# for a in cpu?/cpufreq/scaling_governor; do** echo -n performance > $a; done

I can see gkrellm get its governor changed but I cannot override the max freq. How can I tell what the BIOS is reporting?* Here is what dmidecode tells me about the CPU:


Handle 0x0004, DMI type 4, 42 bytes
Processor Information
******* Socket Designation: CPU 1
******* Type: Central Processor
******* Family: <OUT OF SPEC>
******* Manufacturer: Intel***********

******* ID: 52 06 02 00 FF FB EB BF
******* Version: Intel(R) Core(TM) i7 CPU****** M 620* @ 2.67GH
******* Voltage: 0.0 V
******* External Clock: 533 MHz
******* Max Speed: 4000 MHz
******* Current Speed: 2666 MHz

******* Status: Populated, Enabled
******* Upgrade: Other
******* L1 Cache Handle: 0x0005
******* L2 Cache Handle: 0x0006
******* L3 Cache Handle: 0x0007
******* Serial Number: To Be Filled By O.E.M.
******* Asset Tag: To Be Filled By O.E.M.

******* Part Number: To Be Filled By O.E.M.
******* Core Count: 2
******* Core Enabled: 1
******* Thread Count: 2
******* Characteristics:
*************** 64-bit capable


--
Bill Longman

Bill Longman 12-30-2010 02:51 AM

Core i7 M620 power management problem
 
On Wed, Dec 29, 2010 at 11:55 AM, Stefan G. Weichinger <lists@xunil.at> wrote:

Am 29.12.2010 19:48, schrieb Bill Longman:



> 10:47:00# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_*

> 2667000 2666000 2533000 2399000 2266000 2133000 1999000 1866000 1733000

> 1599000 1466000 1333000 1199000

> conservative ondemand userspace powersave performance

> 1199000

> acpi-cpufreq

> performance

> 1199000

> 1199000

> <unsupported>

>

> See what I mean?



I see it but I don't have a solution.



Maybe some strange limitation within the BIOS of the motherboard?

Ah, you wrote that Win does fine ... so ...



Do you have the correct CPU chosen in your kernel-config?



Maybe someone with a core i7 could help out here better than me ...



google finds me this one pointing at apic:



http://ubuntuforums.org/archive/index.php/t-1000132.html



?


Here are some powertop results I see when compiling world:
**** PowerTOP version 1.13***** (C) 2007 Intel Corporation

Cn*************** Avg residency****** P-states (frequencies)

C0 (cpu running)******* (100.0%)***** Turbo Mode**** 0.0%
polling********** 0.0ms ( 0.0%)******** 2.67 Ghz**** 0.0%
C1 mwait********* 0.0ms ( 0.0%)******** 2.54 Ghz**** 0.0%
C2 mwait********* 0.0ms ( 0.0%)******** 2.40 Ghz**** 0.0%

C3 mwait********* 0.0ms ( 0.0%)******** 1199 Mhz** 100.0%

So it seems like all the CPU Power state is fine internally to the CPU but, it's just that it cannot go to the higher speeds for some reason.



--
Bill Longman


All times are GMT. The time now is 07:08 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.