You are not logged in.

#1 2016-10-08 13:35:08

198Joe
Member
From: Italy
Registered: 2016-09-16
Posts: 14

Intel_pstate not always working

Hello everyone! I'm  having a problem with the intel_pstate driver I'm using for my CPU.
I have an Intel Core i7-2670QM which has a turbo function that lets it max out the frequency from 2.20 GHz to 3.10 GHz. My purpose is to disable this turbo option because I rarely ever need the extra Hertz, but mostly because temperatures go up to 90-95 °C when cpu is running in turbo mode and I'm on a laptop so it's not ideal for me.
I've read the Freq-scaling wiki, and I've added a udev rule in /etc/udev/rules.d/50-cpu-custom.rules, like so:

KERNEL=="cpu",RUN+="/bin/bash -c 'echo -n 1 > /sys/devices/system/cpu/intel_pstate/no_turbo'"

This way, the turbo is disabled at startup. It does work, since I always get the 1 value everytime I cat /sys/devices/system/cpu/intel_pstate/no_turbo.

My issue is that it doesn't work when I play certain games like Dwarf Fortress or Minecraft. CPU frequency goes way over 2.20 Htz and so temperatures, even though it looks like it's not needed. It's like these games override the rule I've set. Also, when I exit the game it shows that the turbo mode is still disabled!
I've found a topic with the exact same issue as mine https://bbs.archlinux.org/viewtopic.php?id=184849. However the solution (disabling intel_pstate) doesn't work for me.
Is this a normal behaviour I can't avoid or am I missing something here?

I'll post some cpu specs that might be useful:

[joe@Arch ~]$ lspci
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 05)
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 05)
00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b5)
00:1c.1 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2 (rev b5)
00:1c.3 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 4 (rev b5)
00:1c.5 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 6 (rev b5)
00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05)
00:1f.0 ISA bridge: Intel Corporation HM65 Express Chipset Family LPC Controller (rev 05)
00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family 6 port SATA AHCI Controller (rev 05)
00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 05)
01:00.0 VGA compatible controller: NVIDIA Corporation GF108M [GeForce GT 540M] (rev ff)
03:00.0 Network controller: Intel Corporation Centrino Wireless-N 100
04:00.0 USB controller: ASMedia Technology Inc. ASM1042 SuperSpeed USB Host Controller
05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)

and

[joe@Arch ~]$ cat /proc/cpuinfo 
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 42
model name	: Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz
stepping	: 7
microcode	: 0x1b
cpu MHz		: 799.890
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	: 13
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 nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm epb tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs		:
bogomips	: 4391.92
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

processor	: 1
vendor_id	: GenuineIntel
cpu family	: 6
model		: 42
model name	: Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz
stepping	: 7
microcode	: 0x1b
cpu MHz		: 821.374
cache size	: 6144 KB
physical id	: 0
siblings	: 8
core id		: 1
cpu cores	: 4
apicid		: 2
initial apicid	: 2
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
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 nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm epb tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs		:
bogomips	: 4392.07
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

processor	: 2
vendor_id	: GenuineIntel
cpu family	: 6
model		: 42
model name	: Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz
stepping	: 7
microcode	: 0x1b
cpu MHz		: 802.172
cache size	: 6144 KB
physical id	: 0
siblings	: 8
core id		: 2
cpu cores	: 4
apicid		: 4
initial apicid	: 4
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
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 nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm epb tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs		:
bogomips	: 4392.13
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

processor	: 3
vendor_id	: GenuineIntel
cpu family	: 6
model		: 42
model name	: Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz
stepping	: 7
microcode	: 0x1b
cpu MHz		: 799.890
cache size	: 6144 KB
physical id	: 0
siblings	: 8
core id		: 3
cpu cores	: 4
apicid		: 6
initial apicid	: 6
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
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 nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm epb tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs		:
bogomips	: 4392.11
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

processor	: 4
vendor_id	: GenuineIntel
cpu family	: 6
model		: 42
model name	: Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz
stepping	: 7
microcode	: 0x1b
cpu MHz		: 879.382
cache size	: 6144 KB
physical id	: 0
siblings	: 8
core id		: 0
cpu cores	: 4
apicid		: 1
initial apicid	: 1
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
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 nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm epb tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs		:
bogomips	: 4393.88
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

processor	: 5
vendor_id	: GenuineIntel
cpu family	: 6
model		: 42
model name	: Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz
stepping	: 7
microcode	: 0x1b
cpu MHz		: 865.148
cache size	: 6144 KB
physical id	: 0
siblings	: 8
core id		: 1
cpu cores	: 4
apicid		: 3
initial apicid	: 3
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
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 nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm epb tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs		:
bogomips	: 4393.24
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

processor	: 6
vendor_id	: GenuineIntel
cpu family	: 6
model		: 42
model name	: Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz
stepping	: 7
microcode	: 0x1b
cpu MHz		: 799.890
cache size	: 6144 KB
physical id	: 0
siblings	: 8
core id		: 2
cpu cores	: 4
apicid		: 5
initial apicid	: 5
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
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 nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm epb tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs		:
bogomips	: 4393.25
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

processor	: 7
vendor_id	: GenuineIntel
cpu family	: 6
model		: 42
model name	: Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz
stepping	: 7
microcode	: 0x1b
cpu MHz		: 799.890
cache size	: 6144 KB
physical id	: 0
siblings	: 8
core id		: 3
cpu cores	: 4
apicid		: 7
initial apicid	: 7
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
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 nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm epb tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
bugs		:
bogomips	: 4393.25
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

I've also tried thermald as a workaround to keep my temps low, but it still goes up to 80-85 °C (and over the 2.20 Hz threshold). Thanks in advance!

Offline

#2 2016-10-08 22:41:44

hmh
Member
Registered: 2015-10-08
Posts: 13

Re: Intel_pstate not always working

Your system is using known-broken, very outdated firmware.  Please update your machine's BIOS/UEFI.

After updating the BIOS/UEFI, please follow these steps to install the Intel microcode update package: https://wiki.archlinux.org/index.php/Microcode

This has a good chance of fixing the issue (but it is not certain it will).

Offline

#3 2016-10-08 23:25:03

198Joe
Member
From: Italy
Registered: 2016-09-16
Posts: 14

Re: Intel_pstate not always working

My machine is using a BIOS rather than a UEFI and I currently have a Win7/Arch dual boot.
I don't think I've ever updated the BIOS to be honest, mainly because in the past I read that it had some issue with the fan going crazy (I have an Asus K53SV btw).

So I'm wondering, if I update the machine BIOS (and I still have no idea how to do it), am I gonna lose GRUB on the MBR region? Is it gonna go back to the windows one?
Also, where did you see in my logs that my BIOS is outdated?

Last edited by 198Joe (2016-10-08 23:26:37)

Offline

#4 2016-10-09 10:08:39

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Intel_pstate not always working

Have you tried cpupower-frequency-set to set the maximum scaling frequency? It might not work though, haven't tried it.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#5 2016-10-09 11:16:41

loqs
Member
Registered: 2014-03-06
Posts: 17,323

Re: Intel_pstate not always working

$ bsdtar -Oxf /boot/intel-ucode.img | iucode_tool -tb -ls 0x206a7 -
selected microcodes:
001: sig 0x000206a7, pf mask 0x12, 2013-06-12, rev 0x0029, size 10240

Your output shows

microcode	: 0x1b

An earlier revision than 0x0029 so a microcode update is available see the link hmh provided to apply it.

Offline

#6 2016-10-09 14:39:50

198Joe
Member
From: Italy
Registered: 2016-09-16
Posts: 14

Re: Intel_pstate not always working

First of all, thanks for the replies! I've checked the BIOS version and found that it is updated to the latest version (thanks to the asus guys probably, when I had to send them the laptop 3 years ago due to hardware issues). So I proceeded and installed microcode, and now I have:

[joe@Arch ~]$ dmesg | grep microcode
[    0.000000] microcode: microcode updated early to revision 0x29, date = 2013-06-12
[    1.654694] microcode: CPU0 sig=0x206a7, pf=0x10, revision=0x29
[    1.654756] microcode: CPU1 sig=0x206a7, pf=0x10, revision=0x29
[    1.654819] microcode: CPU2 sig=0x206a7, pf=0x10, revision=0x29
[    1.654843] microcode: CPU3 sig=0x206a7, pf=0x10, revision=0x29
[    1.654910] microcode: CPU4 sig=0x206a7, pf=0x10, revision=0x29
[    1.654972] microcode: CPU5 sig=0x206a7, pf=0x10, revision=0x29
[    1.655034] microcode: CPU6 sig=0x206a7, pf=0x10, revision=0x29
[    1.655050] microcode: CPU7 sig=0x206a7, pf=0x10, revision=0x29
[    1.655209] microcode: Microcode Update Driver: v2.01 <tigran@aivazian.fsnet.co.uk>, Peter Oruba

Still, the issue isn't solved. I played Minecraft and after a while CPU frequency went up to 2800-3000 MHz. What is surprising is that, after I closed the game, the return value to cat /sys/devices/system/cpu/intel_pstate/no_turbo was 0, even though I checked it was 1 after rebooting the system. It's like the game tries to stay below the 2200 MHz threshold but at some point it just ignores it (and then thermald kicks in, lowering the frequency to keep the temperature in the 80-90 °C range - still way above 2.2 GHz).
As for cpupower, my understanding from https://wiki.archlinux.org/index.php/CP … cy_scaling was that intel_pstate alone is supposed to deal with these settings on newer CPUs. I did try using it anyway, but to no success (it just says there's an error setting new value and I believe it's because I don't have a userspace governor - which I'm not sure I should look further into it for now). Any new suggestion is much appreciated!

Offline

#7 2016-10-09 15:20:34

loqs
Member
Registered: 2014-03-06
Posts: 17,323

Re: Intel_pstate not always working

Are you using any power management tools such a tlp, laptop mode tools, powertop?

Offline

#8 2016-10-10 15:55:05

198Joe
Member
From: Italy
Registered: 2016-09-16
Posts: 14

Re: Intel_pstate not always working

loqs wrote:

Are you using any power management tools such a tlp, laptop mode tools, powertop?

Nope, none of them. In fact I think the only power/temp management tool I have is thermald.

Offline

Board footer

Powered by FluxBB