Piker-Alpha / ssdtPRGen.sh

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

No Turbo i5-6600K #219

Open ndonkersloot opened 8 years ago

ndonkersloot commented 8 years ago

Hi Piker,

First of all thanks for your huge effort in the OSX86 community! I've recently build an new PC:

CPU: Intel Core i5-6600K Motherboard: Gigabyte GA-Z170-HD3P System Definition: iMac 17,1

Everything is working except of the turbo frequency of 3,9Ghz instead of base 3,5Ghz. I've used your ssdtPRGen.sh beta with parameters '-f 3500 -turbo 3900 -type 4' to create my SSDT. After installing this i get 3,6Ghz but not 3,9Ghz. I test this by using 'yes > /dev/null' loop and checking with Intel Power Gadget. When enabling ‘Drop OEM’ in the SSDT section it can’t boot.

I’ve found issue #102 and i’ve looked into my DSDT and SSDT but don’t fully understand if I have to make edits in here. Can you please help me or guide me in the right direction?

I've uploaded my '~/Library/ssdtPRGen/' folder here: https://www.dropbox.com/s/a6xnsvgdmmazz53/ssdtPRGen.zip?dl=0

And my config.plist here: https://www.dropbox.com/s/ub2i3x66nj6ou0a/config.plist?dl=0

ssdtPRGen output used to create SSDT in link.

/Users/nando/ssdtPRGen.sh -f 3500 -turbo 3900 -target 4

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

System information: Mac OS X 10.11.4 (15E65)
Brandstring: "Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz"

Override value: (-f) clock frequency, now using: 3500 MHz!
Override value: (-turbo) maximum (turbo) frequency, now using: 3900 MHz!
Override value: (-target) CPU, now using: Skylake!

Version: models.cfg v150 / Sandy Bridge.cfg v0

Scope (_PR_) {222 bytes} with ACPI Processor declarations found in the DSDT (ACPI 1.0 compliant)
Generating ssdt.dsl for a 'iMac17,1' with board-id [Mac-65CE76090165799A]
Skylake Core i5-6600K processor [0x506E3] setup [0x0605]
With a maximum TDP of 91 Watt, as specified by Intel
Number logical CPU's: 4 (Core Frequency: 3500 MHz)
Number of Turbo States: 4 (3600-3900 MHz)
Number of P-States: 32 (800-3900 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 (0x0605 instead of 0x0905)

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/nando/Library/ssdtPRGen/ssdt.dsl - 309 lines, 9907 bytes, 49 keywords
AML Output:    /Users/nando/Library/ssdtPRGen/ssdt.aml - 1952 bytes, 16 named objects, 33 executable opcodes

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

AppleIntelInfo with SSDT used in link.

AppleIntelInfo.kext v1.2 Copyright © 2012-2015 Pike R. Alpha. All rights reserved

Settings:
------------------------------------
logMSRs............................: 1
logIGPU............................: 0
logIntelRegs.......................: 1
logCStates.........................: 1
logIPGStyle........................: 1
InitialTSC.........................: 0x144feab50720
MWAIT C-States.....................: 1319200

Model Specific Regiters
------------------------------------
MSR_CORE_THREAD_COUNT......(0x35)  : 0x40004
MSR_PLATFORM_INFO..........(0xCE)  : 0x80838F1012300
MSR_PMG_CST_CONFIG_CONTROL.(0xE2)  : 0x1E008006
MSR_PMG_IO_CAPTURE_BASE....(0xE4)  : 0x31814
IA32_MPERF.................(0xE7)  : 0x621FB3F37D
IA32_APERF.................(0xE8)  : 0x5AC3C8BE21
MSR_FLEX_RATIO.............(0x194) : 0xE0000
MSR_IA32_PERF_STATUS.......(0x198) : 0x271400002500
MSR_IA32_PERF_CONTROL......(0x199) : 0x2700
IA32_CLOCK_MODULATION......(0x19A) : 0x0
IA32_THERM_STATUS..........(0x19C) : 0x884A0000
IA32_MISC_ENABLES..........(0x1A0) : 0x850089
MSR_MISC_PWR_MGMT..........(0x1AA) : 0x18C1
MSR_TURBO_RATIO_LIMIT......(0x1AD) : 0x24252627
IA32_ENERGY_PERF_BIAS......(0x1B0) : 0x1
MSR_POWER_CTL..............(0x1FC) : 0x2C005F
MSR_RAPL_POWER_UNIT........(0x606) : 0xA0E03
MSR_PKG_POWER_LIMIT........(0x610) : 0x42FFD0001AEA82
MSR_PKG_ENERGY_STATUS......(0x611) : 0xD628267
MSR_PKG_POWER_INFO.........(0x614) : 0x2F8
MSR_PP0_CURRENT_CONFIG.....(0x601) : 0x0
MSR_PP0_POWER_LIMIT........(0x638) : 0x0
MSR_PP0_ENERGY_STATUS......(0x639) : 0x53EDF07
MSR_PP0_POLICY.............(0x63a) : 0x0
MSR_PKGC6_IRTL.............(0x60b) : 0x8876
MSR_PKGC7_IRTL.............(0x60c) : 0x8894
MSR_PKG_C2_RESIDENCY.......(0x60d) : 0xAD860ADFB4
MSR_PKG_C3_RESIDENCY.......(0x3f8) : 0x2D814717E30
MSR_PKG_C6_RESIDENCY.......(0x3f9) : 0x0
MSR_PKG_C7_RESIDENCY.......(0x3fa) : 0x0
IA32_TSC_DEADLINE..........(0x6E0) : 0x144FEDDB2E17

CPU Ratio Info:
------------------------------------
CPU Low Frequency Mode.............: 800 MHz
CPU Maximum non-Turbo Frequency....: 3500 MHz
CPU Maximum Turbo Frequency........: 3900 MHz
CPU P-States [ (15) 32 38 ]
CPU C3-Cores [ 0 3 ]
CPU C6-Cores [ 0 1 2 3 ]
CPU C7-Cores [ 2 3 ]
Piker-Alpha commented 8 years ago

It may be fine. You should test this by running Cinebench (CPU) with the Intel Power Gadget and AppleIntelInfo.kext active. Then see what you get.

By the way. Do you have a hyper threading setting in your BIOS? Yeah I know. Your processor don't support it, but if you happen to have that setting, then please enable it and try again.

ndonkersloot commented 8 years ago

Thanks for your response! I'll test with cinebench instead of the yes loop to create load. Unfortunately I'm not able to test this in a couple of days but will reply the results.

I don't think there is an hyper threading option available in my BIOS but will check it in a couple of days.

ndonkersloot commented 8 years ago

@Piker-Alpha I've tested my system with Cinebench and also Geekbench. With Cinebench running at 4 threads the Intel Power Gadget tool give me steady 3,6Ghz frequency. When running with only 1 thread the frequency is fluctuating around 3,6Ghz and 3,67Ghz. When running Geekbench the frequency is all over the place fluctuating between 3,6Ghz and as high as 3,72Ghz! Both the Cinebench single core en Geekbench run yield higher frequency's but aren't steady.

I don't see an Hyper Threading option in my BIOS, so it can't be turned on or off. I think i'll do a clean install soon to see if that makes any differences. Before I do this i want to experiment with settings. Any tips?

ndonkersloot commented 8 years ago

@Piker-Alpha Lol.......

To test the turbo mode on my CPU I installed Windows 10 on a separate disk. Surprisingly I didn't get the 3,9Ghz there either. So the problem isn't in OS X nor it is in your awesome script.

After searching trough my BIOS I found turbo frequency settings for each core. With 1 core active 3,9Ghz, with 2 cores 3,8Ghz, with 3 cores, 3,7Ghz and finally 4 cores only at 3,6Ghz.. I've changed these values so that each cores turbo frequency is 3,9Ghz. Now when running CineBench i does indeed reach 3,9Ghz.

Thanks for your response and again for the effort in the OSX86 community. This issue can be solved.