-->Donations via PayPal [External Link Removed for Guests] :guitar
-->Installation/Post Installation Tutorial [Local Link Removed for Guests]
-->Useful Links [Local Link Removed for Guests]
-->Olarila Images - Updated images [Local Link Removed for Guests]
-->Guides and Tutorials [Local Link Removed for Guests]
-->Clover Folder for All Chipsets [Local Link Removed for Guests]
-->DSDT Patch Requests [Local Link Removed for Guests]

Patches

Post Reply
User avatar
oldnapalm
Olarila Staff
Olarila Staff
Posts: 1225
Joined: 05 Dec 2010, 20:49

Re: Patches

Post by oldnapalm » 18 Oct 2011, 02:23

The commands syntax is described here
[Local Link Removed for Guests]

You can use existing patches as examples
[Local Link Removed for Guests]
redman
Posts: 7
Joined: 03 Sep 2011, 05:53

Re: Patches

Post by redman » 18 Oct 2011, 03:03

I have actually been reading a lot of the patches. I now understand how to go about adding, but how would I remove the _DSM section from GFX0 which is contained inside PCI0?

I need to make a few changes to that and I can't seem to figure that out. The way removing sections is handled confuses me.

Would this be it, with changes to match my DSDT?

Code: [Local Link Removed for Guests]

into method label _DSM parent_adr 0x001B0000 remove_entry;
into device name_adr 0x001B0000 insert
begin
Method (_DSM, 4, NotSerialized)\n
{\n
    Store (Package (0x08)\n
        {\n
            "codec-id", \n
            Buffer (0x04)\n
            {\n
                0x88, 0x08, 0xEC, 0x10\n
            }, \n
            "layout-id", \n
            Buffer (0x04)\n
            {\n
                0x78, 0x03, 0x00, 0x00\n
            }, \n
            "device-type", \n
            Buffer (0x0F)\n
            {\n
                "Realtek ALC888"\n
            }, \n
            "PinConfigurations", \n
            Buffer (One)\n
            {\n
                0x00\n
            }\n
        }, Local0)\n
    DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))\n
    Return (Local0)\n
}
end
User avatar
oldnapalm
Olarila Staff
Olarila Staff
Posts: 1225
Joined: 05 Dec 2010, 20:49

Re: Patches

Post by oldnapalm » 18 Oct 2011, 03:36

I don't understand what you want to change. Post the original code and what you want to patch.
redman
Posts: 7
Joined: 03 Sep 2011, 05:53

Re: Patches

Post by redman » 18 Oct 2011, 23:38

I think I figured it out. Thanks though, I may be back.

New one: How do I specify where to place something? or does it matter?

I want to take this

Code: [Local Link Removed for Guests]

Device (AC)
        {
            Name (_HID, "ACPI0003")
            Name (_PCL, Package (0x01)
            {
                _SB
            })
            Method (_PSR, 0, NotSerialized)
            {
                Store (^^PCI0.LPCB.EC0.GACS (), Local0)
                Store (Local0, PWRS)
                Store (^^PCI0.LPCB.EC0.GPID (), Local1)
                If (XOr (Local0, ACST))
                {
                    \_GPE.HNLP (Zero)
                    ^^PCI0.ACEL.AJAL ()
                    \_GPE.VPUP (Local0, Local1)
                    ^^PCI0.LPCB.EC0.SMCP (Local0)
                }
                If (LOr (LAnd (Local0, LNot (ACST)), LAnd (Local1, LNot (SMAR))))
                {
                    ^^WMID.WGWE (0x03, Zero)
                }
                Store (Local0, ACST)
                Store (Local1, SMAR)
                Return (Local0)
            }
        }
And add this to it. Does it matter where it goes? In the dsdt I am basing this off of, it comes right after the HID section.

Code: [Local Link Removed for Guests]

Name (_PRW, Package (0x02)
            {
                0x18, 
                0x03
            })
Also, how would I change a device name from something, say GFX0 to IGPU or AC to ADP1?

I want to edit a patch that MaLd0n gave us so everyone can use it to do this automatically.
User avatar
oldnapalm
Olarila Staff
Olarila Staff
Posts: 1225
Joined: 05 Dec 2010, 20:49

Re: Patches

Post by oldnapalm » 19 Oct 2011, 00:20

Just use insert, it adds at the end, the position doesn't matter

Code: [Local Link Removed for Guests]

into device label AC insert
begin
Name (_PRW, Package (0x02)\n
            {\n
                0x18,\n
                0x03\n
            })
end
Check [Local Link Removed for Guests] example.

For device rename check [Local Link Removed for Guests] example.
redman
Posts: 7
Joined: 03 Sep 2011, 05:53

Re: Patches

Post by redman » 19 Oct 2011, 00:25

Yeah I figured how to add, just not how to specify where, I didn't know if it mattered. Thanks for all the help, sorry for being a bit n00bish about it, I know its frustrating. But I'm slowly getting the hang of this.

Continuing with the renaming, I want to rename the AC device listed2 posts above this.

Using this:

Code: [Local Link Removed for Guests]

into device label AC set_label
begin
ADP1
end;
into_all all code_regex AC replaceall_matched
begin
ADP1
end
Makes my DSDT compile with errors all over.

But I don't know how to get the device address. I saw somewhere when messing with GFX0 how to do it, so I can rename that, but how could I edit the above code so it works?
User avatar
oldnapalm
Olarila Staff
Olarila Staff
Posts: 1225
Joined: 05 Dec 2010, 20:49

Re: Patches

Post by oldnapalm » 19 Oct 2011, 03:15

To rename the device you need just the first part

Code: [Local Link Removed for Guests]

into device label AC set_label
begin
ADP1
end
The second part replaces all code_regex matches in the file, it it needed only if there are references to device AC that need to be replaced. As "AC" is a very common string you will need to refine the code_regex, something like

Code: [Local Link Removed for Guests]

into_all all code_regex SB.AC replaceall_matched
begin
SB.ADP1
end
Check for compilation errors after renaming AC, if there are no errors the second part is not needed.
redman
Posts: 7
Joined: 03 Sep 2011, 05:53

Re: Patches

Post by redman » 19 Oct 2011, 03:20

What exactly does the SB. do?
User avatar
oldnapalm
Olarila Staff
Olarila Staff
Posts: 1225
Joined: 05 Dec 2010, 20:49

Re: Patches

Post by oldnapalm » 19 Oct 2011, 03:46

It's an example.

Let's say you get an "Object does not exist (\_SB.MOO.AC)" error after renaming AC to ADP1, then you would do

Code: [Local Link Removed for Guests]

into_all all code_regex SB.MOO.AC replaceall_matched
begin
SB.MOO.ADP1
end
If you use just "AC" it will replace things like "0xAC" to "0xADP1" which will produce a syntax error.
redman
Posts: 7
Joined: 03 Sep 2011, 05:53

Re: Patches

Post by redman » 19 Oct 2011, 03:51

oldnapalm wrote:It's an example.

Let's say you get an "Object does not exist (\_SB.MOO.AC)" error after renaming AC to ADP1, then you would do

Code: [Local Link Removed for Guests]

into_all all code_regex SB.MOO.AC replaceall_matched
begin
SB.MOO.ADP1
end
If you use just "AC" it will replace things like "0xAC" to "0xADP1" which will produce a syntax error.
I now understand. I'll try this tomorrow. Thanks!

This should be the last problem. I am trying to turn

Code: [Local Link Removed for Guests]

Method (_RMV, 0, NotSerialized)
                    {
                        If (_OSI ("Windows 2009"))
                        {
                            Return (Zero)
                        }
                        Else
                        {
                            Return (One)
                        }
                    }
that last One into a zero.

The device this is in is called SMHC which is inside PCI0.

Why does this not work?

Code: [Local Link Removed for Guests]

into method label _RMV device label SMHC remove_entry;
into device label SMHC insert
begin
Method (_RMV, 0, NotSerialized)\n
                    {\n
                        If (_OSI ("Windows 2009"))\n
                        {\n
                            Return (Zero)\n
                        }\n
                        Else\n
                        {\n
                            Return (Zero)\n
                        }\n
                    }\n
end
dnerve
Posts: 2
Joined: 21 Oct 2011, 21:46

Re: Patches

Post by dnerve » 23 Oct 2011, 14:05

I followed the tutorial in OP for the latest Gigabyte GA-EX58 EXTREME bios from gigabyte's website, F13s. All went well but when I replaced the old DSDT.aml taken form tonycrap's DSDT database that was for F12 with the one that resulted from this tutorial, I would have no sound detected.

To note, I am not using a patched HDA, I am using HDA rollback method under 10.7.2 provided through tonycrap's multishit solution.

That said, I had 25% FPS increase in Cinebench with the new one!

Any ideas on how to restore audio?
User avatar
Cassio
Olarila Staff
Olarila Staff
Posts: 3765
Joined: 26 Aug 2011, 22:53

Re: Patches

Post by Cassio » 23 Oct 2011, 15:32

If you use patched AppleHDA you may need to update the [Local Link Removed for Guests] according to your audio codec. Make sure layout-id in DSDT (hex) coincides with LayoutID in AppleHDA (decimal)

[table=400][trf][tdf]LayoutID (dec)[/tdf]
[tdl]layout-id (hex)[/tdl][/trf]
[tr][tdf]12[/tdf]
[tdl]0x0C, 0x00, 0x00, 0x00 = 0xC[/tdl][/tr]
[trl][tdf]889[/tdf]
[tdl]0x79, 0x03, 0x00, 0x00 = 0x379[/tdl][/trl][/table]
ASUS N53Jq • CPU: Intel Core i7-740QM 1.73GHz • RAM: 6,0GB • HD: 500GB • GPU: GeForce GT 425M 1GB 1920x1080 • OS: [External Link Removed for Guests] • Linux Mint 15 • Windows 8
dnerve
Posts: 2
Joined: 21 Oct 2011, 21:46

Re: Patches

Post by dnerve » 23 Oct 2011, 18:44

Cassio wrote:
Thanks I ran the patch as is for my audio chipset and it worked flawlessly!

Cheers!
pilsator
Posts: 21
Joined: 22 Oct 2011, 20:33

Re: Patches

Post by pilsator » 24 Oct 2011, 01:59

Would you be so kind to create a script for the Dell Vostro 3750? I tried to apply the script for the Vostro 3550 with the simplified AutoPatcher - I thought it was the same machine just with a smaller display - but that ended up in an error.
You do not have the required permissions to view the files attached to this post.
User avatar
oldnapalm
Olarila Staff
Olarila Staff
Posts: 1225
Joined: 05 Dec 2010, 20:49

Re: Patches

Post by oldnapalm » 24 Oct 2011, 21:43

I guess you can just remove

Code: [Local Link Removed for Guests]

Arg0
Arg1
Arg2
Arg3
after

Code: [Local Link Removed for Guests]

Return (NVOP)
Anything after "return" will be unreachable statement anyway.
public enemy
Posts: 1
Joined: 25 Oct 2011, 13:29

Re: Patches

Post by public enemy » 26 Oct 2011, 09:49

Hello.
I followed this guid to create my DSDT. My Mobo is a P8P67 Pro (rev 3.0) bios 2001, but I think it did not work as they are not recognized can the USB 3, Bluetooth and other things. What I do wrong? :|
User avatar
Cassio
Olarila Staff
Olarila Staff
Posts: 3765
Joined: 26 Aug 2011, 22:53

Re: Patches

Post by Cassio » 26 Oct 2011, 12:28

The patch for this mobo is available on first page.

For USB 3.0 you need PXHCD kext.

[External Link Removed for Guests]

Bluetooth I have no idea.
ASUS N53Jq • CPU: Intel Core i7-740QM 1.73GHz • RAM: 6,0GB • HD: 500GB • GPU: GeForce GT 425M 1GB 1920x1080 • OS: [External Link Removed for Guests] • Linux Mint 15 • Windows 8
pilsator
Posts: 21
Joined: 22 Oct 2011, 20:33

Re: Patches

Post by pilsator » 31 Oct 2011, 15:25

oldnapalm wrote:I guess you can just remove

Code: [Local Link Removed for Guests]

Arg0
Arg1
Arg2
Arg3
after

Code: [Local Link Removed for Guests]

Return (NVOP)
Anything after "return" will be unreachable statement anyway.
Thanks, oldnapalm, will try.
pilsator
Posts: 21
Joined: 22 Oct 2011, 20:33

Re: Patches

Post by pilsator » 31 Oct 2011, 22:49

After removing those 4 lines I could compile the dsdt.aml without errors, just got 2 warnings. Looking forward to try it, I just have to install Lion on an external hd again first.
pilsator
Posts: 21
Joined: 22 Oct 2011, 20:33

Re: Patches

Post by pilsator » 01 Nov 2011, 02:25

The patched dsdt didn't have any effect on screen resolution (1024x768 without any other options). The vostro also only boots with safe system start -x.
I installed iATKOS Lion with the extra-folder option checked, anything else default.
Post Reply

Return to “DSDT”