Contribute
Register

Custom SSDT's using Corpnewt's SSDTTime

Status
Not open for further replies.

Edhawk

Moderator
Joined
Aug 2, 2013
Messages
6,296
Motherboard
Asus ROG Strix X570-F Gaming
CPU
Ryzen 9 3900X
Graphics
RX 6700 XT
Mac
  1. iMac
  2. MacBook Air
  3. MacBook Pro
Mobile Phone
  1. iOS
Creating custom SSDT's for your system should be done using Corpnewt's SSDTTime python Script and the system DSDT.aml table.

First thing you need to do is get a hold of your system DSDT.aml.
  1. The easiest way to do this is to use Hackintool.
  2. Download and copy the Hackintool app to the Applications folder if you don't already have it installed.
  3. Open Hackintool and navigate to the 'Utilities' tab.
  4. Select the Dump ACPI icon, highlighted in Red rectangle in screenshot below:
    • Screenshot 2022-02-16 at 19.12.29.png Hackintool > Utilities > Dump ACPI tool
  5. This will start a wizard to extract your ACPI tables.
    1. The first thing it asks is where do you want to save the ACPI tables.
    2. Best thing to do is to use the create a 'New folder' option and create the folder on your Desktop or somewhere easy to find/locate.
    3. Name the folder 'ACPI' or something similar then Select 'Choose a destination folder'
  6. Hackintool will show a lot of text in the Utilities window. This just confirms the execution of the ACPI table extraction and disassembly of the said tables.
    1. Screenshot 2022-02-16 at 19.24.34.png Hackintool > Utilities tab with extracted/disassembled text
  7. What this means is you will find the DSDT and all the SSDT's from your system in the new 'ACPI' folder you created.
    1. The ACPI tables will be in two formats: for example DSDT.aml and DSDT.dsl
      1. DSDT.aml is the table in ACPI Machine Language Binary format (assembled and ready for use)
      2. DSDT.dsl is the same table but as a Disassembled ASL file (used when editing/patching the table)
You now have a copy of your System DSDT.aml ready for use.

Corpnewt's SSDT:
  1. Download Corpnewt's SSDTTime from his Github repository - https://github.com/corpnewt/SSDTTime
    • Select the green coloured 'Code' button to download the SSDTTime Folder.
  2. Move The downloaded folder to your desktop and open it.
  3. Double-click on the SSDTTime.command icon.
    • Screenshot 2022-02-16 at 19.07.22.png
  4. This should open the following Terminal window.
    • Screenshot 2022-02-16 at 19.08.20.png
    • Type 1, for FixHPET
  5. SSDTTime will ask you to drop the DSDT.aml table on the Terminal Window.
    • Drag and drop the DSDT.aml you saved earlier in the ACPI folder on to the Terminal Window
    • Screenshot 2022-02-16 at 19.10.04.png SSDTTime - asking for DSDT.aml
  6. The script will then inspect the DSDT.aml and look at all the possible IRQ settings. It will point out those that clash with macOS and recommend you press the letter 'C' to select the default output, which you should do.
    • Screenshot 2022-02-16 at 19.30.46.png SSDTTime script - select C for default IRQ options
    • This will then create a new folder within the SSDTTime folder, named Results.
    • Within this Results folder will be generated a pair of config.plist's, one for Clover and one for OpenCore, usually with three rename patches for the HPET, RTC and TMIR IRQ fixes.
    • Plus two SSDT-HPET's one in ASL format the other in DSL format.
    • Screenshot 2022-02-16 at 19.33.47.png Results folder contents after FixHPET option completed
    • The SSDTTime window will show the following, asking for you to press enter to return to the main menu:
    • Screenshot 2022-02-16 at 19.35.30.png FixHPET Results
    • Window above shows confirmation of rename patches and compilation of SSDT-HPET.
  7. When you return to the main menu you are asked to make another selection, this time FakeEC - option 2
    • The script will again inspect your DSDT.aml to see if an EC device is present. If not it will generate a pair of SSDT-EC tables and add them to the Results folder.
    • Screenshot 2022-02-16 at 19.39.40.png Fake EC results
  8. Upon Returning to the Main menu, you need to select option for the PluginType - option 4,
    • This sets Plugin-type=1 on the first processor object (thread)
    • Screenshot 2022-02-16 at 19.43.09.png PluginType results
Depending on your System you may need to generate a few of the other SSDT's but most systems really only need the HPET, PLUG and EC SSDT's.

So now quit the script and close the Terminal window.

The contents of the Results folder now contains eight (8) items, all generated using your system DSDT.aml.

Screenshot 2022-02-16 at 19.45.24.png Results folder contents upon completion of tasks.

Add SSDT's and patches to config.plist:

I am going to assume you are using OpenCore.
  1. Now you need to mount your macOS Drives EFI partition.
  2. Navigate to the /EFI/OC/ACPI folder
  3. Drag and drop the three SSDT's to your ACPI folder - SSDT-EC.aml, SSDT-HPET.aml and SSDT-PLUG.aml
  4. Open your config.plist using corpnewt's ProperTree plist editor.
  5. Select File > OC Clean Snapshot from the drop down list, as shown below.
    • Screenshot 2022-02-16 at 19.54.10.png
    • This should open a Finder window which contains the OC folder you are using.
    • Screenshot 2022-02-16 at 19.56.10.png Select Choose button.
    • ProperTree will inspect the OC folder and sub-folders and make sure that any SSDT's, Drivers, Kexts and Tool's that are present in the setup are added to the config.plist, in the correct manner.
  6. Save the changes to your config.plist, the three SSDT's should have been added to the ACPI > Add section.
  7. Keep the config.plist open.
  8. Go to the ProperTree > File > Open command and select the 'patches_OC.plist' created and located in the Results folder.
    • Screenshot 2022-02-16 at 20.01.10.png Example of patches_OC.plist contents
    • With this open select the ACPI > Patch header and right-click on the name 'Patch'.
    • This will bring up a sub-menu, which will allow you to select 'Copy Children'
    • Screenshot 2022-02-16 at 20.01.21.png High-Click sub menu, with 'Copy Children' option highlighted
  9. Go back to your main OC config.plist and select the ACPI > Patch name and right-click to display the sub-menu, select Paste to copy the patches to the config.plist.
  10. Save the config.plist.
You can now close all open windows and apps.

Reboot your system with the changes in place.

When you get to the OC Boot Screen you need to use the ClearNvram and ResetSystem tools for the changes you have made to your OC setup to take effect correctly.

Note. Any system using a Skylake or newer CPU will also require the SSDT-USBX.aml table for USB power. This can be downloaded from below and added to the /OC/ACPI folder and config.plist with the other tables.

Simple really!

Edit 20/02/2022:
SSDT-USBX.aml should not be used alongside USBPorts.kext, as both the ACPI table and the kext contain USB power settings for your system, and it is never a good thing to duplicate these settings.

If on the other hand you decide to use the SSDT-UIAC.aml table, which Hackintool will generate when you configure your USB ports, then you do need to use the SSDT-USBX.aml table. As the SSDT-UIAC.aml table doesn't contain any USB power settings.

Thanks to @Henties for pointing this out.

Edit 25/09/2022:
Revised and updated version of SSDTTime-Master available that allows the user to generate more SSDT's and patches, based on their system DSDT.aml. See post #15 - updated SSDTTime-Master details
 

Attachments

  • SSDT-USBX.aml.zip
    943 bytes · Views: 184
Last edited:
"Note. Any system using a Skylake or newer CPU will also require the SSDT-USBX.aml table for USB power. This can be downloaded from below and added to the /OC/ACPI folder and config.plist with the other tables."

@Edhawk @miliuco
When a USBPorts.kext file, generated with Hackintool is used a SSDT-USBX.aml should not be deployed because USB power definitions are already included in the info.plist file contained within the Hackintool generated USBPorts.kext. These power definitions can be inspected under the IOProviderMergeProperties Dictionary of the info.plist file.

Defining power properties twice for a system is not recommended.

Greetings Henties
 

Attachments

  • USBPorts.kext.zip
    2.4 KB · Views: 74
  • Info.plist.zip
    1.6 KB · Views: 70
Last edited:
I'd recommend dumping the ACPI either through SysReport in a debug version of OpenCore, or the equivalent in Clover. Another option is dumping from another OS. When booting macOS, you're going to be dumping already modified ACPI, which can screw up SSDTTime's detection for which patches are needed. Be extra careful with OpenCore since it will modify ACPI for any OS it boots (ie if dumping from Windows, boot it through your BIOS or other boot manager, not OpenCore). It's not a permanent change, it just changes it in memory while booting.

Probably also worth noting that you will want to use FakeEC-Laptop for laptops. It creates a simpler SSDT which only adds a fake EC device. It leaves the current Embedded Controller in your ACPI so that it can still handle EC queries for brightness keys, other function keys, and battery status.

Most devices Skylake and newer probably don't need IRQ patches either, but honestly it doesn't hurt to have them. I've seen a lot of people screw this one up since it has a separate patches.plist though, lol.

Overall it is a nice utility, cool to see it getting more recognition.
 
@Henties
I have code concerning the power management of USB ports on both sides, SSDT-EC-USBX (not SSDT-USBX) and USBports (Info.plist). In SSDT-EC-USBX there is also the fake EC device.
According to your comment, we could have SSDT-EC (no USBX, just fake EC) + USBports to not define power properties 2 times. That makes sense.
Currently my USB system seems to work well but I will test what you say to check if the USB system is still okay, as it seems evident when reading your post.
 
@miliuco Indeed the SSDT-EC-USBX.aml is actually 2 .aml's in one, just a plain SSDT-EC.aml, to provide the fake EC device, usually suffices. However if you prefer using a combo SSDT-EC-USBX.aml instead then just remove the USB power definitions that Hackintool embeds into the info.plist file of the USBPorts.kext it generates.
Less equates to more, dual definitions of the same entities can lead to catastrophic results.


Greetings Henties
 

Attachments

  • USB charging currents without a  USBX.aml  file.png
    USB charging currents without a USBX.aml file.png
    272.1 KB · Views: 134
Interesting conversation, thanks for the insight. Do I understand you right assuming that using Hackintool´s info.plist would allow to change the power management for each port separately? What I interpret from the SSDT-EC-USBX file just seems to be one definition for all. Not that I - as absolute noob on this topic - would know about a good reason to handle different ports differently...
 
dual definitions of the same entities can lead to catastrophic results.
In "the other forum's" Open Core Discussion, we concluded that having the same USB current limits in USBX and USBPorts.kext is preferable. I've been running this way (USB current definitions in both places) for many months now with no issues. See my HackMini8,1 EFI here.

EDIT: For my USB current limits, I use those from the real Mac equivalent to the SMBIOS MacModel that I've selected (e.g. my USBX for my HackMini8,1 is from a real MacMini8,1 ACPI). See here for my first use of the real MacMini8,1 USBX.

EDIT2: @5T33Z0 in "the other forum" posted real Mac USB current values here.
 
Last edited:
Having read all the comments above, I think SSDT-USBX.aml is meant to be used when the SSDT-UIAC.aml that Hackintool generates is added to the setup. As the SSDT-UIAC.aml table doesn't contain any USB Power settings.

@Henties you are correct, we shouldn't be duplicating the USB power settings.

I forgot the USBPorts.kext also contains the USB power settings. I will edit the first post to rectify this error.
 
Great guide @Edhawk ,
and for anyone who does not have access to a Mac or Hack then you can use this guide in Linux too by booting from an Ubuntu Live USB and selecting the option is Try Ubuntu

Update:
if booting from a Ubuntu 20.04 or higher Live USB then you will first need to install the missing module Tkinter
  • Launch the Terminal and run the following;
Code:
sudo apt update
Code:
sudo apt install python3-tk
  • Download SSDTime and Extract it to your desktop.
  • Open the SSDTTime-master folder to reveal it's contents
  • Launch the Terminal and then run the SSDTTime.command
  • Select Dump DSDT as per option #8 in the example below;
1645372404068.png

  • SSDTTime will generate a Results folder where you will find your DSDT
1645372791599.png

1645372821723.png

  • You can then follow Edhawk's guide
  • Your SSDT's and plist patches will go in your Results folder.
  • You should then save your Results folder to a FAT32 formatted flash drive to use in your EFI
 
Last edited:
Status
Not open for further replies.
Back
Top