Contribute
Register

[GUIDE] Extract and Fix DSDT MSI Z77A-G43

Status
Not open for further replies.

dta

Joined
May 6, 2012
Messages
120
Motherboard
MSI Z77A-G43
CPU
Core i7 3770K
Graphics
Intel HD4000
Mac
  1. MacBook Pro
Classic Mac
  1. 0
Mobile Phone
  1. iOS
Hey, I just fixed all my compilation errors on the MSI Z77A-G43 (BIOS v2.4) and I thought I could share my edits here if anybody else runs into the same troubles. So this is a small guide on how to get your DSDT compiled without any errors or warnings and apply some additional patches to get a nice, clean and more "Apple like" DSDT to start with.

What I'm going to explain:

- Extract your DSDT
- Fix compilation errors
- Name your devices more "Apple like"
- Add DGTP method

What you need:

- A DSDT Editor (I recommend DSDT Editor)

Note that this whole procedure could also be done a little easier with DSDT auto patching for some fixes but doing it manually you learn a lot more and get used to patching DSDT by yourself.


So let's get started:

1. Patch your BIOS to latest version (v2.4)

This is very important because in the worst case scenario you could damage your motherboard. This guide is for BIOS v2.4, so you have to get exactly that same version. It could probably work for earlier or later versions, but your are on your own doing this.

2. Extract your DSDT

This is simple: Open up DSDT editor and choose "File > Extract DSDT".

3. Fix compilation errors

In DSDT Editor choose "IASL > Compile", a window should pop up showing a bunch of errors and warnings:
compile-errors.png
You can see that it tells you we have errors, warnings and remarks. There should be only 1 error and we can fix it right away with DSDT Editor. Simply click on "Fix errors" and it now should say "0 Errors".

But we still have left a lot of warnings and remarks that have to be fixed, so let's move on. We will go through this step by step. You have to double click on each error message and it takes you to the location where the error occured.


2226 Warning ResourceTag larger than Field (Tag: 64 bits, Field: 32 bits)

Replace
Code:
CreateDWordField (BUF0, \_SB.PCI0._Y0F._LEN, MSLN)
With
Code:
CreateQWordField (BUF0, \_SB.PCI0._Y0F._LEN, MSLN)

3318 Warning Result is not used, possible operator timeout will be missed

Replace
Code:
Acquire (MUT0, 0x0FFF)
With
Code:
Acquire (MUT0, 0xFFFF)

8787 Warning Not all control paths return a value (_DSM)
8787 Warning Reserved method must return a value (Integer/String/Buffer/Package/Reference required for _DSM)


Put
Code:
Return (Zero)
to the end of Method (_DSM, 4, Serialized), so that it looks like this:
Code:
Method (_DSM, 4, Serialized)
{
    Name (DRET, Buffer (0x04)
    {
         0x00
    })
    If (LEqual (Arg0, Buffer (0x10)
            {
                /* 0000 */   0xE1, 0x75, 0x39, 0x6F, 0x82, 0x7A, 0x67, 0x4F,
                /* 0008 */   0x8B, 0x97, 0x15, 0xBE, 0xE0, 0x60, 0xBE, 0xDF
            }))
    {
        If (LEqual (Arg2, Zero))
        {
            CreateWordField (DRET, Zero, F0SS)
            Store (0x02, F0SS)
            Return (DRET)
        }
        If (LEqual (Arg2, One))
        {
            If (LEqual (^^PEG0.PEGP.LNKV, 0x03))
            {
                Return (Zero)
            }
            Return (One)
        }
    }
    Return (Zero)
}

10113 Warning Not all control paths return a value (_HID)
10113 Warning Reserved method must return a value (Integer/String required for _HID)


Replace
Code:
Method (_HID, 0, NotSerialized)
{
    If (TCMF) {}
    Else
    {
        Return (0x310CD041)
    }
}
With
Code:
Method (_HID, 0, NotSerialized)
{
    If (TCMF)
    {
        Return (Zero)
    }
    Else
    {
        Return (0x310CD041)
    }
}

Lastly we should have a lot of:
5626 Remark Use of compiler reserved name (_T_0)
10350 Remark Use of compiler reserved name (_T_1)


To fix this hit Command + F (to open up search and replace) and enter the following:
search-replace.png
Then click on "Replace All" and close search window.

Now everything should be fixed. Click on "IASL > Compile" and it should compile without any errors, warnings or remarks.

4. Rename your devices

Next up is renaming some devices to get closer to Apple's naming scheme. There might be some more you could rename, but those are the ones I know of and found inside the DSDT.

You need to open up search and replace (Command + F) again for each of this edits and be sure to always click on "Replace All":

Find: GFX0 Replace: IGPU
Find: COPR Replace: MATH

5. Add DGTP method

Lastly we are going to prepare our DSDT for future patching by adding the DGTP method, which is needed if you want to patch HDEF or other things. Simply put this directly at the end of the file before the last "}" and after WAK method.

Code:
Method (DTGP, 5, NotSerialized)
{
    If (LEqual (Arg0, Buffer (0x10)
            {
                /* 0000 */    0xC6, 0xB7, 0xB5, 0xA0, 0x18, 0x13, 0x1C, 0x44, 
                /* 0008 */    0xB0, 0xC9, 0xFE, 0x69, 0x5E, 0xAF, 0x94, 0x9B
            }))
    {
        If (LEqual (Arg1, One))
        {
            If (LEqual (Arg2, Zero))
            {
                Store (Buffer (One)
                    {
                        0x03
                    }, Arg4)
                Return (One)
            }
            If (LEqual (Arg2, One))
            {
                Return (One)
            }
        }
    }
    Store (Buffer (One)
        {
            0x00
        }, Arg4)
    Return (Zero)
}

6. Compile and save DSDT.aml

Click on "IASL > Compile" again to compile your DSDT with latest changes and finally save by clicking on "IASL > Save AML as..."
 

Attachments

  • compile-errors.png
    compile-errors.png
    13.4 KB · Views: 1,936
  • search-replace.png
    search-replace.png
    10.5 KB · Views: 1,757
Lastly we should have a lot of:
5626 Remark Use of compiler reserved name (_T_0)
10350 Remark Use of compiler reserved name (_T_1)


To fix this hit Command + F (to open up search and replace) and enter the following:
search-replace.png
Then click on "Replace All" and close search window.

Now everything should be fixed. Click on "IASL > Compile" and it should compile without any errors, warnings or remarks.

Thanks for the guide!
I have a question about the section quoted above. It seems the PNG you provided was deprecated. What should I replace with the _T_0 and _T_1?

A little background:
I have the MSI Z77A-G41 running BIOS 2.4 and this is the only relevant DSDT post I can find anywhere. Any tips would be greatly appreciated!!!
 
Disregard my last. I'm dumb. The images are at the bottom of the post.
 
Thanks for your guide.
I have patched dsdt with 2.7 bios.
I think that following part is not necessary:
8787 Warning Not all control paths return a value (_DSM)
8787 Warning Reserved method must return a value (Integer/String/Buffer/Package/Reference required for _DSM)


Put
Code:

Return (Zero)
...

By the way I'm using voodoo for audio and have gtx 660ti.
Unfortunately the wake from sleep doesnt work (system wakes, but the monitor remains dark).
 
I have gone through this a couple times now and every time I add the DGTP method it says syntax error, unexpected $end and premature End-Of-File. I can't seem to fix the syntax error. Any suggestions? I am running the MSI 777A-G41 and my BIOS version is 2.6. Do you think that would have issues with the DGTP method?
 
I have gone through this a couple times now and every time I add the DGTP method it says syntax error, unexpected $end and premature End-Of-File. I can't seem to fix the syntax error. Any suggestions? I am running the MSI 777A-G41 and my BIOS version is 2.6. Do you think that would have issues with the DGTP method?

You can add the Method DTGP immediately after the DefinitionBlock, in between the DefinitionBlock and Scope (_PR) as shown in the picture:

attachment.php


This is how I always edit my DSDT's.

Dil83

P.S. A huge thanks to SJ_UnderWater for his new Beta DSDT editor/compiler app which is shown in the screenshot here. This app is awesome! You can find it here: http://www.tonymacx86.com/dsdt/83565-native-dsdt-aml-ide-compiler-maciasl-open-beta.html
 

Attachments

  • Method DTGP.png
    Method DTGP.png
    165.9 KB · Views: 15,421
Last edited by a moderator:
I am using bios 2.10:

To fix wakeup problem (black screen, frozen UI) you need to remove
Code:
        \_SB.PCI0.LPCB.SIOW (Arg0)
from WAK method and use VoodooTSCSync.kext

I have not tested usb3 ports with usb 3 devices. However to use usb3 ports with usb2 devices apply the "USB Multiplex" patch.
 
Hello,

I have also bios 2.10 and i pathed it with the tools from bios-repo.
Then i don't need NCPM kext to boot.

I only installed fakesmc and alc892 kexts.

I builded a dsdt with dta's guide.
dsdt is working fine.

My problem is that i never get wake.
I tried with remove line in WAK method and with voodooTSCsync but it's not working.
System is going sleep but when i want to wake, the system is booting and 5s later stop again.

If somebody has some idea, maybe kext missing, or bios settings ...

Thank's a lot.
 
Hi all

Excuse me if post on this old thread, but I can't find newer information for my MSI z77a-g43

Are these information still valid?

I am trying to solve a issue with the sleep of my motherboard and I am following different guides (a lot of them points to use MaciASL) but this one seems the most specific for my problem even if it seems quit old.

My configuration:
Motherboard: MSI z77a-g43 ami bios version 2.13
Graphic: Shapphire radeon hd 5850
CPU: Intel I5 3450 @ 3.10GHz

Multibeast DSDT-Free

Thanks in advance
 
Hi,

I had never nice issue.
Sleep worked just some time ...
I tried every thing found on the web.
My bios was patched like described here.
I'm not remember version of the patch.
Dsdt was also patched like describe here with no issues.

My best solution was to sell the MB and replace by a gigabyte z77 ds3h.

Now everything is working without problems.

Good luck
 
Status
Not open for further replies.
Back
Top