Jump to content
Read the Funtoo Newsletter: Summer 2023 ×
  • 0

About Intel P-state


Sandro

Question

Hello ... I have a system with Intel i7 4771 CPU (Haswell) @ 3.5 GHz.

In the kernel menuconfig I find "P-state" for Intel processors> = Sandy-Bridge.

 

Problem: If I install cpupower to change the governor and monitor frequency changes, cpupower not work ... then remains inactive (rc-update add cpupower default && rc)

Removing P-state by the kernel, cpupower works .......

 

I would like a bit 'deeper into this topic; and figure out what might be the most correct thing to do.

 

I also tried sys-power / ncpufreqd; but is the same than with cpupower.

 

Fedora kernel, have enabled P-state; and I can monitor the frequencies that scale from 800 MHz to 3.5 GHz ..

But fedora uses systemd ... and being ignorant of systemd I do not know how to move properly for Funtoo :(

 

How can I do with Funtoo to get the same result?

 

Thanks for any suggestions :)

Link to comment
Share on other sites

21 answers to this question

Recommended Posts

  • 0
# CPU Frequency scaling

#

CONFIG_CPU_FREQ=y

# CONFIG_CPU_FREQ_STAT is not set

# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set

CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=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_DEFAULT_GOV_SCHEDUTIL is not set

CONFIG_CPU_FREQ_GOV_PERFORMANCE=m

CONFIG_CPU_FREQ_GOV_POWERSAVE=y

# CONFIG_CPU_FREQ_GOV_USERSPACE is not set

# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set

# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set

# CONFIG_CPU_FREQ_GOV_SCHEDUTIL is not set

 

#

# CPU frequency scaling drivers

#

CONFIG_X86_INTEL_PSTATE=y

# CONFIG_X86_PCC_CPUFREQ is not set

# CONFIG_X86_ACPI_CPUFREQ 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

 

#

# CPU Idle

#

CONFIG_CPU_IDLE=y

# CONFIG_CPU_IDLE_GOV_LADDER is not set

CONFIG_CPU_IDLE_GOV_MENU=y

# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set

CONFIG_INTEL_IDLE=y

 

 

 

 # cpupower frequency-info

analyzing CPU 0:

  driver: intel_pstate

  CPUs which run at the same hardware frequency: 0

  CPUs which need to have their frequency coordinated by software: 0

  maximum transition latency:  Cannot determine or is not supported.

  hardware limits: 800 MHz - 3.90 GHz

  available cpufreq governors: performance powersave

  current policy: frequency should be within 800 MHz and 3.90 GHz.

                  The governor "powersave" may decide which speed to use

                  within this range.

  current CPU frequency: 895 MHz (asserted by call to hardware)

  boost state support:

    Supported: yes

    Active: yes

 

 

i do not have cpupower added to rc
Link to comment
Share on other sites

  • 0
Every 5.0s: cat /proc/cpuinfo | grep "MHz"                                                                      Fri Jul 15 18:43:12 2016

 

cpu MHz         : 3899.902

cpu MHz         : 3900.329

cpu MHz         : 3899.902

cpu MHz         : 3900.115

 

 

look at documentation - /usr/src/linux/Documentation/cpu-freq/

 

i disable acpi driver enable pstate and powersave gov and pstate works automatically.  googling pstate - it gets too technical for me.

i use cpupower frequency info and cpupower frequency set

Link to comment
Share on other sites

  • 0

Thanx Great;

 

Your command runs; but the frequency on my system, in "idle", are too high (i've imposed from 800 to 3900) but it vary from 3,5 to 3,9 GHz :|

 

This trouble is really difficult for me.

 

Sorry friend :(

Link to comment
Share on other sites

  • 0

However, for now, i think that in portage there aren't softwares to tune the cpu (may be with systemd ? but i hate systemd)

For me is "Pseudo-solved" this topic.

 

But is open for new ideas to have the best ratio performances / Watt.

 

Hello :)

Link to comment
Share on other sites

  • 0

Excuse me for third post .....

 

I've used boinc (that for me is the software which for me it is the most resource-hungry and also it raises more than anything else the temperatures of the cores) to test the 2 situations:

 

1) with Intel P-state enabled in kernel , with MATE DE, I obtain ~4300 for Weathston (fpu) per core and only ~ 10500 in Integer (Drystone). :o

2) Without Intel P-state fpu (Whetstone) is similar, but in integer (Dhrystone) is near 15000 MIPS per core

 

Then for this moment the choice is to use cpupower without P-state driver.

 

But that discussion is ever opened ..... Who knows what will happen in the future ?

 

Hi to All & great Dear whiteghost :)

Link to comment
Share on other sites

  • 0

I have an Intel i7-4770K and I use the kernel CPU Frequency scaling options without pstates and it works fine.  I set the default governor to "ondemand" in the kernel.  Each core then idles at 800MHz and scales up as needed.

 

I have cpupower installed on my system, but don't really need it as the kernel settings do what I desire.

Link to comment
Share on other sites

  • 0

May be that my cpu is bugged :|

 

Using i7z for monitoring cpu, using boinc is 35x (3500 MHz) if i compile kernel i7z tell to me that th cores runs at 37x (3700 MHz);

Globally there is not a very good scaling;

 

I return to cpupower without Intel P-state enabled "in kernel" :|

Link to comment
Share on other sites

  • 0

@ Overkill : then you use in kernel as default the "ondemand" governor ?

@whiteghost : tomorrow i will make other experiments with i7z (01:23 in my town) i go to sleep now.

 

Thanx :)

Yes, I use on demand.  Here you see it at work:

# grep MHz /proc/cpuinfo 
cpu MHz : 3501.000
cpu MHz : 800.000
cpu MHz : 800.000
cpu MHz : 1000.000
Link to comment
Share on other sites

  • 0

I have an Intel i7-4770K and I use the kernel CPU Frequency scaling options without pstates and it works fine.  I set the default governor to "ondemand" in the kernel.  Each core then idles at 800MHz and scales up as needed.

 

I have cpupower installed on my system, but don't really need it as the kernel settings do what I desire.

 

Dear Overkill .... also i use Intel P-state disabled and all runs correctly; The real trouble is: Why in Fedora 24 with P-state enabled there are not trouble about scaling cpu frequencies ? With Funtoo i must use Your solution with P-state disabled.

 

I'd like to have my cpu running under P-state mode correctly. But for now it seems impossible; if i activate P state for Intel, i've no great scaling and benching for example boinc i've better results with your method.

 

May be also that there are Intel's cpu with "a bug" about P-state .....

For example my i7 4771 doesn't accept updates for microcode; for example if I make

# service microcode_ctl start

The systems have  various errors .... :(

 

Excuse me ... hope not to have bored You :)

 

However ... my Funtoo Stable runs very very well :) my system is all "consistent" (in Italian ... "coerente") :)

Link to comment
Share on other sites

  • 0

Haswell  requires early microcode:

CONFIG_MICROCODE=yCONFIG_MICROCODE_INTEL=yCONFIG_MICROCODE_INTEL_EARLY=yCONFIG_MICROCODE_EARLY=y

https://wiki.gentoo.org/wiki/Intel_microcode

Follow software and configuration instruction.

Install microcode package, build tool and create microcode cpio image.

No initrd:

initrd /boot/early_ucode.cpio

Initrd:

initrd  /boot/early_ucode.cpio /boot/initramfs-debian-sources-x86_64-4.4.6-1

Link to comment
Share on other sites

  • 0

I'm on stable with gentoo-sources compiled with genkernel; I don't want Debian-sources and my situation is:

 

 

sandro@ci74771ht ~ $ uname -a
Linux ci74771ht 4.4.6-gentoo #1 SMP PREEMPT Mon Jul 18 21:13:38 CEST 2016 x86_64 Intel(R) Core(TM) i7-4771 CPU @ 3.50GHz GenuineIntel GNU/Linux

 

 

sandro@ci74771ht ~ $ zgrep MICROCODE /proc/config.gz
CONFIG_MICROCODE=y
CONFIG_MICROCODE_INTEL=y
# CONFIG_MICROCODE_AMD is not set
CONFIG_MICROCODE_OLD_INTERFACE=y
sandro@ci74771ht ~ $ zgrep EARLY /proc/config.gz
CONFIG_FIX_EARLYCON_MEM=y
CONFIG_GENERIC_EARLY_IOREMAP=y
CONFIG_SERIAL_EARLYCON=y
CONFIG_EARLY_PRINTK=y
# CONFIG_EARLY_PRINTK_DBGP is not set
CONFIG_EARLY_PRINTK_EFI=y

 

I must try with a newer version of gentoo-sources ?

 

Thanx

Link to comment
Share on other sites

  • 0

To accomplish what? I've been using gentoo sources with the same cpufreq kernel config for years. Are you trying to get pstates working or update your microcode? I'm not the one who knows how to do either :(
 

# uname -a
Linux kpd 4.4.15-gentoo #1 SMP Mon Jul 18 10:18:41 CDT 2016 x86_64 Intel(R) Core(TM) i5-4690 CPU @ 3.50GHz GenuineIntel GNU/Linux

This is my i5 box, but it's the same config as my i7

Link to comment
Share on other sites

  • 0

@ Cardinal: i've tryed and execute all commands in your link; but doesn't work :|

At boot i've  kernel panic.

I'm returned with previous config.

 

Thanx for suggestions :)

 

And ... Enabling microcode_ctl system crashes :|

 

@ Overkill: np ... :)

Link to comment
Share on other sites

  • 0

@ Sandro

Remove microcode_ctl it doesn't work with haswell.

Linux 3.9?3.10 only:CONFIG_MICROCODE_INTEL_EARLY=yLinux 3.9-3.10 only:CONFIG_MICROCODE_EARLY=y

Your kernel is built to load early_ucode.cpio as initrd on boot:

Kernel-4.4.6

CONFIG_MICROCODE=y
CONFIG_MICROCODE_INTEL
=y

Link to comment
Share on other sites

  • 0

Dear Cardinal: i've installed the microcode_ctl but it is not enabled in any runlevels.

 

I've with gento-sources-4.4.6:

sandro@ci74771ht ~ $ zgrep MICROCODE /proc/config.gz 
CONFIG_MICROCODE=y
CONFIG_MICROCODE_INTEL=y
# CONFIG_MICROCODE_AMD is not set
CONFIG_MICROCODE_OLD_INTERFACE=y

Do You think that may be better to change the kernel with different version (type, older or newer) ?

 

Thanx a lot for Your aid :)

Link to comment
Share on other sites

  • 0

sandro, i think you are missing the point on pstate driver.

 

when i use i7z, it may show frequency maxed out at 3.9GHz, but c1 state shows 97 percent of processor is in halt state.

 

isn't that power saving?

 

for a long time i had microcode enabled in kernel and would see in dmesg something about microcode driver. 

 

i assumed it was working but there is more too it.

 

i use git-sources. i use method two from this page

https://fitzcarraldoblog.wordpress.com/2014/11/06/updating-intel-cpu-microcode-from-gentoo-linux/

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...