Skip to content

Commit

Permalink
Thunderbolt 3 hotplug with sleep
Browse files Browse the repository at this point in the history
This patch requires to switch Thunderbolt mode in BIOS to "Native + Low Power mode".
This mode caused second sleep not work with kernel panic. This patch solves this issue.

All credit goes to this EliteMacs86 thread - https://www.elitemacx86.com/threads/guide-how-to-enable-thunderbolt-3-hotplug.462

Signed-off-by: kecinzer <1541555+kecinzer@users.noreply.github.com>
  • Loading branch information
kecinzer committed Jun 4, 2020
1 parent d882b11 commit d4d6ac0
Show file tree
Hide file tree
Showing 8 changed files with 2,135 additions and 0 deletions.
Binary file added EFI/OC/ACPI/SSDT-TB3-DTGP.aml
Binary file not shown.
Binary file added EFI/OC/ACPI/SSDT-TB3-HP.aml
Binary file not shown.
Binary file added EFI/OC/Drivers/TbtForcePower.efi
Binary file not shown.
81 changes: 81 additions & 0 deletions EFI/OC/Kexts/ThunderboltReset.kext/Contents/Info.plist
@@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>18G95</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>ThunderboltReset</string>
<key>CFBundleIdentifier</key>
<string>com.osy86.ThunderboltReset</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>ThunderboltReset</string>
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0d1</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>1.0.0d1</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>11B52</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>19B81</string>
<key>DTSDKName</key>
<string>macosx10.15</string>
<key>DTXcode</key>
<string>1120</string>
<key>DTXcodeBuild</key>
<string>11B52</string>
<key>IOKitPersonalities</key>
<dict>
<key>Polaris22Fixup</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.osy86.ThunderboltReset</string>
<key>IOClass</key>
<string>ThunderboltReset</string>
<key>IOMatchCategory</key>
<string>ThunderboltReset</string>
<key>IOProviderClass</key>
<string>IOResources</string>
<key>IOResourceMatch</key>
<string>IOKit</string>
</dict>
</dict>
<key>LSMinimumSystemVersion</key>
<string>10.14</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2019 osy86. All rights reserved.</string>
<key>OSBundleLibraries</key>
<dict>
<key>as.vit9696.Lilu</key>
<string>1.2.0</string>
<key>com.apple.kpi.bsd</key>
<string>12.0.0</string>
<key>com.apple.kpi.dsep</key>
<string>12.0.0</string>
<key>com.apple.kpi.iokit</key>
<string>12.0.0</string>
<key>com.apple.kpi.libkern</key>
<string>12.0.0</string>
<key>com.apple.kpi.mach</key>
<string>12.0.0</string>
<key>com.apple.kpi.unsupported</key>
<string>12.0.0</string>
</dict>
<key>OSBundleRequired</key>
<string>Root</string>
</dict>
</plist>
Binary file not shown.
33 changes: 33 additions & 0 deletions EFI/OC/config.plist
Expand Up @@ -110,6 +110,22 @@
<key>Path</key>
<string>SSDT-IGPU.aml</string>
</dict>
<dict>
<key>Comment</key>
<string>DTGP helper method</string>
<key>Enabled</key>
<true/>
<key>Path</key>
<string>SSDT-TB3-DTGP.aml</string>
</dict>
<dict>
<key>Comment</key>
<string>Thunderbolt 3 hotplug</string>
<key>Enabled</key>
<true/>
<key>Path</key>
<string>SSDT-TB3-HP.aml</string>
</dict>
</array>
<key>Patch</key>
<array>
Expand Down Expand Up @@ -1475,6 +1491,22 @@
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>BundlePath</key>
<string>ThunderboltReset.kext</string>
<key>Comment</key>
<string></string>
<key>Enabled</key>
<true/>
<key>ExecutablePath</key>
<string>Contents/MacOS/ThunderboltReset</string>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
</array>
<key>Emulate</key>
<dict>
Expand Down Expand Up @@ -1701,6 +1733,7 @@
<array>
<string>HfsPlus.efi</string>
<string>OpenRuntime.efi</string>
<string>TbtForcePower.efi</string>
</array>
<key>Input</key>
<dict>
Expand Down
52 changes: 52 additions & 0 deletions SSDT/SSDT-TB3-DTGP.dsl
@@ -0,0 +1,52 @@
/*
* Intel ACPI Component Architecture
* AML/ASL+ Disassembler version 20200110 (64-bit version)
* Copyright (c) 2000 - 2020 Intel Corporation
*
* Disassembling to symbolic ASL+ operators
*
* Disassembly of iASLYnueN2.aml, Thu Jun 4 07:47:38 2020
*
* Original Table Header:
* Signature "SSDT"
* Length 0x00000064 (100)
* Revision 0x02
* Checksum 0xA3
* OEM ID "KGP "
* OEM Table ID "DTPG"
* OEM Revision 0x00001000 (4096)
* Compiler ID "INTL"
* Compiler Version 0x20180427 (538444839)
*/
DefinitionBlock ("", "SSDT", 2, "KGP ", "DTPG", 0x00001000)
{
Method (DTGP, 5, NotSerialized)
{
If ((Arg0 == ToUUID ("a0b5b7c6-1318-441c-b0c9-fe695eaf949b")))
{
If ((Arg1 == One))
{
If ((Arg2 == Zero))
{
Arg4 = Buffer (One)
{
0x03 // .
}
Return (One)
}

If ((Arg2 == One))
{
Return (One)
}
}
}

Arg4 = Buffer (One)
{
0x00 // .
}
Return (Zero)
}
}

0 comments on commit d4d6ac0

Please sign in to comment.