Jump to content
haydendo

How to patch DSDT from scratch

Recommended Posts

Hi. My laptop (ThinkPad T420s) is not on your DSDT list. Is it possible for me to create my own patched DSDT? I tried creating my own base DSDT.Using DSDT Editor app, Extract DSDT, compiled it, then Fix errors button, then installed it with multishit. When I rebooted my laptop, it now freezes. Is there a minimum required code change or patch for it to work?

Link to comment
Share on other sites

  • Administrators

For some laptops (I know of some Samsung) you can't fix errors or it won't boot, so you need to use older version or run IASL from command line (it will create AML even if there are errors).


You may also have made some mistake, like saving DSL (source) instead of AML (binary).


Just extract and compile (fixing errors or not) won't make a difference. If you don't make any changes, it's the same as if you don't have a dsdt.aml at all.


Usual patches

http://Olarila.com/forum/viewtopic.php?f=19&t=634

Donation with Paypal HERE

Donation with Stripe HERE

Donation with BuyMeaCoffee HERE

Donation with Mercado Livre HERE

Donation with Binance 0xdbe48ef6b158f1dd0035d7f49555c99e52f72714

Donation with BTC 33HeGCuCSh4tUBqdYkQqKpSDa1E7WeAJQ3

Donation with PicPay @danielnmaldonado

Donation with PiX @danielnmaldonado@gmail.com

Link to comment
Share on other sites

Thank you. Some comments on the following:


For some laptops (I know of some Samsung) you can't fix errors or it won't boot, so you need to use older version or run IASL from command line (it will create AML even if there are errors).

-you mean older version of DSDT Editor? In running IASL from command line, DSDT Editor is still the tool to use?


You may also have made some mistake, like saving DSL (source) instead of AML (binary).

-On DSDT Editor, I click on "Save AML as..." then save it on desktop, then install it using multishit. Is this the proper way.


Just extract and compile (fixing errors or not) won't make a difference. If you don't make any changes, it's the same as if you don't have a dsdt.aml at all.

-This is correct. But my goal here is to have a working patched DSDT first which can I edit incrementally.

Link to comment
Share on other sites

  • Administrators

-you mean older version of DSDT Editor? In running IASL from command line, DSDT Editor is still the tool to use?

Older version of IASL. The editor doesn't matter, can be any. If you use DSDT Editor, replace iasl in Contents/Resources/Java.

 

-On DSDT Editor, I click on "Save AML as..." then save it on desktop, then install it using multishit. Is this the proper way.

I don't know about multishit, but the rest is correct. I don't get why someone needs to use a tool to something as simple as drag and drop a file to a folder.

 

-This is correct. But my goal here is to have a working patched DSDT first which can I edit incrementally.

It won't be patched unless you patch it first.

Donation with Paypal HERE

Donation with Stripe HERE

Donation with BuyMeaCoffee HERE

Donation with Mercado Livre HERE

Donation with Binance 0xdbe48ef6b158f1dd0035d7f49555c99e52f72714

Donation with BTC 33HeGCuCSh4tUBqdYkQqKpSDa1E7WeAJQ3

Donation with PicPay @danielnmaldonado

Donation with PiX @danielnmaldonado@gmail.com

Link to comment
Share on other sites

Finally, I got a working DSDT without the need of a motherboard-specific/compatible patched file. Thanks for this forum for inputs, especially oldnapalm. Below are the steps I used and might help others. Please correct me for mistakes or let me know if it shouldn't be here.


A. Prepare a clean DSDT

1. Run a DSDT Editor on Windows 7 (of course, Windows version of DSDT Editor is used).

2. Then on File -> Extract DSDT.

3. On IASL -> Compile. Here I got 17 errors.

4. Click "Fix errors" button. I now have 0 errors, 3 warnings, 1 remark. Although I have compiled DSDT now. I decided to try to fix the Warnings and Remarks. For warnings which is just ("Not all control paths return a value...", I just added this statement at the end of erroring method: "Return (Zero)".

5. For the Remark message ("Use of compiler reserved name (_T_0), on Patch -> Open, I then browse "_T_x rename.txt" under "/Patches" folder which is included in the DSDT Editor package. Click "Apply" button.

6. Compile again and now it's all clean.


B. Apply a patch

1. A method (or function) that's always been called by almost all patches should be added to DSDT. It's called "DTGP". If it's not present, you'll get "Object does not exist (DTGP)" error. To do this, on Patch -> Open, and then browse to "DTGP.txt". Click "Apply" button again.

2. Now, copy an existing patch from here (http://Olarila.com/forum/viewtopic.php?f=19&t=634) or from an existing DSDT.aml that contains the patch you need.

3. Compile again.

4. If no errors are found, on IASL -> Save AML as... and save it with filename "DSDT.aml" on location accessible when you boot on Mac.

5. Boot to your hackintosh (Mac) now. Copy the "DSDT.aml" you saved to "/Extra" folder.

6. Reboot. That's it.

Link to comment
Share on other sites

The above mentioned is certainly helping me. I used the:


5) For the Remark message ("Use of compiler reserved name (_T_0), on Patch -> Open, I then browse "_T_x rename.txt" under "/Patches" folder which is included in the DSDT Editor package. Click "Apply" button.


method and those issues have been cleared. However I'm still receiving what's in the attachment. I can't seem to find anything in the provided directories to patch the errors. Please help. I can boot into my Hackintosh with boot flags -x -v & I got Ethernet to work but, I can't move past that to at least a normal boot without a good DSDT file.


Laptop: Acer Aspire Ethos 8951G-9630

Motherboard: Acer SM81_HR

Processor: Intel Core i7 2670QM @ 2.2-3.9GHz 64-bit ready Multi-core (4 total) Hyper-threaded (8 total)


Please help.

1609047370_DSDTErrorReadout.jpg.6ae735868626f037cb368224fd1ef167.jpg

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.





×
  • Create New...
The popup will be closed in 15 seconds...