Contribute
Register

[solved] Intel 4400 GPU compatibility on GB-BXi5H-4200

Status
Not open for further replies.
Intel 4400 GPU compatibility on GB-BXi5H-4200

Based on what you're saying, I decided to go with the Linux output. I'm still not sure I follow what will come next, but I'm just focusing on trying to get the patching process to work. Right now, the only file I can patch, and the only file that contained the proper address, was SSDT-6. I inserted the following code:

Code:
into method label _DSM parent_adr 0x00020000 remove_entry;
into device name_adr 0x00020000 insert
begin
Method (_DSM, 4, NotSerialized)
{
    If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }
    Return (Package()
    {
        "device-id", Buffer() { 0x12, 0x04, 0x00, 0x00 }
    })
}
end;

While I'm not familiar with the language it's written in, the nesting of the parentheses and braces look sane. However, these are the errors I'm getting appear to be from a semicolon, parenthesis, or brace error. Unfortunately, these errors came up before I added any patch. That is, the files decompiled without error but simply to not recompile without errors. Whether that's because the Linux extraction was bad or iasl is unable to create decompiled code that can recompile, I don't know.


errors.png

EDIT: Reading the posts at http://www.insanelymac.com/forum/topic/297605-errors-in-maciasl/ , I'm starting to get the idea that maybe the SSDT by itself can't be compiled without the proper context.
 
Intel 4400 GPU compatibility on GB-BXi5H-4200

Based on what you're saying, I decided to go with the Linux output. I'm still not sure I follow what will come next, but I'm just focusing on trying to get the patching process to work. Right now, the only file I can patch, and the only file that contained the proper address, was SSDT-6. I inserted the following code:

Code:
into method label _DSM parent_adr 0x00020000 remove_entry;
into device name_adr 0x00020000 insert
begin
Method (_DSM, 4, NotSerialized)
{
    If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }
    Return (Package()
    {
        "device-id", Buffer() { 0x12, 0x04, 0x00, 0x00 }
    })
}
end;

While I'm not familiar with the language it's written in, the nesting of the parentheses and braces look sane. However, these are the errors I'm getting appear to be from a semicolon, parenthesis, or brace error. Unfortunately, these errors came up before I added any patch. That is, the files decompiled without error but simply to not recompile without errors. Whether that's because the Linux extraction was bad or iasl is unable to create decompiled code that can recompile, I don't know.


View attachment 137713

EDIT: Reading the posts at http://www.insanelymac.com/forum/topic/297605-errors-in-maciasl/ , I'm starting to get the idea that maybe the SSDT by itself can't be compiled without the proper context.

Ummm... still... you fail to provide your native ACPI files for inspection...

No idea without the files. Unfortunately, I'm not clairvoyant.

I'm going to guess that you didn't set ACPI 5.0 in MaciASL preferences.
 
Intel 4400 GPU compatibility on GB-BXi5H-4200

Ummm... still... you fail to provide your native ACPI files for inspection...

I'm not sure what you mean by "native ACPI files." The files in my tables directory consist of nearly 70,000 lines of...stuff. If you just want the decompiled SSDT 6, that's possible useful I guess (only 9,944 lines) and I've attached it. Incidentally, I tried changing the compiler to ACPI 5.0 mode with no effect at all. The iacl process seems to work without errors, so my guess is the decompiled code is simply incorrect.
 

Attachments

  • SSDT6.dsl
    191.8 KB · Views: 91
Intel 4400 GPU compatibility on GB-BXi5H-4200

I'm not sure what you mean by "native ACPI files."

The entire directory structure you extracted from Linux from /sys/firmware/acpi/tables. Not decompiled. Actual binaries that you found there.

If you just want the decompiled SSDT 6, that's possible useful I guess (only 9,944 lines) and I've attached it.

I can see you didn't disassemble this file correctly...
 
Intel 4400 GPU compatibility on GB-BXi5H-4200

I've attached a zip of the various files I extracted with the Linux technique laid out in the instructions (the Mac technique proved extremely error-prone). In addition to MaciASL, I've just tried using iasl itself to recompile. But many people with my issue seem to suggest that the DSDT must be in context during the compile.
 

Attachments

  • DSDT.zip
    8.1 KB · Views: 72
Intel 4400 GPU compatibility on GB-BXi5H-4200

I've now managed to get my Hackintosh to a point where I've (seemingly) successfully compiled an SSDT and got it into the /Extra folder. Unfortunately, Chameleon completely disregards it, and I'm unable to go any further. I've tried some further troubleshooting, but fundamentally, the SSDT code patch I put in appears not to have had any effect, and that may be an issue with the bootloader, the patch code, the FakePCIID Kext, or all three.

After getting stuck on SSDT compilation, I've found a procedure that at least succeeds in compiling the SSDT in MaciASL on another Mac successfully. It's hard to boil down days of trial-and-error, but I think that running iasl on the Ubuntu LiveCD on the Mac (and not later) and including the DSDT explicitly on the command line were helpful -- though it's hard to say anything definitive about a process like this.

  • Boot Ubuntu on the machine in question
  • Copy /sys/firmware/acpi/tables to scratch directory
  • Rename all DSDT and SSDT files to .aml and remove all other files
  • Install iasl via apt
  • iasl -da -dl DSDT.aml SSDT1.aml SSDT1.aml SSDT2.aml SSDT3.aml SSDT4.aml SSDT5.aml SSDT6.aml SSDT7.aml SSDT8.aml SSDT9.aml (being careful to make sure the output mentions loading "ACPI table from file). Using the wildcard in previous cases did not load the ACPI tables properly and gave broken code.*
  • SSDT-6 in this case, contains the code this patch needs to modify. No other files seems able to be patched with the patch code I'm trying to use (I've tried them all, for science).
  • Copy SSDT-6.dsl to flash drive
  • Open SSDT-6.dsl in MaciASL
  • Click Patch button, paste patch code in text box, wait for Apply to illuminate, and click apply
  • Save as ACPI Machine Language Binary, taking care that under iASL preferences, ACPI 5.0 is selected (it's not the default).
  • Load SSDT-6.aml onto flash drive and copy to /Extra, along with the other extracted SSDT's and the DSDT.
  • Modify /Extra/org.chameleon.Boot.plist and add the key
    Code:
    <key>DropSSDT</key><string>Yes</string>
  • Make sure that GeneratePStates and GeneratecStates are set to "No"
  • Reboot

At this point, I thought I was home free. The patch:
Code:
into method label _DSM parent_adr 0x00020000 remove_entry;
into device name_adr 0x00020000 insert
begin
Method (_DSM, 4, NotSerialized)
{
    If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }
    Return (Package()
    {
        "device-id", Buffer() { 0x12, 0x04, 0x00, 0x00 },
    })
}
end;

seemed reasonable enough, and MaciASL accepted it without complaint. However, upon reboot, it was apparent that that device-id injection did not work. I'm unable to proceed any further, or even verify that the SSDT's are being loaded. My current suspicion is that the patched device ID is incorrect, but it's only a guess.

* For reasons I don't fully grasp, iasl cannot recompile its own decompiled code. That is, iasl -dc SSDT6.aml or some such thing will fail. This is the case on 3 different Macs running OSX itself or Ubuntu, variously.
 
Intel 4400 GPU compatibility on GB-BXi5H-4200

...
After getting stuck on SSDT compilation, I've found a procedure that at least succeeds in compiling the SSDT in MaciASL on another Mac successfully. It's hard to boil down days of trial-and-error, but I think that running iasl on the Ubuntu LiveCD on the Mac (and not later) and including the DSDT explicitly on the command line were helpful -- though it's hard to say anything definitive about a process like this.

Extraction and disassembly is covered here: http://www.tonymacx86.com/yosemite-laptop-support/152573-guide-patching-laptop-dsdt-ssdts.html

Best to extract on Linux, disassemble on OS X (with the linked iasl).

You can disassemble a Linux dump (from /sys/firmware/acpi/tables) assuming you copied it entirely (cp -R /sys/firmware/acpi/tables):
Code:
iasl -da -dl DSDT SSDT* dynamic/SSDT*

Note: it is a one shot thing because you can't later ask iasl to disassemble the resulting *.dsl files (unless you 'rm *.dsl dynamic/*.dsl' first), so pay attention to what wildcards expand to.

[*]iasl -da -dl DSDT.aml SSDT1.aml SSDT1.aml SSDT2.aml SSDT3.aml SSDT4.aml SSDT5.aml SSDT6.aml SSDT7.aml SSDT8.aml SSDT9.aml (being careful to make sure the output mentions loading "ACPI table from file). Using the wildcard in previous cases did not load the ACPI tables properly and gave broken code.*

It is best to disassemble in OS X with my version of iasl (as linked in the guide above). My version of iasl creates *.dsl files that are more acceptable to MaciASL.

[*]SSDT-6 in this case, contains the code this patch needs to modify. No other files seems able to be patched with the patch code I'm trying to use (I've tried them all, for science).

Of course, you need to include all SSDTs in /Extra, not just the one you're patching.

[*]Load SSDT-6.aml onto flash drive and copy to /Extra, along with the other extracted SSDT's and the DSDT.

Your issue is that Chameleon/Chimera will not load a standalone SSDT-6.aml. Both Chimera and Chameleon load SSDTs in order, SSDT.aml, SSDT-1.aml, SSDT-2.aml, SSDT-3.aml, etc. It stops loading when it fails to find one. In other words, if you don't have SSDT.aml, SSDT-1.aml will not load even though present (yes, it is not so smart). So, your lonely SSDT-6.aml will not load without SSDT.aml, SSDT-1.aml, SSDT-2.aml, SSDT-3.aml, SSDT-4.aml, SSDT-5.aml also present.

Clover is a bit better in this area, but still has issues (must use config.plist/ACPI/SortedOrder to specify the correct order, otherwise SSDTs will be loaded in random order).

[*]Modify /Extra/org.chameleon.Boot.plist and add the key<key>DropSSDT</key><string>Yes</string>
[*]Make sure that GeneratePStates and GeneratecStates are set to "No"

As noted above, you need to include all OEM SSDTs in /Extra. Some of the SSDTs you're dropping with DropSSDT=Yes may be required.

At this point, I thought I was home free. The patch:
Code:
into method label _DSM parent_adr 0x00020000 remove_entry;
into device name_adr 0x00020000 insert
begin
Method (_DSM, 4, NotSerialized)
{
    If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }
    Return (Package()
    {
        "device-id", Buffer() { 0x12, 0x04, 0x00, 0x00 },
    })
}
end;

seemed reasonable enough, and MaciASL accepted it without complaint. However, upon reboot, it was apparent that that device-id injection did not work. I'm unable to proceed any further, or even verify that the SSDT's are being loaded. My current suspicion is that the patched device ID is incorrect, but it's only a guess.

The patch is correct.

* For reasons I don't fully grasp, iasl cannot recompile its own decompiled code. That is, iasl -dc SSDT6.aml or some such thing will fail. This is the case on 3 different Macs running OSX itself or Ubuntu, variously.

Problem is not compilation. Problem is disassembly. Disassembly must always be done with all files as context (iasl -da -dl *.aml).
 
Intel 4400 GPU compatibility on GB-BXi5H-4200

I should have clarified - I did see that naming caveat and took the instructions quite literally and renamed the SSDT's SSDT.aml SSDT-1.aml and such. Also, I did include ALL the AML's - not just 6. I will try disassembly on OS X, but that's not been readily successful in the past (that delicate little dance with Linux is the closest I've come to getting this working in hundreds of attempts). Regardless, the issue seems to be the SSDT's not being loaded - so that's where I'm concentrating my efforts.
 
Intel 4400 GPU compatibility on GB-BXi5H-4200

I should have clarified - I did see that naming caveat and took the instructions quite literally and renamed the SSDT's SSDT.aml SSDT-1.aml and such. Also, I did include ALL the AML's - not just 6. I will try disassembly on OS X, but that's not been readily successful in the past (that delicate little dance with Linux is the closest I've come to getting this working in hundreds of attempts). Regardless, the issue seems to be the SSDT's not being loaded - so that's where I'm concentrating my efforts.

Download patchmatic: https://bitbucket.org/RehabMan/os-x-maciasl-patchmatic/downloads/RehabMan-patchmatic-2015-0107.zip
Extract the 'patchmatic' binary from the ZIP. Copy it to /usr/bin, such that you have the binary at /usr/bin/patchmatic.

In terminal,
Code:
rm -R ~/Downloads/RehabMan
mkdir ~/Downloads/RehabMan
cd ~/Downloads/RehabMan
patchmatic -extract

Post contents of Downloads/RehabMan directory (as ZIP).

Also, post ioreg: http://www.tonymacx86.com/audio/58368-guide-how-make-copy-ioreg.html. Please, use the IORegistryExplorer v2.1 attached to the post! DO NOT reply with an ioreg from any other version of IORegistryExplorer.app.
 
Intel 4400 GPU compatibility on GB-BXi5H-4200

To clarify my current steps:
  • Extract DSDT and SSDT's under Linux
  • In OS X, use modified iasl to decompile DSDT and SSDT AML's (the more inclusive command seems to work reliably, which seems to have been what frustrated all my previous attempts)
  • Open SSDT6.dsl in MaciASL and apply patch and save as SSDT6.aml
  • Rename and shift filenames to get SSDT.aml, SSDT-1.aml...SSDT-8.aml
  • Place DSDT and 9 SSDT files in /Extra
  • Check settings in Chameleon PList per my previous post
  • Reboot

I've attached the files you asked for, but a glance at the System Report under "Device ID" shows that the device ID is still not the patched value. The only way I can think of to test the SSDT processing is to deliberately break one and see if the system fails to boot. I'm 90% confident it will have no effect, based on my previous...attempts.
 

Attachments

  • macioreg.ioreg
    2.1 MB · Views: 91
  • SSDT.zip
    34.1 KB · Views: 74
Status
Not open for further replies.
Back
Top