Piker-Alpha / ssdtPRGen.sh

Script to generate a SSDT for Power Management
712 stars 156 forks source link

Multiplier locked but frequency changing #360

Open alex88 opened 7 years ago

alex88 commented 7 years ago

I've the multiplier locked at 42x on a i7-6700k

ssdtPRGen.sh v0.9  Copyright (c) 2011-2012 by † RevoGirl
             v6.6  Copyright (c) 2013 by † Jeroen
             v21.5 Copyright (c) 2013-2017 by Pike R. Alpha
-----------------------------------------------------------
Bugs > https://github.com/Piker-Alpha/ssdtPRGen.sh/issues <

System information: Mac OS X 10.12.5 (16F73)
Brandstring: "Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz"

Version: models.cfg v170 / Skylake.cfg v193

Scope (_PR_) {222 bytes} with ACPI Processor declarations found in DSDT (ACPI 1.0 compliant)
Generating ssdt.dsl for a 'iMac17,1' with board-id [Mac-B809C3757DA9BB8D]
Skylake Core i7-6700K processor [0x506E3] setup [0x0705]
With a maximum TDP of 91 Watt, as specified by Intel
Number logical CPU's: 8 (Core Frequency: 4000 MHz)
Number of Turbo States: 2 (4100-4200 MHz)
Number of P-States: 35 (800-4200 MHz)
Injected C-States for CPU0 (C1,C3,C6,C7,C8,C9,C10)
Injected C-States for CPU1 (C1,C2,C3,C6,C7)
Warning: 'cpu-type' may be set improperly (0x0705 instead of 0x0905)
     - Clover users should read https://clover-wiki.zetam.org/Configuration/CPU#cpu_typeWarning: 'system-type' may be set improperly (3 instead of 1)
     - Clover users should read https://clover-wiki.zetam.org/Configuration/ACPI#acpi_smartups
Compiling: ssdt_pr.dsl
Intel ACPI Component Architecture
ASL Optimizing Compiler version 20140926-64 [Nov  6 2014]
Copyright (c) 2000 - 2014 Intel Corporation

ASL Input:     /Users/alex/Library/ssdtPRGen/ssdt.dsl - 364 lines, 11348 bytes, 73 keywords
AML Output:    /Users/alex/Library/ssdtPRGen/ssdt.aml - 2389 bytes, 28 named objects, 45 executable opcodes

Compilation complete. 0 Errors, 0 Warnings, 0 Remarks, 0 Optimizations

HWMonitor shows package frequency fixed at 4.2Ghz and multiplier fixed at 42, however CPU package average goes up and down but stays above 3.2Ghz all the time.

screen shot 2017-07-25 at 9 39 21 pm

Is it correct? Why multiplier is stuck at 42x? I've disabled C/P states in clover and enabled KernelPm and Apple RTC in clover config

UPDATE: Actually, I've seen it rarely goes to 800Mhz, but there are no intermediary steps, just 4.2Ghz or 800Mhz

This is the output of AppleIntelInfo

AppleIntelInfo.kext v2.6 Copyright © 2012-2017 Pike R. Alpha. All rights reserved.
enableHWP................................: 0

Settings:
------------------------------------------
logMSRs..................................: 1
logIGPU..................................: 0
logCStates...............................: 1
logIPGStyle..............................: 1
InitialTSC...............................: 0x10428c5198ed (446 MHz)
MWAIT C-States...........................: 1319200

Processor Brandstring....................: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz

Processor Signature..................... : 0x506E3
------------------------------------------
 - Family............................... : 6
 - Stepping............................. : 3
 - Model................................ : 0x5E (94)

Model Specific Registers (MSRs)
------------------------------------------

MSR_CORE_THREAD_COUNT............(0x35)  : 0x0
------------------------------------------
 - Core Count........................... : 4
 - Thread Count......................... : 8

MSR_PLATFORM_INFO................(0xCE)  : 0x80838F1012800
------------------------------------------
 - Maximum Non-Turbo Ratio.............. : 0x28 (4000 MHz)
 - Ratio Limit for Turbo Mode........... : 1 (programmable)
 - TDP Limit for Turbo Mode............. : 1 (programmable)
 - Low Power Mode Support............... : 0 (LMP not supported)
 - Number of ConfigTDP Levels........... : 0 (only base TDP level available)
 - Maximum Efficiency Ratio............. : 8
 - Minimum Operating Ratio.............. : 8

MSR_PMG_CST_CONFIG_CONTROL.......(0xE2)  : 0x8000
------------------------------------------
 - I/O MWAIT Redirection Enable......... : 0 (not enabled)
 - CFG Lock............................. : 1 (MSR locked until next reset)
 - C3 State Auto Demotion............... : 0 (disabled/unsupported)
 - C1 State Auto Demotion............... : 0 (disabled/unsupported)
 - C3 State Undemotion.................. : 0 (disabled/unsupported)
 - C1 State Undemotion.................. : 0 (disabled/unsupported)
 - Package C-State Auto Demotion........ : 0 (disabled/unsupported)
 - Package C-State Undemotion........... : 0 (disabled/unsupported)

MSR_PMG_IO_CAPTURE_BASE..........(0xE4)  : 0x0
 - C-state Range........................ : 0 (C-States not included, I/O MWAIT redirection not enabled)

IA32_MPERF.......................(0xE7)  : 0x2E380664CEF
IA32_APERF.......................(0xE8)  : 0x2F7AA4AABD2

MSR_FLEX_RATIO...................(0x194) : 0xE0000

MSR_IA32_PERF_STATUS.............(0x198) : 0x27B900002A00
------------------------------------------
 - Current Performance State Value...... : 0x2A00 (4200 MHz)

MSR_IA32_PERF_CONTROL............(0x199) : 0x2A00
------------------------------------------
 - Target performance State Value....... : 0x2A00 (4200 MHz)
 - Intel Dynamic Acceleration........... : 0 (IDA engaged)

IA32_CLOCK_MODULATION............(0x19A) : 0x0

IA32_THERM_INTERRUPT.............(0x19B) : 0x0

IA32_THERM_STATUS................(0x19C) : 0x883B0800
------------------------------------------
 - Thermal Status....................... : 0
 - Thermal Log.......................... : 0
 - PROCHOT # or FORCEPR# event.......... : 0
 - PROCHOT # or FORCEPR# log............ : 0
 - Critical Temperature Status.......... : 0
 - Critical Temperature log............. : 0
 - Thermal Threshold #1 Status.......... : 0
 - Thermal Threshold #1 log............. : 0
 - Thermal Threshold #2 Status.......... : 0
 - Thermal Threshold #2 log............. : 0
 - Power Limitation Status.............. : 0
 - Power Limitation log................. : 1
 - Current Limit Status................. : 0
 - Current Limit log.................... : 0
 - Cross Domain Limit Status............ : 0
 - Cross Domain Limit log............... : 0
 - Digital Readout...................... : 59
 - Resolution in Degrees Celsius........ : 1
 - Reading Valid........................ : 1 (valid)

MSR_THERM2_CTL...................(0x19D) : 0x0

IA32_MISC_ENABLES................(0x1A0) : 0x850089
------------------------------------------
 - Fast-Strings......................... : 1 (enabled)
 - FOPCODE compatibility mode Enable.... : 0
 - Automatic Thermal Control Circuit.... : 1 (enabled)
 - Split-lock Disable................... : 0
 - Performance Monitoring............... : 1 (available)
 - Bus Lock On Cache Line Splits Disable : 0
 - Hardware prefetch Disable............ : 0
 - Processor Event Based Sampling....... : 0 (PEBS supported)
 - GV1/2 legacy Enable.................. : 0
 - Enhanced Intel SpeedStep Technology.. : 1 (enabled)
 - MONITOR FSM.......................... : 1 (MONITOR/MWAIT supported)
 - Adjacent sector prefetch Disable..... : 0
 - CFG Lock............................. : 0 (MSR not locked)
 - xTPR Message Disable................. : 1 (disabled)

MSR_TEMPERATURE_TARGET...........(0x1A2) : 0x641400
------------------------------------------
 - Turbo Attenuation Units.............. : 0
 - Temperature Target................... : 100
 - TCC Activation Offset................ : 0

MSR_MISC_PWR_MGMT................(0x1AA) : 0x1CC1
------------------------------------------
 - EIST Hardware Coordination........... : 1 (hardware coordination disabled)
 - Energy/Performance Bias support...... : 1
 - Energy/Performance Bias.............. : 0 (disabled/MSR not visible to software)
 - Thermal Interrupt Coordination Enable : 0 (thermal interrupt not rerouted)

MSR_TURBO_RATIO_LIMIT............(0x1AD) : 0x2A2A2A2A
------------------------------------------
 - Maximum Ratio Limit for C01.......... : 2A (4200 MHz)
 - Maximum Ratio Limit for C02.......... : 2A (4200 MHz)
 - Maximum Ratio Limit for C03.......... : 2A (4200 MHz)
 - Maximum Ratio Limit for C04.......... : 2A (4200 MHz)

IA32_ENERGY_PERF_BIAS............(0x1B0) : 0x1
------------------------------------------
 - Power Policy Preference...............: 1 (highest performance)

MSR_POWER_CTL....................(0x1FC) : 0x3C005F
------------------------------------------
 - Bi-Directional Processor Hot..........: 1 (enabled)
 - C1E Enable............................: 1 (enabled)

MSR_RAPL_POWER_UNIT..............(0x606) : 0xA0E03
------------------------------------------
 - Power Units.......................... : 3 (1/8 Watt)
 - Energy Status Units.................. : 14 (61 micro-Joules)
 - Time Units .......................... : 10 (976.6 micro-Seconds)

MSR_PKG_POWER_LIMIT..............(0x610) : 0x42FFD0001AEA82
------------------------------------------
 - Package Power Limit #1............... : 3408 Watt
 - Enable Power Limit #1................ : 1 (enabled)
 - Package Clamping Limitation #1....... : 0 (disabled)
 - Time Window for Power Limit #1....... : 13 (20480 milli-Seconds)
 - Package Power Limit #2............... : 4090 Watt
 - Enable Power Limit #2................ : 1 (enabled)
 - Package Clamping Limitation #2....... : 0 (disabled)
 - Time Window for Power Limit #2....... : 33 (10 milli-Seconds)
 - Lock................................. : 0 (MSR not locked)

MSR_PKG_ENERGY_STATUS............(0x611) : 0x6C0A90AF
------------------------------------------
 - Total Energy Consumed................ : 110634 Joules (Watt = Joules / seconds)

MSR_PP0_POWER_LIMIT..............(0x638) : 0x0

MSR_PP0_ENERGY_STATUS............(0x639) : 0x3E063829
------------------------------------------
 - Total Energy Consumed................ : 63512 Joules (Watt = Joules / seconds)

MSR_PP0_POWER_LIMIT..............(0x638) : 0x0

MSR_PP0_ENERGY_STATUS............(0x639) : 0x3E063901
------------------------------------------
 - Total Energy Consumed................ : 63512 Joules (Watt = Joules / seconds)

MSR_CONFIG_TDP_NOMINAL...........(0x648) : 0x28
MSR_CONFIG_TDP_LEVEL1............(0x649) : 0x0
MSR_CONFIG_TDP_LEVEL2............(0x64a) : 0x0
MSR_CONFIG_TDP_CONTROL...........(0x64b) : 0x80000000
MSR_TURBO_ACTIVATION_RATIO.......(0x64c) : 0x0
MSR_PKGC3_IRTL...................(0x60a) : 0x0
MSR_PKGC6_IRTL...................(0x60b) : 0x0
MSR_PKGC7_IRTL...................(0x60c) : 0x0
MSR_PKG_C2_RESIDENCY.............(0x60d) : 0x0
MSR_PKG_C3_RESIDENCY.............(0x3f8) : 0x0
MSR_PKG_C2_RESIDENCY.............(0x60d) : 0x0
MSR_PKG_C6_RESIDENCY.............(0x3f9) : 0x0
MSR_PKG_C7_RESIDENCY.............(0x3fa) : 0x0
MSR_PKG_C8_RESIDENCY............(0x630) : 0x0
MSR_PKG_C9_RESIDENCY............(0x631) : 0x0
MSR_PKG_C10_RESIDENCY...........(0x632) : 0x0
MSR_PKG_C8_LATENCY..............(0x633) : 0x0
MSR_PKG_C9_LATENCY..............(0x634) : 0x0
MSR_PKG_C10_LATENCY.............(0x635) : 0x0

MSR_PLATFORM_ENERGY_COUNTER......(0x64D) : 0x0 (not supported by hardware/BIOS)

MSR_PPERF........................(0x64E) : 0x35E36551252
------------------------------------------
 - Hardware workload scalability........ : 3703173354066

MSR_CORE_PERF_LIMIT_REASONS......(0x64F) : 0x4000000
------------------------------------------
 - PROCHOT Status....................... : 0
 - Thermal Status....................... : 0
 - Residency State Regulation Status.... : 0
 - Running Average Thermal Limit Status. : 0
 - VR Therm Alert Status................ : 0
 - VR Therm Design Current Status....... : 0
 - Other Status......................... : 0
 - Package/Platform-Level #1 Power Limit : 0
 - Package/Platform-Level #2 Power Limit : 0
 - Max Turbo Limit Status............... : 0
 - Turbo Transition Attenuation Status.. : 0
 - PROCHOT Log.......................... : 0
 - Thermal Log.......................... : 0
 - Residency State Regulation Log....... : 0
 - Running Average Thermal Limit Log.... : 0
 - VR Therm Alert Log................... : 0
 - VR Thermal Design Current Log........ : 0
 - Other Status Log..................... : 0
 - Package/Platform-Level #1 Power Limit : 1 (status bit has asserted)
 - Package/Platform-Level #2 Power Limit : 0
 - Max Turbo Limit Log.................. : 0
 - Turbo Transition Attenuation Log..... : 0
HDC Supported

IA32_PKG_HDC_CTL.................(0xDB0) : 0x0

IA32_PM_CTL1.....................(0xDB1) : 0x1
------------------------------------------
HDC Allow Block..................(0xDB1) : 1 (HDC blocked)

IA32_THREAD_STALL................(0xDB2) : 0x0

MSR_PKG_HDC_CONFIG...............(0x652) : 0x2
------------------------------------------
Pkg Cx Monitor ..................(0x652) : 2 (count package C3 and deeper)
MSR_CORE_HDC_RESIDENCY...........(0x653) : 0x0

MSR_PKG_HDC_SHALLOW_RESIDENCY....(0x655) : 0x0

MSR_PKG_HDC_DEEP_RESIDENCY.......(0x656) : 0x0

IA32_TSC_DEADLINE................(0x6E0) : 0x104292B8C814

IA32_PM_ENABLE...................(0x770) : 0x0 (HWP Supported but not, yet, enabled)

CPU Ratio Info:
------------------------------------------
Base Clock Frequency (BLCK)............. : 100 MHz
Maximum Efficiency Ratio/Frequency.......:  8 ( 800 MHz)
Maximum non-Turbo Ratio/Frequency........: 40 (4000 MHz)
Maximum Turbo Ratio/Frequency............: 42 (4200 MHz)
P-State ratio * 100 = Frequency in MHz
------------------------------------------
CPU P-States [ (8) 36 42 ]
CPU C6-Cores [ 0 1 2 4 6 ]
CPU P-States [ 8 20 36 (42) ]
CPU C6-Cores [ 0 1 2 4 5 6 7 ]
CPU P-States [ (8) 20 21 36 42 ]
CPU C6-Cores [ 0 1 2 3 4 5 6 7 ]
CPU P-States [ 8 20 21 28 36 (42) ]
CPU P-States [ 8 20 21 28 36 41 (42) ]
CPU P-States [ (8) 20 21 25 28 36 41 42 ]
CPU P-States [ (8) 20 21 25 26 28 36 41 42 ]
CPU P-States [ 8 18 20 21 25 26 28 36 41 (42) ]
CPU P-States [ 8 18 20 21 23 25 26 28 36 41 (42) ]
alex88 commented 7 years ago

So I've tried to change some settings as per https://pikeralpha.wordpress.com/2014/05/26/major-breakthrough-for-power-management/ basically disabling those C states and also set the cpu in "eco" mode in windows' gigabyte easytune, now it seems the CPU goes down to an average of 2Ghz, could be that those settings helped?