Contribute
Register

[Pre Final] Zbook G3 / G4 Thunderbolt hotplug (Thunderbolt Enable) + S0, S3

Status
Not open for further replies.
LOG
"-------- PCI0 INIT ------------"
"-------- ENABLE TANDERBOLT ------------"
"SGOV(0x0000000001060010, 0x0000000000000001) called"
"GPIO 0x0000000001060010 has MMIO address 0x00000000FDAE0728"
"-------- ENABLE TANDERBOLT ------------"
"TINI"
"Method TBTD"
"TBTD - Device no"
0x000000000000001C
"TBTF"
"Function no"
0x0000000000000004
"MMTB"
"Method TBTD"
"TBTD - Device no"
0x000000000000001C
"TBTF"
"Function no"
0x0000000000000004
"TBT-US-ADR"
0x00000000F7800000
"OSUP"
"Cmd acknowledged"
"End-of-OSUP"
"End-of-TINI"
"GFX DockEvent Enter"
"Dock Status"
0x0000000000000000
"GFX DockEvent Exit"
"Method _PR_.CPU0._DSM Called"
"Method _PR_.CPU0._DSM Called"
"---- Method L61 Start ----"
"_SB.PCI0.RP05.HPSX="
0x0000000000000001
"---- RP05.VDID * RP05.HPSX=True ----"
"---- Store One RP05.PDCX=True ----"
"---- Store One RP05.HPSX=True ----"
" XHC state is _PS0"

This DSDT build finally allows to get same results as if was made by TBTForceEnable.efi. This means that if it is possible to get this PIN controlled by ACPI, with further modding it will be possible to implement WAKE support.

BTW. _E4C method was renamed to XE4C to disable XHC sleep setting if nothing is connected.


***
For native DSDT debug Patch
Method (ADBG, 1, Serialized)
{
Return (Zero)
}
To this
Method (ADBG, 1, Serialized)
{
Debug = Arg0
}

For ADBG debug:

 

Attachments

  • dsdt - almost stable but no sleep.dsl
    1.1 MB · Views: 42
Last edited:
Interesting FieldObjects
SOHP, 8 which is always One
TBSF, 8

Device internal FieldObject
SSMP, 8


This will disable XHC controller
Store (0x15, TBSF)
Store (0xF7, SSMP)

Unknown from DMSi
Store (0x17, TBSF)
Store (0xF7, SSMP)

If device connected, it will be set to FF, But if Nothing connected, then SSMP is F7 - So here is the key to enable USB


Small patch to force wake state for XHC. It will think that there is always a device connected
<dict>
<key>Comment</key>
<string>XHC Force wake, sleep disabled</string>
<key>Disabled</key>
<false/>
<key>Find</key>
<data>
91NTTVA=
</data>
<key>Replace</key>
<data>
/1NTTVA=
</data>
</dict>
 
Last edited:
First build. Sleep/ Wake not working.

1. DSDT Hotpathes are Clover type. If OpenCore is used - make your injection
2. Copy (ACPI Thundebolt device_v4.aml, SSDT-TB3HP.aml) to ACPI folder. If OpenCore Is Used - Inject SSDT to config
 

Attachments

  • ACPI Thundebolt device_v4.aml
    285 bytes · Views: 53
  • SSDT-TB3HP.aml
    6 KB · Views: 46
  • DSDT HOTPATCHES PATCHES.plist
    920 bytes · Views: 45
Last edited:
Some new Logs:

//Boot


42:47.602 "[____TBT_ENABLED___]"
42:47.615 "PCI INI TBTS is Zero"
42:47.623 "TINI"
42:47.630 "TBTD"
42:47.636 "Device no"
42:47.643 0x000000000000001C
42:47.650 "TBTF"
42:47.657 "Function no"
42:47.664 0x0000000000000004
42:47.670 "MMTB"
42:47.677 "TBTD"
42:47.683 "Device no"
42:47.689 0x000000000000001C
42:47.695 "TBTF"
42:47.701 "Function no"
42:47.707 0x0000000000000004
42:47.713 "TBT-US-ADR"
42:47.719 0x00000000F7800000
42:47.725 "OSUP"
42:47.782 "Cmd acknowledged"
42:47.787 "End-of-OSUP"
42:47.793 "End-of-TINI"
42:47.799 "GFX DockEvent Enter"
42:47.804 "Dock Status"
42:47.809 0x0000000000000000
42:47.814 "GFX DockEvent Exit"
42:47.825 "Method _PR_.CPU0._DSM Called"
42:47.830 "Method _PR_.CPU0._DSM Called"



// E4C GPE is called by system


42:47.930 "_E4C"
42:47.931 "WWAK"
42:47.932 "WSUB"
42:47.933 "TSUB"
42:47.934 "TBTD"
42:47.935 "Device no"
42:47.935 0x000000000000001C
42:47.936 "TBTF"
42:47.936 "Function no"
42:47.936 0x0000000000000004
42:47.937 "ADR"
42:47.937 0x00000000F00E4000
42:47.937 "Sec Bus"
42:47.937 0x0000000000000004
42:47.937 "WSUB-Finished"
42:47.937 "GNIS"
42:47.938 "GNIS_Dis=0"
42:47.938 "TBT-HP-Handler"
42:47.938 "PEG WorkAround"
42:50.980 "_E4C"
42:50.980 "WWAK"
42:50.981 "WSUB"
42:50.981 "TSUB"
42:50.982 "TBTD"
42:50.992 "Device no"
42:51.003 0x000000000000001C
42:51.003 "TBTF"
42:51.015 "Function no"
42:51.026 0x0000000000000004
42:51.037 "ADR"
42:51.038 0x00000000F00E4000
42:51.048 "Sec Bus"
42:51.059 0x0000000000000004
42:51.059 "WSUB-Finished"
42:51.070 "GNIS"
42:51.121 "GNIS_Dis=0"
42:51.122 "TBT-HP-Handler"
42:51.132 "PEG WorkAround"
42:51.337 "TBFF"
42:51.380 "MMTB"
42:51.381 "TBTD"
42:51.381 "Device no"
42:51.382 0x000000000000001C
42:51.382 "TBTF"
42:51.383 "Function no"
42:51.383 0x0000000000000004
42:51.395 "TBT-US-ADR"
42:51.395 0x00000000F0400000
42:51.396 "Dev Present"
42:51.396 "TBT SW SMI"
42:51.397 "NTFY"
42:51.398 "Notify RP05"
42:51.424 "End-of-_E4C"


// Sleep button pressed



47:23.921 " Host router Upstream port _PS3"
47:23.921 "MMTB"
47:23.921 "TBTD"
47:23.921 "Device no"
47:23.921 0x000000000000001C
47:23.921 "TBTF"
47:23.921 "Function no"
47:23.921 0x0000000000000004
47:23.922 "TBT-US-ADR"
47:23.922 0x00000000F0400000
47:23.922 "SXST 0x1D cmd"
47:23.974 "Cmd acknowledged"
47:24.026 "End-of-SXST"



47:24.042 "Method-_PTS-----START-----"
47:24.042 "TPTS CALLED"
47:24.042 "Method-_PTS-----END-----"






47:24.853 "Method-_WAK-----START-----"




47:24.853 "TWAK CALLED"
47:24.853 "[____TBT_ENABLED___]"
47:24.866 "ZWAK TBTS is Zero"
47:24.866 "TINI"
47:24.866 "TBTD"
47:24.866 "Device no"
47:24.866 0x000000000000001C
47:24.866 "TBTF"
47:24.867 "Function no"
47:24.867 0x0000000000000004
47:24.867 "MMTB"
47:24.867 "TBTD"
47:24.867 "Device no"
47:24.867 0x000000000000001C
47:24.867 "TBTF"
47:24.867 "Function no"
47:24.867 0x0000000000000004
47:24.867 "TBT-US-ADR"
47:24.867 0x00000000F7800000
47:24.867 "OSUP"
47:24.919 "Cmd acknowledged"
47:24.919 "End-of-OSUP"
47:24.919 "End-of-TINI"
47:24.921 "RP05_VDID is not 0xFFFFFFFF"
47:24.924 "ZWAK TBTS is Zero And signal WFEV"
47:24.924 "Method-_WAK-----END-----"



47:31.245 "_E4C"
47:31.245 "WWAK"
47:31.245 "WSUB"
47:31.245 "TSUB"
47:31.246 "TBTD"
47:31.246 "Device no"
47:31.246 0x000000000000001C
47:31.246 "TBTF"
47:31.246 "Function no"
47:31.246 0x0000000000000004
47:31.246 "ADR"
47:31.246 0x00000000F00E4000
47:31.246 "Sec Bus"
47:31.246 0x0000000000000004
47:31.246 "WSUB-Finished"
47:31.246 "GNIS"
47:31.246 "GNIS_Dis=0"
47:31.246 "TBT-HP-Handler"
47:31.246 "PEG WorkAround"
47:31.447 "TBFF"
47:31.447 "MMTB"
47:31.447 "TBTD"
47:31.447 "Device no"
47:31.447 0x000000000000001C
47:31.447 "TBTF"
47:31.447 "Function no"
47:31.447 0x0000000000000004
47:31.447 "TBT-US-ADR"
47:31.447 0x00000000F0400000
47:31.447 "Dev Present"
47:31.447 "TBT SW SMI"
47:31.448 "NTFY"
47:31.448 "Notify RP05"
47:31.465 "End-of-_E4C"
47:36.879 "_E4C"
47:36.879 "WWAK"
47:36.879 "WSUB"
47:36.879 "TSUB"
47:36.879 "TBTD"
47:36.879 "Device no"
47:36.879 0x000000000000001C
47:36.879 "TBTF"
47:36.879 "Function no"
47:36.879 0x0000000000000004
47:36.879 "ADR"
47:36.879 0x00000000F00E4000
47:36.879 "Sec Bus"
47:36.879 0x0000000000000004
47:36.879 "WSUB-Finished"
47:36.879 "GNIS"
47:36.879 "GNIS_Dis=0"
47:36.879 "TBT-HP-Handler"
47:36.880 "PEG WorkAround"
47:37.080 "TBFF"
47:37.080 "MMTB"
47:37.081 "TBTD"
47:37.081 "Device no"
47:37.081 0x000000000000001C
47:37.081 "TBTF"
47:37.081 "Function no"
47:37.081 0x0000000000000004
47:37.081 "TBT-US-ADR"
47:37.081 0x00000000F0400000
47:37.081 "Dev Present"
47:37.081 "TBT SW SMI"
47:37.082 "NTFY"
47:37.082 "Notify RP05"
47:37.098 "End-of-_E4C"
 

Attachments

  • ACPI Thundebolt device_v7.aml
    506 bytes · Views: 30
  • dsdt.aml
    153.4 KB · Views: 40
FINALLY! Thunderbolt Wake Working!!!


============= Debugging testing Build Manual ================
1. Rename this at your OC\ CLOVER ACPI

Comment: PCI INI to ZINI - KP If TBTDEV SSDT is missing
Find: 5F494E4908
Replace: 5A494E4908

Comment: XHC5 Force device connected
Find: F753534D50
Replace: FF53534D50

Comment: _E4C to XE4C - To disable notification
Find: 5F453443
Replace: 58453443

2.
Add SSDTs to ACPI folder. If Opencore - then don`t forget to inject them into Config
3. Add call to \_SB.PCI0.TBDE.TWAK () to _WAK Method of your Rehabman xtra _zbG3s.aml SSDT




Some debug:
2022-06-19 01:33:54.614 Df kernel[0:71] (AppleACPIPlatform) "[____TBT_ENABLED___]"
2022-06-19 01:33:54.627 Df kernel[0:71] (AppleACPIPlatform) "PCI INI TBTS is One"
2022-06-19 01:33:54.634 Df kernel[0:71] (AppleACPIPlatform) "TINI"
2022-06-19 01:33:54.641 Df kernel[0:71] (AppleACPIPlatform) "TBTD"
2022-06-19 01:33:54.648 Df kernel[0:71] (AppleACPIPlatform) "Device no"
2022-06-19 01:33:54.654 Df kernel[0:71] (AppleACPIPlatform) 0x000000000000001C
2022-06-19 01:33:54.661 Df kernel[0:71] (AppleACPIPlatform) "TBTF"
2022-06-19 01:33:54.668 Df kernel[0:71] (AppleACPIPlatform) "Function no"
2022-06-19 01:33:54.675 Df kernel[0:71] (AppleACPIPlatform) 0x0000000000000004
2022-06-19 01:33:54.681 Df kernel[0:71] (AppleACPIPlatform) "MMTB"
2022-06-19 01:33:54.688 Df kernel[0:71] (AppleACPIPlatform) "TBTD"
2022-06-19 01:33:54.694 Df kernel[0:71] (AppleACPIPlatform) "Device no"
2022-06-19 01:33:54.700 Df kernel[0:71] (AppleACPIPlatform) 0x000000000000001C
2022-06-19 01:33:54.706 Df kernel[0:71] (AppleACPIPlatform) "TBTF"
2022-06-19 01:33:54.712 Df kernel[0:71] (AppleACPIPlatform) "Function no"
2022-06-19 01:33:54.718 Df kernel[0:71] (AppleACPIPlatform) 0x0000000000000004
2022-06-19 01:33:54.724 Df kernel[0:71] (AppleACPIPlatform) "TBT-US-ADR"
2022-06-19 01:33:54.729 Df kernel[0:71] (AppleACPIPlatform) 0x00000000F7800000
2022-06-19 01:33:54.735 Df kernel[0:71] (AppleACPIPlatform) "OSUP"
2022-06-19 01:33:54.792 Df kernel[0:71] (AppleACPIPlatform) "Cmd acknowledged"
2022-06-19 01:33:54.798 Df kernel[0:71] (AppleACPIPlatform) "End-of-OSUP"
2022-06-19 01:33:54.804 Df kernel[0:71] (AppleACPIPlatform) "End-of-TINI"
2022-06-19 01:33:54.809 Df kernel[0:71] (AppleACPIPlatform) "RP05_VDID ===="
2022-06-19 01:33:54.814 Df kernel[0:71] (AppleACPIPlatform) 0x00000000A1148086
2022-06-19 01:33:54.819 Df kernel[0:71] (AppleACPIPlatform) "GFX DockEvent Enter"
2022-06-19 01:33:54.825 Df kernel[0:71] (AppleACPIPlatform) "Dock Status"
2022-06-19 01:33:54.830 Df kernel[0:71] (AppleACPIPlatform) 0x0000000000000000
2022-06-19 01:33:54.835 Df kernel[0:71] (AppleACPIPlatform) "GFX DockEvent Exit"
2022-06-19 01:33:54.845 Df kernel[0:71] (AppleACPIPlatform) "Method _PR_.CPU0._DSM Called"
2022-06-19 01:33:54.850 Df kernel[0:71] (AppleACPIPlatform) "Method _PR_.CPU0._DSM Called"
2022-06-19 01:33:55.076 Df kernel[0:a9] (AppleACPIPlatform) " Host router Upstream port XPS0"


2022-06-19 01:35:03.190 Df kernel[0:13af] (AppleACPIPlatform) " Host router Upstream port XPS3"
2022-06-19 01:35:03.190 Df kernel[0:13af] (AppleACPIPlatform) "MMTB"
2022-06-19 01:35:03.190 Df kernel[0:13af] (AppleACPIPlatform) "TBTD"
2022-06-19 01:35:03.190 Df kernel[0:13af] (AppleACPIPlatform) "Device no"
2022-06-19 01:35:03.190 Df kernel[0:13af] (AppleACPIPlatform) 0x000000000000001C
2022-06-19 01:35:03.190 Df kernel[0:13af] (AppleACPIPlatform) "TBTF"
2022-06-19 01:35:03.190 Df kernel[0:13af] (AppleACPIPlatform) "Function no"
2022-06-19 01:35:03.190 Df kernel[0:13af] (AppleACPIPlatform) 0x0000000000000004
2022-06-19 01:35:03.190 Df kernel[0:13af] (AppleACPIPlatform) "TBT-US-ADR"
2022-06-19 01:35:03.190 Df kernel[0:13af] (AppleACPIPlatform) 0x00000000F0400000
2022-06-19 01:35:03.190 Df kernel[0:13af] (AppleACPIPlatform) "SXST 0x1D cmd"
2022-06-19 01:35:03.242 Df kernel[0:13af] (AppleACPIPlatform) "Cmd acknowledged"
2022-06-19 01:35:03.294 Df kernel[0:13af] (AppleACPIPlatform) "End-of-SXST"


2022-06-19 01:35:03.695 Df kernel[0:74] (AppleACPIPlatform) "Method-_PTS-----START-----"
2022-06-19 01:35:03.695 Df kernel[0:74] (AppleACPIPlatform) "TPTS CALLED"
2022-06-19 01:35:03.695 Df kernel[0:74] (AppleACPIPlatform) "Method-_PTS-----END-----"


2022-06-19 01:35:03.703 Df kernel[0:74] (AppleACPIPlatform) "Method-_WAK-----START-----"
2022-06-19 01:35:03.703 Df kernel[0:74] (AppleACPIPlatform) "TWAK CALLED"
2022-06-19 01:35:03.703 Df kernel[0:74] (AppleACPIPlatform) "[____TBT_ENABLED___]"
2022-06-19 01:35:03.720 Df kernel[0:74] (AppleACPIPlatform) "ZWAK TBTS is One"
2022-06-19 01:35:03.720 Df kernel[0:74] (AppleACPIPlatform) "TINI"
2022-06-19 01:35:03.720 Df kernel[0:74] (AppleACPIPlatform) "TBTD"
2022-06-19 01:35:03.720 Df kernel[0:74] (AppleACPIPlatform) "Device no"
2022-06-19 01:35:03.720 Df kernel[0:74] (AppleACPIPlatform) 0x000000000000001C
2022-06-19 01:35:03.720 Df kernel[0:74] (AppleACPIPlatform) "TBTF"
2022-06-19 01:35:03.720 Df kernel[0:74] (AppleACPIPlatform) "Function no"
2022-06-19 01:35:03.720 Df kernel[0:74] (AppleACPIPlatform) 0x0000000000000004
2022-06-19 01:35:03.720 Df kernel[0:74] (AppleACPIPlatform) "MMTB"
2022-06-19 01:35:03.720 Df kernel[0:74] (AppleACPIPlatform) "TBTD"
2022-06-19 01:35:03.720 Df kernel[0:74] (AppleACPIPlatform) "Device no"
2022-06-19 01:35:03.720 Df kernel[0:74] (AppleACPIPlatform) 0x000000000000001C
2022-06-19 01:35:03.720 Df kernel[0:74] (AppleACPIPlatform) "TBTF"
2022-06-19 01:35:03.720 Df kernel[0:74] (AppleACPIPlatform) "Function no"
2022-06-19 01:35:03.720 Df kernel[0:74] (AppleACPIPlatform) 0x0000000000000004
2022-06-19 01:35:03.721 Df kernel[0:74] (AppleACPIPlatform) "TBT-US-ADR"
2022-06-19 01:35:03.721 Df kernel[0:74] (AppleACPIPlatform) 0x00000000F7800000
2022-06-19 01:35:03.721 Df kernel[0:74] (AppleACPIPlatform) "OSUP"
2022-06-19 01:35:03.773 Df kernel[0:74] (AppleACPIPlatform) "Cmd acknowledged"
2022-06-19 01:35:03.773 Df kernel[0:74] (AppleACPIPlatform) "End-of-OSUP"
2022-06-19 01:35:03.773 Df kernel[0:74] (AppleACPIPlatform) "End-of-TINI"
2022-06-19 01:35:03.774 Df kernel[0:74] (AppleACPIPlatform) "RP05_VDID is not 0xFFFFFFFF"
2022-06-19 01:35:03.777 Df kernel[0:74] (AppleACPIPlatform) "ZWAK TBTS is One And signal WFEV"
2022-06-19 01:35:03.778 Df kernel[0:74] (AppleACPIPlatform) "Method-_WAK-----END-----"



2022-06-19 01:35:08.003 Df kernel[0:13c8] (AppleACPIPlatform) " Host router Upstream port XPS0"
 

Attachments

  • SSDT-TbtDev.aml
    499 bytes · Views: 44
  • SSDT-TB3HP_v2.aml
    6.1 KB · Views: 43
FINALLY! Thunderbolt is working! Wake Working!!!

Some debug:




============= Debugging testing ================
1. Rename this at your OC\ CLOVER ACPI


Comment: PCI INI to ZINI - KP If TBTDEV SSDT is missing
Find: 5F494E4908
Replace: 5A494E4908

Comment: XHC5 Force device connected
Find: F753534D50
Replace: FF53534D50

Comment: _E4C to XE4C
Find: 5F453443
Replace: 58453443

2. Add SSDTs to ACPI folder. If Opencore - then don`t forget to inject them into Config
3. Add call to \_SB.PCI0.TBDE.TWAK () to _WAK Method of your Rehabman xtra _zbG3s.aml SSDT
nice!

well done on your perseverance! :)
 
Hi, Edwardgeo.
Are the drivers loaded in System Information?
 
Hi, Edwardgeo.
Are the drivers loaded in System Information?
Hi! Currently it says like drivers are not loaded, but the device will appear after hotplug.


Report your hardware info and more data like images, etc.


I think that the reason why System Information shows "No drivers are loaded"is because of firmware. In original mac you will see there a UUID, Device-ID, Firmware version; but on hack, the thunderbolt firmware doesn't contain that info. From one side it could be good, as this info could be injected to firmware, the other side it could fail to work on non-OSX. The examples of firmware update are in attachments from Mojave update. There are updates of thunderbolt firmware for mbp13,3 and mbp14,3 (Zbook G3 and G4).
 

Attachments

  • Macbook13.3-ThunderboltUpdate-Mac-A5C67F76ED83108C.zip
    315 KB · Views: 34
  • Macbook14.3-ThunderboltUpdate- Mac-551B86E5744E2388.zip
    326.7 KB · Views: 38
Last edited:
BUG1. Wake will not work if there was never connected any device to usb-c before wake. I think that some notification is missing.
 
CURRENTLY THE MOST OPTIMIZED BUILD.

Requires:

1. Rename this at your OC\ CLOVER ACPI
Comment: _E4C to XE4C - To disable notification
Find: 5F453443
Replace: 58453443
2.
Add SSDT to ACPI folder. If Opencore - then don`t forget to inject them into Config
3. Add call to \_SB.PCI0.TWAK () to _WAK Method of your Rehabman xtra _zbG3s.aml SSDT. And External (_SB_.PCI0.TWAK, MethodObj) to acpi header
Screen Shot 2022-06-22 at 2.55.20 PM.png


**************
**************
**************
The bug is related to AC/DC PSU. If PSU is connected, then wake won't be working with thunderbolt enabled

So after some debugging: OSUP field unit object P2TB at battery power is 0x0000000, and on wake is same. But when on battery+PSU(AC) is 0xFFFFFFFFF after Wake. The OSUP will report Dev Gone if TB2P is 0xFFFFFFFFF. So that’s one of things that are responsible to problem. Will create a method to execute OSUP TB2P content. Maybe will get some additional information
 

Attachments

  • SSDT-TB3HP_vA.aml
    6.7 KB · Views: 35
Last edited:
Status
Not open for further replies.
Back
Top