daliansky / XiaoMi-Pro-Hackintosh

XiaoMi NoteBook Pro Hackintosh
BSD Zero Clause License
2.61k stars 473 forks source link

CPU Power management #22

Closed ghost closed 6 years ago

ghost commented 6 years ago

Hello again! I'm enthusiast so I don't know much about Native Power Management, but I found some faulty things in our setup: At first, SSDT-XCPM (or PluginType if you wish) configured wrong, as KabyLake+ DSDT (and our too), got the _PR0.PR00 tree, not _PR0.CPU0 as it was configured by rehabman by default (he made notes about KabyLake+ systems). I checked in MaciASL and yeah - our DSDT is using PR00 so I guess this should be fixed. Also I don't think CPUFriend is needed with this fix, as of my AppleIntelInfo report all is okay with HWP (pure setup, almost no kext and the only patched SSDT is SSDT-XCPM) AppleIntelInfo Report:

AppleIntelInfo.kext v2.9 Copyright © 2012-2017 Pike R. Alpha. All rights reserved.

Settings:
------------------------------------------
logMSRs..................................: 1
logIGPU..................................: 1
logCStates...............................: 1
logIPGStyle..............................: 1
InitialTSC...............................: 0x121d2d13954 (62 MHz)
MWAIT C-States...........................: 286531872

Processor Brandstring....................: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz

Processor Signature..................... : 0x806EA
------------------------------------------
 - Family............................... : 6
 - Stepping............................. : 10
 - Model................................ : 0x8E (142)

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

MSR_IA32_PLATFORM_ID.............(0x17)  : 0x1C000000000000
------------------------------------------
 - Processor Flags...................... : 7

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

MSR_PLATFORM_INFO................(0xCE)  : 0x4043DF1011400
------------------------------------------
 - Maximum Non-Turbo Ratio.............. : 0x14 (2000 MHz)
 - Ratio Limit for Turbo Mode........... : 1 (programmable)
 - TDP Limit for Turbo Mode............. : 1 (programmable)
 - Low Power Mode Support............... : 1 (LPM supported)
 - Number of ConfigTDP Levels........... : 2 (additional TDP level(s) available)
 - Maximum Efficiency Ratio............. : 4
 - Minimum Operating Ratio.............. : 4

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

MSR_PMG_IO_CAPTURE_BASE..........(0xE4)  : 0x51814
------------------------------------------
 - LVL_2 Base Address................... : 0x1814
 - C-state Range........................ : 5 (C-States not included, I/O MWAIT redirection not enabled)

IA32_MPERF.......................(0xE7)  : 0x1E840F08F5
IA32_APERF.......................(0xE8)  : 0x2625365093

MSR_FLEX_RATIO...................(0x194) : 0x100000
------------------------------------------

MSR_IA32_PERF_STATUS.............(0x198) : 0x25FB00002200
------------------------------------------
 - Current Performance State Value...... : 0x2200 (3400 MHz)

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

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

IA32_THERM_INTERRUPT.............(0x19B) : 0x10
------------------------------------------
 - High-Temperature Interrupt Enable.... : 0 (disabled)
 - Low-Temperature Interrupt Enable..... : 0 (disabled)
 - PROCHOT# Interrupt Enable............ : 0 (disabled)
 - FORCEPR# Interrupt Enable............ : 0 (disabled)
 - Critical Temperature Interrupt Enable : 1 (enabled)
 - Threshold #1 Value................... : 0
 - Threshold #1 Interrupt Enable........ : 0 (disabled)
 - Threshold #2 Value................... : 0
 - Threshold #2 Interrupt Enable........ : 0 (disabled)
 - Power Limit Notification Enable...... : 0 (disabled)

IA32_THERM_STATUS................(0x19C) : 0x88302800
------------------------------------------
 - 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.................... : 1
 - Cross Domain Limit Status............ : 0
 - Cross Domain Limit log............... : 0
 - Digital Readout...................... : 48
 - 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) : 0x2640000
------------------------------------------
 - Turbo Attenuation Units.............. : 0 
 - Temperature Target................... : 100
 - TCC Activation Offset................ : 2

MSR_MISC_PWR_MGMT................(0x1AA) : 0x401CC1
------------------------------------------
 - 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 : 1 (thermal interrupt routed to all cores)
 - SpeedShift Technology Enable......... : 1 (enabled)
 - SpeedShift Interrupt Coordination.... : 1 (enabled)
 - SpeedShift Energy Efficient Perf..... : 1 (enabled)
 - SpeedShift Technology Setup for HWP.. : Yes (setup for HWP)

MSR_TURBO_RATIO_LIMIT............(0x1AD) : 0x25252828
------------------------------------------
 - Maximum Ratio Limit for C01.......... : 28 (4000 MHz) 
 - Maximum Ratio Limit for C02.......... : 28 (4000 MHz) 
 - Maximum Ratio Limit for C03.......... : 25 (3700 MHz) 
 - Maximum Ratio Limit for C04.......... : 25 (3700 MHz) 

IA32_ENERGY_PERF_BIAS............(0x1B0) : 0x5
------------------------------------------
 - Power Policy Preference...............: 5 (balanced performance and energy saving)

MSR_POWER_CTL....................(0x1FC) : 0x24005F
------------------------------------------
 - 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) : 0x42816000DD8078
------------------------------------------
 - Package Power Limit #1............... : 15 Watt
 - Enable Power Limit #1................ : 1 (enabled)
 - Package Clamping Limitation #1....... : 1 (allow going below OS-requested P/T state during Time Window for Power Limit #1)
 - Time Window for Power Limit #1....... : 110 (163840 milli-Seconds)
 - Package Power Limit #2............... : 44 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) : 0x305791B
------------------------------------------
 - Total Energy Consumed................ : 3093 Joules (Watt = Joules / seconds)

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

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

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

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

MSR_PP1_POWER_LIMIT..............(0x640) : 0x0

MSR_PP1_ENERGY_STATUS............(0x641) : 0x6F37C
------------------------------------------
 - Total Energy Consumed................ : 27 Joules (Watt = Joules / seconds)

MSR_PP1_POLICY...................(0x642) : 0x18
------------------------------------------
 - Priority Level....................... : 24

MSR_CONFIG_TDP_NOMINAL...........(0x648) : 0x12
MSR_CONFIG_TDP_LEVEL1............(0x649) : 0x80050
MSR_CONFIG_TDP_LEVEL2............(0x64a) : 0x1400C8
MSR_CONFIG_TDP_CONTROL...........(0x64b) : 0x0
MSR_TURBO_ACTIVATION_RATIO.......(0x64c) : 0x0
MSR_PKGC3_IRTL...................(0x60a) : 0x884E
MSR_PKGC6_IRTL...................(0x60b) : 0x8876
MSR_PKGC7_IRTL...................(0x60c) : 0x8894
MSR_PKG_C2_RESIDENCY.............(0x60d) : 0x3E469EA5A0
MSR_PKG_C3_RESIDENCY.............(0x3f8) : 0x76C250E07C
MSR_PKG_C2_RESIDENCY.............(0x60d) : 0x3E469EA5A0
MSR_PKG_C3_RESIDENCY.............(0x3f8) : 0x76C250E07C
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) : 0x2188426 
------------------------------------------

MSR_PPERF........................(0x64E) : 0x2312C23A21
------------------------------------------
 - Hardware workload scalability........ : 150638574113

MSR_CORE_PERF_LIMIT_REASONS......(0x64F) : 0x3D000000
------------------------------------------
 - 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..................... : 1 (status bit has asserted)
 - Package/Platform-Level #1 Power Limit : 1 (status bit has asserted)
 - Package/Platform-Level #2 Power Limit : 1 (status bit has asserted)
 - Max Turbo Limit Log.................. : 1 (status bit has asserted)
 - Turbo Transition Attenuation Log..... : 1 (status bit has asserted)
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) : 0x121D53A278D
MSR_PPERF........................(0x63E) : 0x1 (18)

IA32_PM_ENABLE...................(0x770) : 0x1 (HWP Supported and Enabled)

IA32_HWP_CAPABILITIES............(0x771) : 0x1081228
-----------------------------------------
 - Highest Performance.................. : 40
 - Guaranteed Performance............... : 18
 - Most Efficient Performance........... : 8
 - Lowest Performance................... : 1

IA32_HWP_INTERRUPT...............(0x773) : 0x0
------------------------------------------
 - Guaranteed Performance Change........ : 0 (Interrupt generation disabled)
 - Excursion Minimum.................... : 0 (Interrupt generation disabled)

IA32_HWP_REQUEST................(0x774) : 0x78282804
-----------------------------------------
 - Minimum Performance................. : 4
 - Maximum Performance................. : 40
 - Desired Performance................. : 40
 - Energy Efficient Performance........ : 120
 - Activity Window..................... : 0, 0
 - Package Control..................... : 0

IA32_HWP_STATUS..................(0x777) : 0x0
-----------------------------------------
 - Guaranteed Performance Change....... : 0 (has not occured)
 - Excursion To Minimum................ : 0 (has not occured)

CPU Ratio Info:
------------------------------------------
Base Clock Frequency (BLCK)............. : 100 MHz
Maximum Efficiency Ratio/Frequency.......:  4 ( 400 MHz)
Maximum non-Turbo Ratio/Frequency........: 20 (2000 MHz)
Maximum Turbo Ratio/Frequency............: 40 (4000 MHz)

IGPU Info:
------------------------------------------
IGPU Current Frequency...................:    0 MHz
IGPU Minimum Frequency...................:  300 MHz
IGPU Maximum Non-Turbo Frequency.........:  300 MHz
IGPU Maximum Turbo Frequency.............: 1150 MHz
IGPU Maximum limit.......................: No Limit

P-State ratio * 100 = Frequency in MHz
------------------------------------------
CPU P-States [ (13) 22 35 ] iGPU P-States [ ]
CPU C3-Cores [ 1 4 5 ]
CPU C7-Cores [ 1 2 3 4 7 ]
CPU P-States [ (13) 22 35 ] iGPU P-States [ ]
CPU C3-Cores [ 1 2 3 4 5 ]
CPU C7-Cores [ 0 1 2 3 4 5 7 ]
CPU C3-Cores [ 0 1 2 3 4 5 6 7 ]
CPU C7-Cores [ 0 1 2 3 4 5 6 7 ]
CPU P-States [ 13 (20) 22 35 ] iGPU P-States [ ]
CPU P-States [ 13 20 22 (24) 35 ] iGPU P-States [ ]
MBP-Pavel:~ pavel$ sudo cat /tmp/AppleIntelInfo.dat
Password:
AppleIntelInfo.kext v2.9 Copyright © 2012-2017 Pike R. Alpha. All rights reserved.

Settings:
------------------------------------------
logMSRs..................................: 1
logIGPU..................................: 1
logCStates...............................: 1
logIPGStyle..............................: 1
InitialTSC...............................: 0x121d2d13954 (62 MHz)
MWAIT C-States...........................: 286531872

Processor Brandstring....................: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz

Processor Signature..................... : 0x806EA
------------------------------------------
 - Family............................... : 6
 - Stepping............................. : 10
 - Model................................ : 0x8E (142)

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

MSR_IA32_PLATFORM_ID.............(0x17)  : 0x1C000000000000
------------------------------------------
 - Processor Flags...................... : 7

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

MSR_PLATFORM_INFO................(0xCE)  : 0x4043DF1011400
------------------------------------------
 - Maximum Non-Turbo Ratio.............. : 0x14 (2000 MHz)
 - Ratio Limit for Turbo Mode........... : 1 (programmable)
 - TDP Limit for Turbo Mode............. : 1 (programmable)
 - Low Power Mode Support............... : 1 (LPM supported)
 - Number of ConfigTDP Levels........... : 2 (additional TDP level(s) available)
 - Maximum Efficiency Ratio............. : 4
 - Minimum Operating Ratio.............. : 4

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

MSR_PMG_IO_CAPTURE_BASE..........(0xE4)  : 0x51814
------------------------------------------
 - LVL_2 Base Address................... : 0x1814
 - C-state Range........................ : 5 (C-States not included, I/O MWAIT redirection not enabled)

IA32_MPERF.......................(0xE7)  : 0x1E840F08F5
IA32_APERF.......................(0xE8)  : 0x2625365093

MSR_FLEX_RATIO...................(0x194) : 0x100000
------------------------------------------

MSR_IA32_PERF_STATUS.............(0x198) : 0x25FB00002200
------------------------------------------
 - Current Performance State Value...... : 0x2200 (3400 MHz)

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

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

IA32_THERM_INTERRUPT.............(0x19B) : 0x10
------------------------------------------
 - High-Temperature Interrupt Enable.... : 0 (disabled)
 - Low-Temperature Interrupt Enable..... : 0 (disabled)
 - PROCHOT# Interrupt Enable............ : 0 (disabled)
 - FORCEPR# Interrupt Enable............ : 0 (disabled)
 - Critical Temperature Interrupt Enable : 1 (enabled)
 - Threshold #1 Value................... : 0
 - Threshold #1 Interrupt Enable........ : 0 (disabled)
 - Threshold #2 Value................... : 0
 - Threshold #2 Interrupt Enable........ : 0 (disabled)
 - Power Limit Notification Enable...... : 0 (disabled)

IA32_THERM_STATUS................(0x19C) : 0x88302800
------------------------------------------
 - 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.................... : 1
 - Cross Domain Limit Status............ : 0
 - Cross Domain Limit log............... : 0
 - Digital Readout...................... : 48
 - 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) : 0x2640000
------------------------------------------
 - Turbo Attenuation Units.............. : 0 
 - Temperature Target................... : 100
 - TCC Activation Offset................ : 2

MSR_MISC_PWR_MGMT................(0x1AA) : 0x401CC1
------------------------------------------
 - 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 : 1 (thermal interrupt routed to all cores)
 - SpeedShift Technology Enable......... : 1 (enabled)
 - SpeedShift Interrupt Coordination.... : 1 (enabled)
 - SpeedShift Energy Efficient Perf..... : 1 (enabled)
 - SpeedShift Technology Setup for HWP.. : Yes (setup for HWP)

MSR_TURBO_RATIO_LIMIT............(0x1AD) : 0x25252828
------------------------------------------
 - Maximum Ratio Limit for C01.......... : 28 (4000 MHz) 
 - Maximum Ratio Limit for C02.......... : 28 (4000 MHz) 
 - Maximum Ratio Limit for C03.......... : 25 (3700 MHz) 
 - Maximum Ratio Limit for C04.......... : 25 (3700 MHz) 

IA32_ENERGY_PERF_BIAS............(0x1B0) : 0x5
------------------------------------------
 - Power Policy Preference...............: 5 (balanced performance and energy saving)

MSR_POWER_CTL....................(0x1FC) : 0x24005F
------------------------------------------
 - 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) : 0x42816000DD8078
------------------------------------------
 - Package Power Limit #1............... : 15 Watt
 - Enable Power Limit #1................ : 1 (enabled)
 - Package Clamping Limitation #1....... : 1 (allow going below OS-requested P/T state during Time Window for Power Limit #1)
 - Time Window for Power Limit #1....... : 110 (163840 milli-Seconds)
 - Package Power Limit #2............... : 44 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) : 0x305791B
------------------------------------------
 - Total Energy Consumed................ : 3093 Joules (Watt = Joules / seconds)

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

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

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

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

MSR_PP1_POWER_LIMIT..............(0x640) : 0x0

MSR_PP1_ENERGY_STATUS............(0x641) : 0x6F37C
------------------------------------------
 - Total Energy Consumed................ : 27 Joules (Watt = Joules / seconds)

MSR_PP1_POLICY...................(0x642) : 0x18
------------------------------------------
 - Priority Level....................... : 24

MSR_CONFIG_TDP_NOMINAL...........(0x648) : 0x12
MSR_CONFIG_TDP_LEVEL1............(0x649) : 0x80050
MSR_CONFIG_TDP_LEVEL2............(0x64a) : 0x1400C8
MSR_CONFIG_TDP_CONTROL...........(0x64b) : 0x0
MSR_TURBO_ACTIVATION_RATIO.......(0x64c) : 0x0
MSR_PKGC3_IRTL...................(0x60a) : 0x884E
MSR_PKGC6_IRTL...................(0x60b) : 0x8876
MSR_PKGC7_IRTL...................(0x60c) : 0x8894
MSR_PKG_C2_RESIDENCY.............(0x60d) : 0x3E469EA5A0
MSR_PKG_C3_RESIDENCY.............(0x3f8) : 0x76C250E07C
MSR_PKG_C2_RESIDENCY.............(0x60d) : 0x3E469EA5A0
MSR_PKG_C3_RESIDENCY.............(0x3f8) : 0x76C250E07C
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) : 0x2188426 
------------------------------------------

MSR_PPERF........................(0x64E) : 0x2312C23A21
------------------------------------------
 - Hardware workload scalability........ : 150638574113

MSR_CORE_PERF_LIMIT_REASONS......(0x64F) : 0x3D000000
------------------------------------------
 - 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..................... : 1 (status bit has asserted)
 - Package/Platform-Level #1 Power Limit : 1 (status bit has asserted)
 - Package/Platform-Level #2 Power Limit : 1 (status bit has asserted)
 - Max Turbo Limit Log.................. : 1 (status bit has asserted)
 - Turbo Transition Attenuation Log..... : 1 (status bit has asserted)
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) : 0x121D53A278D
MSR_PPERF........................(0x63E) : 0x1 (18)

IA32_PM_ENABLE...................(0x770) : 0x1 (HWP Supported and Enabled)

IA32_HWP_CAPABILITIES............(0x771) : 0x1081228
-----------------------------------------
 - Highest Performance.................. : 40
 - Guaranteed Performance............... : 18
 - Most Efficient Performance........... : 8
 - Lowest Performance................... : 1

IA32_HWP_INTERRUPT...............(0x773) : 0x0
------------------------------------------
 - Guaranteed Performance Change........ : 0 (Interrupt generation disabled)
 - Excursion Minimum.................... : 0 (Interrupt generation disabled)

IA32_HWP_REQUEST................(0x774) : 0x78282804
-----------------------------------------
 - Minimum Performance................. : 4
 - Maximum Performance................. : 40
 - Desired Performance................. : 40
 - Energy Efficient Performance........ : 120
 - Activity Window..................... : 0, 0
 - Package Control..................... : 0

IA32_HWP_STATUS..................(0x777) : 0x0
-----------------------------------------
 - Guaranteed Performance Change....... : 0 (has not occured)
 - Excursion To Minimum................ : 0 (has not occured)

CPU Ratio Info:
------------------------------------------
Base Clock Frequency (BLCK)............. : 100 MHz
Maximum Efficiency Ratio/Frequency.......:  4 ( 400 MHz)
Maximum non-Turbo Ratio/Frequency........: 20 (2000 MHz)
Maximum Turbo Ratio/Frequency............: 40 (4000 MHz)

IGPU Info:
------------------------------------------
IGPU Current Frequency...................:    0 MHz
IGPU Minimum Frequency...................:  300 MHz
IGPU Maximum Non-Turbo Frequency.........:  300 MHz
IGPU Maximum Turbo Frequency.............: 1150 MHz
IGPU Maximum limit.......................: No Limit

P-State ratio * 100 = Frequency in MHz
------------------------------------------
CPU P-States [ (13) 22 35 ] iGPU P-States [ ]
CPU C3-Cores [ 1 4 5 ]
CPU C7-Cores [ 1 2 3 4 7 ]
CPU P-States [ (13) 22 35 ] iGPU P-States [ ]
CPU C3-Cores [ 1 2 3 4 5 ]
CPU C7-Cores [ 0 1 2 3 4 5 7 ]
CPU C3-Cores [ 0 1 2 3 4 5 6 7 ]
CPU C7-Cores [ 0 1 2 3 4 5 6 7 ]
CPU P-States [ 13 (20) 22 35 ] iGPU P-States [ ]
CPU P-States [ 13 20 22 (24) 35 ] iGPU P-States [ ]
CPU P-States [ (13) 20 22 24 25 35 ] iGPU P-States [ ]
CPU P-States [ (4) 13 20 22 24 25 35 ] iGPU P-States [ ]
CPU P-States [ 4 (13) 20 22 24 25 28 35 ] iGPU P-States [ ]
CPU P-States [ 4 13 (20) 22 24 25 28 35 ] iGPU P-States [ (30) ]
CPU P-States [ 4 13 20 22 24 25 28 35 (37) ] iGPU P-States [ 30 ]
CPU P-States [ 4 13 20 22 24 25 (26) 28 35 37 ] iGPU P-States [ 30 ]
CPU P-States [ 4 13 20 22 24 25 26 28 (32) 35 37 ] iGPU P-States [ 30 ]
CPU P-States [ 4 13 20 22 (23) 24 25 26 28 32 35 37 ] iGPU P-States [ 30 ]
CPU P-States [ 4 13 20 22 23 24 25 26 28 32 (34) 35 37 ] iGPU P-States [ 30 ]
CPU P-States [ 4 13 (18) 20 22 23 24 25 26 28 32 34 35 37 ] iGPU P-States [ 30 ]
CPU P-States [ 4 13 18 20 (21) 22 23 24 25 26 28 32 34 35 37 ] iGPU P-States [ 30 ]
CPU P-States [ 4 13 18 20 21 22 23 24 25 26 28 (31) 32 34 35 37 ] iGPU P-States [ 30 ]
CPU P-States [ 4 13 18 20 21 22 23 24 25 26 28 (29) 31 32 34 35 37 ] iGPU P-States [ 30 ]
CPU P-States [ 4 13 (17) 18 20 21 22 23 24 25 26 28 29 31 32 34 35 37 ] iGPU P-States [ 30 ]
CPU P-States [ 4 13 17 18 (19) 20 21 22 23 24 25 26 28 29 31 32 34 35 37 ] iGPU P-States [ 30 ]
CPU P-States [ 4 13 17 18 19 20 21 22 23 24 25 (26) 28 29 31 32 34 35 37 ] iGPU P-States [ 30 ]
ghost commented 6 years ago

Ramark about SSDT-XCPM - it's disabled in config.plist by rehabman because it's generating via PluginType=True anyway.

stevezhengshiqi commented 6 years ago

Thanks for your reporting again! I agree with you that SSDT-Plugintype1 is a mistake and is not needed if Plugintype is checked in config. I have already deleted this file in my own github.

I have worked on HWP for a while and I am interested with your method. What I have done is here: https://www.tonymacx86.com/threads/skylake-hwp-enable.214915/page-25#post-1732891. The author in the thread said XCPM and HWP cannot be both opened on Kabylake, which I confirmed. So the daliansky's EFI only opens XCPM not HWP technically. Could you send your CLOVER file to me. I am curious about

(pure setup, almost no kext and the only patched SSDT is SSDT-XCPM)

Maybe you generate a patched SSDT-XCPM and change the frequencyvector to enable HWP? That's what I want to do but it requires time and effort. If the Power Gadget shows the appropriate frequency shifting graph, then I will submit your changes to daliansky who is quite busy right now.

ghost commented 6 years ago

I did nothing special, just generated valid and accurate SMBIOS and used clean info from tonymacx86 and RehabMan GitHub repo, I want to do all as clean as possible so I don't touch dialinsky sources at all. Maybe it'll require more time to investigate things dialinsky already solved but it's a challenge and adventure for me 😄 . As I said there is nothing interesting in my Clover as for now it's Rehabman's base, but here it is. experiemental.zip

stevezhengshiqi commented 6 years ago

After seeing your CLOVER, I think I tried to remove CPUFriend* before, which is a little bit similar to your situation. The result I get is not efficient CPU Power management. Could you try to use the following software and post your graph? I install all my kexts in /L/E, so it's a bit hard for me to stimulate the same environment as yours. Intel® Power Gadget-2.dmg.zip (Maybe it's in Chinese, but it should function in the same way as an English version)

ghost commented 6 years ago

Oh, I'm using it already. Okay, for now I don't have access to my laptop, but I'll post it as fast as I can.

ghost commented 6 years ago

My graph: I used youtube + 4 Safari tabs + Mail Client + Telegram. 2018-05-11 21 32 21

stevezhengshiqi commented 6 years ago

I tired to stimulate the same condition as you. My graph: I used youtube + 4 Safari tabs(includes youtube webpage) + Mail Client + QQ(you can say Chinese Telegram). I modified the lowest frequency(from default 1300mhz to 400mhz) by using CPUFirendDataProvider, and the battery performance may be better. screen shot 2018-05-12 at 13 23 54

ghost commented 6 years ago

Seems really good, but I deleted CPUFriend from my setup. I guess it's can be done via HWP field in Clover. I got i7 version if that matters. UPD: Steve, sorry about writing it here, but I can't open an issue in your repository. I installed your version as it's newer and more optimized, but seems like USBInjectAll doesn't work right. Ports HS05 and HS08 (which is Intel Bluetooth and ELAN Fingerprint sensor) aren't injected in SSDT-UIAC but still there according to IORegistryExplorer.

stevezhengshiqi commented 6 years ago

Mine is i7 too. The Clover's HWP is not prefect I think. Reference:https://www.tonymacx86.com/threads/skylake-hwp-enable.214915/page-8

Thanks for Rehabman remind, I only focus power saving result and forget about sleep / wake up issue. HWP disabled after wake up issue only affect Clover method, dummy injector method have no problem, tested with NV GT630, since my IGPU has common sleep / wake up issue, it is not a problem for me.

For Q2, I just tested it and I don't find any problem. HS05 is injected and HS08 is not, which matches the result in IORegistryExplorer. screen shot 2018-05-12 at 17 49 10

screen shot 2018-05-12 at 17 48 32

ghost commented 6 years ago

The Clover's HWP is not prefect I think. Reference:https://www.tonymacx86.com/threads/skylake-hwp-enable.214915/page-8

This post is one-year old, AFAIK Clover team fixed that bug. Can you please post report from AppleIntelInfo with your version (CPUFriend)? (chown\chmod it and run for 5 minutes and only after it get logs, because it doesn't determine all PStates immediately)

I just tested it and I don't find any problem. HS05 is injected and HS08 is not

My fault. BTW did you got working Intel Bluetooth without Ubuntu/Windows being booted? Mine just eating battery and don't work.

stevezhengshiqi commented 6 years ago

Sorry for delay. I am very busy right now. Since I am using HWPEnabler.kext, I have to replace it with CPUFriend.kext and send the report to you. Maybe a few days later I will do it.

ghost commented 6 years ago

Any updates on native HWP?

stevezhengshiqi commented 6 years ago

It seems like HWPEnabler.kext won't work after sleep, so do HWPEnable in Clover. My solution is using a sleepwatcher to reload HWPEnabler.kext after every sleep, but this solution has to be done in system partition.

ghost commented 6 years ago

Eh, doesn't feel like something solid and clean. What's about current setup? It uses XCPM? After all, did you tried without kexts at all? I'm using MBP14,2 SMBIOS and it looked like HWP is worked. Also you can try to inject HWP value without enabling HWP in Clover if you don't like power consumption.

gplast commented 6 years ago

Hello and thank you for all your effort and for this great repository. I don't have the knowledge yet to contribute but im always testing stuff to find out if i can help. I'm a computer engineering so i'm trying to understand some stuff about black80211 for example in order to make wifi work, but i have limited time so testing some stuff only on weekends.

Anyway, I have a Xiaomi Notebook Pro the i5 version, and i'm using stevezhengshiqi repository and everything works great. I have triple boot on my laptop, Windows, Linus (Elementary), Mac OS and on all this operating systems i like to monitor cpu temperature and usage. I noticed that Linux has the best power management, with temp always around 40 with no fans on, battery lasting at least 6-7 hours. Then Windows is working close to Linux but the fans are working more that Linux but again if enable battery saver i can get around 7-8 hours. On Windows i also monitor power consumption and i noticed that if i have my laptop idling the consumption can dropped at 3mW and on average is 8mW.

The problem is that on Mac OS the fans are always working, and i have to keep my laptop idling for around 5 minutes in order have the fans stopped and then if i open a new tab the fans start again. Also the temp is around 40 but with the fans on. Regarding power consumption i tested it with the same conditions as on Windows, and i noticed that the lowest power consumption that we can achieve is 6mW and on average is above 10mW.

Do you know what is the cause for that? I am searching some stuff but if you can help me understand what might be the problem i will appreciate that. I'm using BatteryBar on windows and coconutBattery on Mac OS to find the power consumption.

stevezhengshiqi commented 6 years ago

Thank you guys for reply. I am really happy that you both have provided detailed feedback. Well, I recently will have a summer school in US for about 4 weeks; and maybe I don't have time to work on PM during the time. Hope someone can make our device have a more efficient PM.

I can explain the theory of PM in my repository, which is one of the best ideas I can think of. First, it's a good idea to use native SMBIOS settings(MacBookPro 14,1), but I don't think it's efficient enough. We can look at the frequency vector in X86PlatformPlugin.kext(/System/Library/Extensions/IOPlatformPluginFamily.kext/Contents/PlugIns/X86PlatformPlugin.kext/Contents/Resources/Mac-B4831CEBD52A0C4C.plist). It shows that the minimum frequency is 1300mhz, a bit high. screen shot 2018-06-10 at 22 31 01 0d means 13 in denary number. I changed value here to 04, which means 400mhz. The reason I choose 400mhz is that the script from https://github.com/Piker-Alpha/freqVectorsEdit.sh recommends this value.

After dealing with minimum frequency, we can also modify PM mode to "power-saving mode". According to post #67 at (https://www.tonymacx86.com/threads/skylake-hwp-enable.214915/page-7), I find and replace "65707000 00000000 00000000 00000000 00000000 80000000" to "65707000 00000000 00000000 00000000 00000000 C0000000". "C0" represents a more power saving mode.

Then we can get a patched Mac-B4831CEBD52A0C4C.plist. In order to keep system partition clean, we have to use kexts to inject our new PM plist. So CPUFriend from PMHeart is probably a good idea. By using ResourceConvertor.sh, we get a CPUFriendDataProvider.kext. With CPUFriend and CPUFriendDataProvider, the new PM plist will override the origin one.

The power behavior can be seen at #8 at this page. The minimum frequency surely dropped, from 1300mhz to about 790mhz. Also, the average Power and Frequency is lower than @PavelLJ 's picture when we have almost the same Utilization. Actually, the average Utilization of my device is a bit higher though my average power is lower, suggesting a more efficient PM I guess?

The problem I meet: By using CPUFriend*.kext, the PM uses XCPM. I am trying to open HWP, but the thread (https://www.tonymacx86.com/threads/skylake-hwp-enable.214915/) says XCPM and HWP can't be opened both at KabyLake. It seems like origin SMBIOS settings with no CPUFriend*.kext can let HWP work, but I don't think this way is efficient since the high minfrequency and power-saving mode. What's more, it's really time-consuming to test PM by using AppleIntelInfo.kext. If someone can provide a better idea, that will be really nice.

Please post your PM test screenshot with youtube + 4 Safari tabs + Mail Client + Telegram if you have a better PM. 39953929-0407b148-55e8-11e8-8481-d9b379af6cc5

ghost commented 6 years ago

Okay, this is my idea: as Clover provides HWP value (which is actually a configuration of how speedshifting should work), as I checked earlier HWP works with origin SMBIOS, so I can just leave "HWPEnable" of Clover and not kill power management after sleep. I can choose the config value which will be power efficent enough (there is a grade with about 90 values) and inject it through Clover. Test will be there soon, now I just don't have enough time to play around my laptop.

gplast commented 6 years ago

Thank you for your answer, i don't have a better PM because i'm using everything that you have at this time. I notice a few months ago that indeed the frequency was not as low as on windows so i used freqVectorsEdit.sh and managed to drop it to 790mhz.

I also noticed something that its worth mention it. While using Chrome i notice that the temp and the cpu usage while watching youtube its higher than Safari. I mean that if i open a chrome tab or a youtube tap the fans kick off and the temp is 46C for a few minutes. Last night i was watching youtube with Safari and the fans didn't even started in some cases!!!

Also i would like to share a tip with you. I purchased Turbo Boost Switcher Pro two months ago, which gives you the option to disable turbo boost and i'm really using it while i'm on battery(There is an autoswitcher when you use battery). This does not let the fans kick off so quickly and the temperature does not have these spikes while using the laptop for browsing etc. Even now i used my laptop for 1 hour, and the CoconutBattery says that i have 6 hours remaining time with power consumption 8-9mW on average. I hope that helps.

stevezhengshiqi commented 6 years ago

@PavelLJ Thank you, I will try this way later. @gplast Thanks for reply. The reason I don't recommend to use freqVectorsEdit.sh directly is that it modifies Mac-B4831CEBD52A0C4C.plist in system partition, which I personally dislike. So, an external injector is needed. The PM now I think it's efficient enough; and I give my screenshot to prove that. Since different people have different ways to use the device, the battery life results are not identical. Also, bad-written softwares may also cause low battery life. The PM using now it's quite native: Clover can read CpuPm tables from our device if PluginType is checked in config.plist.

The Turbo Boost Switcher idea is great, but it can't be moved into EFI folder. Some users may need turbo boost for battery life as well. I can't deny that it's a good software for those people who care for battery life more. It seems like you have found a solution for your problem, good for you.

gplast commented 6 years ago

Yes of course, i also think that PM is really efficient at this time i just had to let you know about the differences between the performance on different operating systems.

I am using hackintosh for the past 4 year (also installed on my Dell Latitude E6520 ) and the temperature was always better on Mac OS compared to Windows so i think that i might do a fresh install on my machine since i can see some stuff that it might be my fault.

Thank you for everything again and have a nice time on the summer school :)

ghost commented 6 years ago

By the way, continuing talks about HWP: As i mentioned before i played around BIOS, and with latest one (today I upgraded to 0603 BIOS), there is interesting setting like Intel SpeedShift (aka native HWP even on Windows) and DVMT (which needs a fix now but it's can be abandoned if we change BIOS value to right one). I already did this and i should say it's almost safe (changes in NVRAM may be reverted by plugging off the battery from the computer). Also there is native 0xE2 problem fix (CFG LOCK option in BIOS). I think it's intriguing enough to make you google something about it. Here is variables from 603 BIOS IFR.txt UPD: As a proof of my decisions i need to attach a AIDA64 screenshot with stock values of 0603 BIOS. aida

Delitants commented 6 years ago

I'm on bios 502, I left laptop in sleep mode for a night (fully charged), in the morning I see the charge dropped to %43. No good

stevezhengshiqi commented 6 years ago

@Neolo The quick drop is your own problem. Please check your settings and try to find the reason by yourself.

If you keep on questioning the EFI folder, instead of trying to find the reason or giving constructive suggestions, I will just ignore you.

Delitants commented 6 years ago

Huh. I report the issue, it's clean install with YOUR efi folder. You should appreciate when someone tests your work, instead of being rude. I'm pretty sure you haven't done any of a real life tests. 5 clicks, 2 min youtube video playback it's all you do, and getting mad.

ghost commented 6 years ago

@Neolo Dude, don't be rude to the guy who developed the folder and maintaining it for free, it's awful. By the way try to turn off BIOS USB charger at all, it helped me. Sleep is 80% not straight depends on OS. Also try to find hibernate - disable it as it wouldn't work and will wake your laptop after 5hrs. Also, disable PowerNap if it's enabled.

kampav commented 6 years ago

@Neolo, Steve is really doing good job and helping us by maintaining the codebase. Sometimes we don't install property hence some of the bugs.

Delitants commented 6 years ago

I'm rude? I wrote a single sentence that battery died in sleep, he responded "it's your problem". Who the heck is rude here?? Gihub is in general free, if you are getting insulted so easily by comments, wipe it down and start paid project. Jesus Christ! Crazy! BYE

FYI: Folder is a scrap of other's work, by the way.

stevezhengshiqi commented 6 years ago

@Neolo Thanks for reply. It's welcome for everyone to post issue. What I am not happy with is that you are not trying to find the reason behind the issue by yourself except just reporting. It's not helpful for development because no constructive suggestions are given. You are the only person who can debug your EFI folder since the battery issue happens on YOUR device. What I can do as an EFI contributor is to share my work on PM to public. If no better suggestions are given, the issue will never be solved, resulting endless argues.

As you said "5 clicks, 2 min youtube video playback" can't prove anything, your one night battery drop can't prove anything either.

Also I don't quite agree with your saying "Github is in general free". I think we should respect Github as a public place where wise programmers from all over the world share their valuable thoughts and codes, instead of a place for free chat.

masterbater commented 6 years ago

@stevezhengshiqi can you provide me your origin folder, the newest one you have now. I need to patch dsdt for voodooi2c

stevezhengshiqi commented 6 years ago

@masterbater Sure, if you mean CLOVER/ACPI/origin . origin.zip I think Xiaomi NoteBook Pro's trackpad don't need to be patched for VoodooI2C according to what https://voodooi2c.github.io/#GPIO%20Pinning/GPIO%20Pinning says:

If you do not have IOInterruptSpecifiers listed as above then you are good to go and can skip straight to the section Installing the kext.

2018-07-10 13 50 34

masterbater commented 6 years ago

Thanks @stevezhengshiqi apparently i've got a lenovo 320-15ikb which has the same major specification for xiaomi mi pro i7 8550u intel uhd 620, I am using your repo, working great very happy with it i feel like its much faster and more updated than daliansky's version, only trackpad is not working no prefpane and gestures since i have an elan, elan0611. I hope you could take a look with the screenshot and see if you could shed me some information what i need to do but nonetheless very happy for your support around here. screen shot 2018-07-11 at 4 57 07 am

stevezhengshiqi commented 6 years ago

@masterbater Happy to hear that even other model can work well with the EFI folder. For VoodooI2C installation, you can read guide: https://voodooi2c.github.io/#Installation/Installation .

Or you can send me your CLOVER folder(press F4/Fn+F4 in Clover boot interface) and ioreg file. I can help if I am free. (I amn't 100% sure to make your trackpad work, and I will do my best.)

masterbater commented 6 years ago

I updated to the newest version of voodoi2c, cursor wont stop moving, and no gestures and prefpane Here is ioreg and efi which is the latest release on your repo.

Lenovo 320-15ikb i78500u ioregElan0611.zip

TrackpadElan0611.zip

stevezhengshiqi commented 6 years ago

@masterbater I need your origin DSDT, please press F4/Fn+F4 in Clover boot interface and send CLOVER/ACPI/origin .

masterbater commented 6 years ago

CloverwithOrigin.zip

stevezhengshiqi commented 6 years ago

@masterbater Test 1.zip Hope it can work. And if not work, could you open another issue, since it's out of topic.

masterbater commented 6 years ago

Thanks, will try it, ill open an issue once its not working. Thanks for the effort @stevezhengshiqi

stevezhengshiqi commented 6 years ago

@masterbater You can send trouble shooting files(https://voodooi2c.github.io/#Troubleshooting/Troubleshooting) to https://gitter.im/alexandred/VoodooI2C for professional aid. It's better to review the whole installation process (https://voodooi2c.github.io/#Installation/Installation)

kampav commented 6 years ago

@stevezhengshiqi Really need help. I followed your instructions to upgrade to Mojave latest beta, ran hdpi to fix graphics and ran ktext utility and now the system boots but before login screen appears. I tried using USB to boot into installation but no luck. Thank you so much for your help in advance

stevezhengshiqi commented 6 years ago

@PavelLJ Hi, I think I finally find a great solution. I grab MBP15,2's PM file from Mojave(Mac-827FB448E656EC26.plist), which is able to let High Sierra work in both XCPM mode and HWP mode.

stevezhengshiqi commented 6 years ago

@kampav I am using Mojave beta4; and I heard that VoodooI2C could cause KP in pb3. So I recommend to update 10.14(18a336e). Later I will submit new EFI for Mojave which you can test.

One more thing you can do is trying to uninstall hidpi, see the interaction here: Recovery

ghost commented 6 years ago

@stevezhengshiqi Quite interesting, but as I already said HWP is not working fully and properly because Xiaomi disabled such feature, so it should co-exist with XCPM. I'm trying to resolve this problem now and as soon as I will get some results i will write here.

stevezhengshiqi commented 6 years ago

@PavelLJ Hope you can make progress! Enable the native HWP function in BIOS is undoubtedly the best solution. I didn't find a clear way on about how to enable it. (It seems like most laptop manufactor disable HWP function in BIOS)Wait for your good news.

ghost commented 6 years ago

@stevezhengshiqi, well, here it is. Big thanks to Cyb from 4PDA, he helped me much. exps3.zip It's H2OUVE patch that apply SpeedShift enable by changing UEFI variables. Actually it works a bit worse than stock on Windows, but that's because it's got unconfigured EPP profile and other stuff is not implemented right in Windows, so i guess we should experiement with HWP now. What I need to do is just to delete CPUFriend and disable Plugin-type, right? P.S As far as I know to fully get rid of XCPM bugs we also need to unlock 0xE2 on our BIOS, i will dig a bit into it.

ghost commented 6 years ago

@stevezhengshiqi update: also we manageded to disable 0xE2, again, big thanks to Cyb from 4pda. I actually didn't tested that but i would now and i will write UPD when i'll be ready. exps4.zip

stevezhengshiqi commented 6 years ago

@PavelLJ I tested with CFG unlock patch and voltage unlock patch. They are super great. I don't need 0xE2 Clover patch anymore. Speedshift test still needs more time. So, we should completely close XCPM and HWP in macOS and let CPU to run its own XCPM and HWP method?

ghost commented 6 years ago

I think so. XCPM is an OS Power Management, which is mandatory anyway, but it works well with HWP, just switching HWP profiles and describing load situation. Now it should work natively, but with one huge "but" - it should have proper SMBIOS, so I guess it's time to move to Mojave and use MBP15,2 SMBIOS.

stevezhengshiqi commented 6 years ago

OK, thanks for explaining. Just personal opinion, Mojave is not that good compared to High Sierra for now(for example trackpad gestures). Also, my newest release's CPUFriendDataProvider has used MBP15,2 's X86Plugin PM file, so I think it's not necessary to move to Mojave and change SMBIOS.

stevezhengshiqi commented 6 years ago

@PavelLJ Hi, I may ask too much, but could you write another script to lock the TDP? Sometimes TDP setting is reset to default though I changed it.

ghost commented 6 years ago

@stevezhengshiqi are you sure TDP changes is bios-related? I mean it can be done via BIOS but XTU-like utilities do it another way. I have a bit offtop question - my wifi card from Taobao doesn't work under Windows, i tried bootcamp drivers and a lot of other stuff, but it gives me code 10. I use Windows really rarely but sometimes i need connection on it. Does your card works under Windows?