Piker-Alpha / ssdtPRGen.sh

Script to generate a SSDT for Power Management
714 stars 155 forks source link

Xeon W3565 #284

Open Mtkhan13 opened 7 years ago

Mtkhan13 commented 7 years ago

Hi, I've used user defined method with -p argument to run the script and the script ran and generated ssdt.dsl file but with the long list of errors. As I'm new to this so can you please tell me what are these errors about and how I can fix all these to make the ssdt workable with my system. I'm attaching generated ssdt file as well.

I appreciate your help.

Thanks a lot.

ssdtPRGen.sh v20.4 output

System information: Mac OS X 10.9.5 (13F1911)
Brandstring: "Intel(R) Xeon(R) CPU W3565 @ 3.20GHz"

Override value: (-p) processor model, now using: W3565!
Version: models.cfg v160 / User Defined.cfg v-1

Scope (_PR_) {752 bytes} with ACPI Processor declarations found in DSDT (ACPI 1.0 compliant)
Notice: Downloading Restrictions.cfg ...
Generating ssdt.dsl for a 'MacPro4,1' with board-id [Mac-F221BEC8]
Intel W3565 processor [0x106A5] setup [0x]
With a maximum TDP of 130 Watt, as specified by Intel
Number logical CPU's: 8 (Core Frequency: 3200 MHz)
Number of Turbo States: 2 (3306-3460 MHz)
Number of P-States: 18 (1600-3460 MHz)
Injected C-States for ._PR (C1,C3,C6)
Warning: 'board-id' [Mac-F221BEC8] is not supported by Unknown power management
Warning: 'system-type' may be set improperly (3 instead of 0)
     - Clover users should read https://clover-wiki.zetam.org/Configuration/ACPI#acpi_smartupsNotice: Downloading iasl.zip ...

Compiling: ssdt_pr.dsl
Intel ACPI Component Architecture
ASL Optimizing Compiler version 20140926-64 [Nov  6 2014]
Copyright (c) 2000 - 2014 Intel Corporation

Compiler aborting due to parser-detected syntax error(s)
/Users/mtkhan/Library/ssdtPRGen/ssdt.dsl     20:     External (\_PR_.._PR, DeviceObj)
Error    6126 -                                                    ^ Invalid character (0x2E), expecting ASL keyword or name

/Users/mtkhan/Library/ssdtPRGen/ssdt.dsl     20:     External (\_PR_.._PR, DeviceObj)
Error    6126 -                                                     ^ Invalid character (0x2E), expecting ASL keyword or name

/Users/mtkhan/Library/ssdtPRGen/ssdt.dsl     20:     External (\_PR_.._PR, DeviceObj)
Error    6126 -                                                        ^ syntax error, unexpected PARSEOP_NAMESEG, expecting ')'

/Users/mtkhan/Library/ssdtPRGen/ssdt.dsl     21:     External (\_PR_.._PR, DeviceObj)
Error    6126 -                                                    ^ Invalid character (0x2E), expecting ASL keyword or name

/Users/mtkhan/Library/ssdtPRGen/ssdt.dsl     21:     External (\_PR_.._PR, DeviceObj)
Error    6126 -                                                     ^ Invalid character (0x2E), expecting ASL keyword or name

/Users/mtkhan/Library/ssdtPRGen/ssdt.dsl     21:     External (\_PR_.._PR, DeviceObj)
Error    6126 -                                                        ^ syntax error, unexpected PARSEOP_NAMESEG, expecting ')'

/Users/mtkhan/Library/ssdtPRGen/ssdt.dsl     22:     External (\_PR_.._PR, DeviceObj)
Error    6126 -                                                    ^ Invalid character (0x2E), expecting ASL keyword or name

/Users/mtkhan/Library/ssdtPRGen/ssdt.dsl     22:     External (\_PR_.._PR, DeviceObj)
Error    6126 -                                                     ^ Invalid character (0x2E), expecting ASL keyword or name

/Users/mtkhan/Library/ssdtPRGen/ssdt.dsl     22:     External (\_PR_.._PR, DeviceObj)
Error    6126 -                                                        ^ syntax error, unexpected PARSEOP_NAMESEG, expecting ')'

/Users/mtkhan/Library/ssdtPRGen/ssdt.dsl     23:     External (\_PR_.._PR, DeviceObj)
Error    6126 -                                                    ^ Invalid character (0x2E), expecting ASL keyword or name

/Users/mtkhan/Library/ssdtPRGen/ssdt.dsl     23:     External (\_PR_.._PR, DeviceObj)
Error    6126 -                                                     ^ Invalid character (0x2E), expecting ASL keyword or name

/Users/mtkhan/Library/ssdtPRGen/ssdt.dsl     23:     External (\_PR_.._PR, DeviceObj)
Error    6126 -                                                        ^ syntax error, unexpected PARSEOP_NAMESEG, expecting ')'

/Users/mtkhan/Library/ssdtPRGen/ssdt.dsl     24:     External (\_PR_.._PR, DeviceObj)
Error    6126 -                                                    ^ Invalid character (0x2E), expecting ASL keyword or name

/Users/mtkhan/Library/ssdtPRGen/ssdt.dsl     24:     External (\_PR_.._PR, DeviceObj)
Error    6126 -                                                     ^ Invalid character (0x2E), expecting ASL keyword or name

/Users/mtkhan/Library/ssdtPRGen/ssdt.dsl     24:     External (\_PR_.._PR, DeviceObj)
Error    6126 -                                                        ^ syntax error, unexpected PARSEOP_NAMESEG, expecting ')'

/Users/mtkhan/Library/ssdtPRGen/ssdt.dsl     25:     External (\_PR_.._PR, DeviceObj)
Error    6126 -                                                    ^ Invalid character (0x2E), expecting ASL keyword or name

/Users/mtkhan/Library/ssdtPRGen/ssdt.dsl     25:     External (\_PR_.._PR, DeviceObj)
Error    6126 -                                                     ^ Invalid character (0x2E), expecting ASL keyword or name

/Users/mtkhan/Library/ssdtPRGen/ssdt.dsl     25:     External (\_PR_.._PR, DeviceObj)
Error    6126 -                                                        ^ syntax error, unexpected PARSEOP_NAMESEG, expecting ')'

/Users/mtkhan/Library/ssdtPRGen/ssdt.dsl     26:     External (\_PR_.._PR, DeviceObj)
Error    6126 -                                                    ^ Invalid character (0x2E), expecting ASL keyword or name

/Users/mtkhan/Library/ssdtPRGen/ssdt.dsl     26:     External (\_PR_.._PR, DeviceObj)
Error    6126 -                                                     ^ Invalid character (0x2E), expecting ASL keyword or name

/Users/mtkhan/Library/ssdtPRGen/ssdt.dsl     26:     External (\_PR_.._PR, DeviceObj)
Error    6126 -                                                        ^ syntax error, unexpected PARSEOP_NAMESEG, expecting ')'

/Users/mtkhan/Library/ssdtPRGen/ssdt.dsl     27:     External (\_PR_.._PR, DeviceObj)
Error    6126 -                                                    ^ Invalid character (0x2E), expecting ASL keyword or name

/Users/mtkhan/Library/ssdtPRGen/ssdt.dsl     27:     External (\_PR_.._PR, DeviceObj)
Error    6126 -                                                     ^ Invalid character (0x2E), expecting ASL keyword or name

/Users/mtkhan/Library/ssdtPRGen/ssdt.dsl     27:     External (\_PR_.._PR, DeviceObj)
Error    6126 -                                                        ^ syntax error, unexpected PARSEOP_NAMESEG, expecting ')'

/Users/mtkhan/Library/ssdtPRGen/ssdt.dsl     29:     Scope (\_PR_.._PR)
Error    6126 -                                                 ^ Invalid character (0x2E), expecting ASL keyword or name

/Users/mtkhan/Library/ssdtPRGen/ssdt.dsl     29:     Scope (\_PR_.._PR)
Error    6126 -                                                  ^ Invalid character (0x2E), expecting ASL keyword or name

/Users/mtkhan/Library/ssdtPRGen/ssdt.dsl     29:     Scope (\_PR_.._PR)
Error    6126 -                                                     ^ syntax error, unexpected PARSEOP_NAMESEG, expecting ')'

/Users/mtkhan/Library/ssdtPRGen/ssdt.dsl    135: 
Error    6126 - syntax error, unexpected PARSEOP_SCOPE, expecting $end and premature End-Of-File

ASL Input: /Users/mtkhan/Library/ssdtPRGen/ssdt.dsl - 135 lines, 4600 bytes, 24 keywords

Compilation complete. 28 Errors, 0 Warnings, 0 Remarks, 0 Optimizations Error: IASL status: 255 (Failed)

Do you want to open ssdt.dsl (y/n)?

Attached file;

ssdt.dsl.zip

Piker-Alpha commented 7 years ago

Hi. I cannot do much without data. Please read the updating README. Thanks!

Mtkhan13 commented 7 years ago

Hi Piker, Thanks for reply. Here is the result of debug script,

ssdtPRGen.sh v0.9 Copyright (c) 2011-2012 by † RevoGirl v6.6 Copyright (c) 2013 by † Jeroen

v20.4 Copyright (c) 2013-2016 by Pike R. Alpha

Bugs > https://github.com/Piker-Alpha/ssdtPRGen.sh/issues <

System information: Mac OS X 10.9.5 (13F1911) Brandstring: "Intel(R) Xeon(R) CPU W3565 @ 3.20GHz"

Override value: (-d) debug mode, now using: 2!

Setting executing bit of extractACPITables ... _checkForExecutableFile(extractACPITables) Done. Extracting ACPI tables ... Done. Checking User Defined processor data ... Checking Sandy Bridge processor data ... Checking Ivy Bridge processor data ... Checking Haswell processor data ... Checking Broadwell processor data ... Checking Skylake processor data ...

Error: Unknown processor model ... Visit http://ark.intel.com to gather the required data: Processor Number TDP Low Frequency Mode (use AppleIntelInfo.kext) Base Frequency Max Turbo Frequency Cores Threads Aborting ... Done.

And Attached data files; ACPI.zip

Mtkhan13 commented 7 years ago

Hi Piker, I'm waiting for your reply. Please let me know

Thanks

Piker-Alpha commented 7 years ago

Ok I think I figured it out what the problem was. The script now generates a SSDT, but I am not so sure about the used processor labels. This is what I get:

"Used ACPI processor labels: CPU1 CPU4 CPU7 CPUA CPUD CPUG CPUJ CPUM"

Please tell me the output of:

ioreg -p IODeviceTree -c IOACPIPlatformDevice -k cpu-type -k clock-frequency | egrep name | sed -e 's/ *[-|="<a-z>]//g'
Mtkhan13 commented 7 years ago

Hi Piker, Sorry for delayed response, I ran the code twice and here is the out put:

Mtkhans-Mac-Pro:ssdtPRGen.sh-Beta mtkhan$ ioreg -p IODeviceTree -c IOACPIPlatformDevice -k cpu-type -k clock-frequency | egrep name | sed -e 's/ [-|="]//g' CPU0 CPU1 CPU2 CPU3 CPU4 CPU5 CPU6 CPU7 Mtkhans-Mac-Pro:ssdtPRGen.sh-Beta mtkhan$ Mtkhans-Mac-Pro:ssdtPRGen.sh-Beta mtkhan$ ioreg -p IODeviceTree -c IOACPIPlatformDevice -k cpu-type -k clock-frequency | egrep name | sed -e 's/ [-|="]//g' -bash: Mtkhans-Mac-Pro:ssdtPRGen.sh-Beta: command not found Mtkhans-Mac-Pro:ssdtPRGen.sh-Beta mtkhan$ CPU0 -bash: CPU0: command not found Mtkhans-Mac-Pro:ssdtPRGen.sh-Beta mtkhan$ CPU1 -bash: CPU1: command not found Mtkhans-Mac-Pro:ssdtPRGen.sh-Beta mtkhan$ CPU2 -bash: CPU2: command not found Mtkhans-Mac-Pro:ssdtPRGen.sh-Beta mtkhan$ CPU3 -bash: CPU3: command not found Mtkhans-Mac-Pro:ssdtPRGen.sh-Beta mtkhan$ CPU4 -bash: CPU4: command not found Mtkhans-Mac-Pro:ssdtPRGen.sh-Beta mtkhan$ CPU5 -bash: CPU5: command not found Mtkhans-Mac-Pro:ssdtPRGen.sh-Beta mtkhan$ CPU6 -bash: CPU6: command not found Mtkhans-Mac-Pro:ssdtPRGen.sh-Beta mtkhan$ CPU7 -bash: CPU7: command not found Mtkhans-Mac-Pro:ssdtPRGen.sh-Beta mtkhan$ Mtkhans-Mac-Pro:ssdtPRGen.sh-Beta mtkhan$ -bash: Mtkhans-Mac-Pro:ssdtPRGen.sh-Beta: command not found

Piker-Alpha commented 7 years ago

Ok. Thanks. Please try my latest commit (v20.8 should work).

Mtkhan13 commented 7 years ago

Hi Piker, Thank you so much for all efforts, help and support. I've run your latest script 20.8 and here is the output of: ./ssdtPRGen.sh -p W3565

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

System information: Mac OS X 10.9.5 (13F1911)
Brandstring: "Intel(R) Xeon(R) CPU W3565 @ 3.20GHz"

Override value: (-p) processor model, now using: W3565!

Version: models.cfg v160 / User Defined.cfg v-1
Scope (_PR_) {864 bytes} with ACPI Processor declarations found in DSDT (ACPI 1.0 compliant)
Generating ssdt.dsl for a 'MacPro4,1' with board-id [Mac-F221BEC8]
Intel W3565 processor [0x106A5] setup [0x0501]
With a maximum TDP of 130 Watt, as specified by Intel
Number logical CPU's: 8 (Core Frequency: 3200 MHz)
Number of Turbo States: 2 (3333-3466 MHz)
Number of P-States: 15 (1600-3466 MHz)
Injected C-States for CPU0 (C1,C3,C6)
Warning: 'cpu-type' may be set improperly (0x0501 instead of 0x01)
     - Clover users should read https://clover-wiki.zetam.org/Configuration/CPU#cpu_type
Warning: 'board-id' [Mac-F221BEC8] is not supported by Unknown power management
Warning: 'system-type' may be set improperly (3 instead of 0)
     - 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/mtkhan/Library/ssdtPRGen/ssdt.dsl - 205 lines, 5692 bytes, 51 keywords
AML Output:    /Users/mtkhan/Library/ssdtPRGen/ssdt.aml - 1501 bytes, 20 named objects, 31 executable opcodes

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

Do you want to copy /Users/mtkhan/Library/ssdtPRGen/ssdt.aml to /Extra/ssdt.aml? (y/n)?

Is it ready to used with my system though it's showing 3 warnings (cpu-type, board-id, system-type) but not at end?

Mtkhan13 commented 7 years ago

Another Question the processor don't have 1333 bus-speed, its 1066 so in ssdt out put; is it showing for board or for processor? reference http://ark.intel.com/products/39721/Intel-Xeon-Processor-W3565-8M-Cache-3_20-GHz-4_80-GTs-Intel-QPI

Store ("ssdtPRGen version.....: 20.8 / Mac OS X 10.9.5 (13F1911)", Debug) Store ("custom mode...........: 0", Debug) Store ("host processor........: Intel(R) Xeon(R) CPU W3565 @ 3.20GHz", Debug) Store ("target processor......: W3565", Debug) Store ("number of processors..: 1", Debug) Store ("baseFrequency.........: 1600", Debug) Store ("frequency.............: 3200", Debug) Store ("busFrequency..........: 133", Debug) Store ("logicalCPUs...........: 8", Debug) Store ("maximum TDP...........: 130", Debug) Store ("packageLength.........: 15", Debug) Store ("turboStates...........: 2", Debug) Store ("maxTurboFrequency.....: 3466", Debug) Store ("machdep.xcpm.mode.....: 0", Debug)

Piker-Alpha commented 7 years ago

The output is fine and you can ignore the warnings. The BCLK is 133 and that is correct. The 1066 versus 1333 is the RAM speed (8 x 133 and 10 x 133).

Time to put the new SSDT to the test. If you don't get turbo frequencies, or it is stuck at a certain low frequency, then pleases read a few of the old/closed issues i.e. you may need to run the script with the -c 1 or -c 2 arguments.

Mtkhan13 commented 7 years ago

Piker thanks for help! I've placed the ssdt in extra folder and in plist I've added drop-ssdt and removed the P,C-states and nullcpupwermanagement.kext. And it worked fine, to test I did add appleIntelPowerManagement.kext and I got KP at restart so I removed it. But the thing is How do I test its working fine because I used Intel Power Gedget (it doesn't show any details or graph) and AppleIntelInfo.kext (my system gets stuck when I load the kext). So please tell me how do I check the frequencies & states?

Piker-Alpha commented 7 years ago

AppleIntelInfo.kext cannot be part of the prelinkedkernel/kernelcache. Not until I stop it from writing data when it loads – we need to delay the writes. For now. Load the kext dynamically. See also the README.

You should also set the logMSRs setting to false if loading the kext ends in a reboot.