[In progress] SSDT for Thunderbolt 3 Hotplug

Discussion in 'SSDT' started by LeleTuratti, Mar 27, 2018.

  1. LeleTuratti

    LeleTuratti

    Joined:
    Aug 17, 2017
    Messages:
    81
    Mobo:
    Z370 AORUS Ultra Gaming
    CPU:
    I7-8700K
    Graphics:
    GTX 970
    Mac:
    MacBook Pro
    Mobile Phone:
    iOS
    Mar 27, 2018 at 8:35 PM #1
    LeleTuratti

    LeleTuratti

    Joined:
    Aug 17, 2017
    Messages:
    81
    Mobo:
    Z370 AORUS Ultra Gaming
    CPU:
    I7-8700K
    Graphics:
    GTX 970
    Mac:
    MacBook Pro
    Mobile Phone:
    iOS
    With the help of my friend Matthew82 and after many attempts we have reached good results!

    More precisely:
    - Great news for Asus TunderboltEX users! With this card it seems that you can enable the hotplug!
    - Better stability for those using Gigabyte Alpine Ridge, but for now, no hotplug.

    It's a good result but the work is not finished and goes beyond my coding skills, much more!

    Everything starts from the attempt to adapt a SSDT for Asus to Gigabyte Alpine Ridge.
    To be precise, those using the Asus ThunderboltEX can go to step E.9.2.11 of this guide.

    Ok now let's move on to Gigabyte.
    ATTENTION: these SSDTs have been created ad hoc for my build and are not necessarily compatible with yours.

    Starting from the beginning ...
    The goal is to make the hotplug work for Gigabyte Alpine Ridge.
    The tests were performed with two chain-connected Thunderbolt devices (UAD Satellite and Apollo Twin), and this hardware:
    • Gigabyte Z370 Ultra Gaming
    • CPU i7 8700K
    • Gigabyte Gc-Alpine Ridge
    After several attempts these are the results:

    1) Here's what I see in my IOReg without SSDT.
    IOReg file
    No SSDT.png
    Test 1: No Hotplug. If I turn off a device (the last one in the chain), the others will also disconnect, or the UAD app may crash.
    Thunderbolt port 1 and 2 of my Alpine Ridge work the same way.


    2) Here's what changes in my IOReg instead, by inserting the SSDT A:
    IOReg file
    SSDT A.png
    Test 2: No Hotplug. If I connect to port 1 and turn off one device (the last one in the chain), the others continue to work, the UAD app works normally.
    If I use port 2 it happens like in test 1 (without SSDT).


    3) This is my IOReg if I use SSDT B:
    IOReg file
    SSDT B.png
    Test 3: No Hotplug. If I turn off one device (the last one in the chain), the others continue to work, the UAD app works normally.
    Thunderbolt port 1 and 2 of my Alpine Ridge work the same way.


    4) An attempt was made by modifying the config.plist file, and entering the values in Devices/Arbitrary.
    Here's what IOReg shows (without SSDT, only Config.plist)
    IOReg file
    Config_plist.png
    Test 4: No Hotplug. If I turn off one device (the last one in the chain), the others continue to work, but the UAD app begins to make "whims".
    The sum of modified Config.plist and an SSDT of these causes the sudden shutdown of the computer if I turn off or turn on a thunderbolt device.

    Now I'm using the "SSDT B" and I noticed that when I wake up the computer from sleep, the devices reconnect correctly!

    Unfortunately in none of these tests the hotplug works, but I think we are on the right way to enable this feature.
    Probably some mistakes have been made, or something has been overlooked.

    Any idea? I'm available for testing.


    ADDITIONAL HELPFUL INFORMATION - 05/04/2018
     
    Allan Oliveira, trio21, nmano and 2 others like this.

    Attached Files:

    Last edited: Apr 9, 2018
  2. canyondust

    canyondust

    Joined:
    May 31, 2016
    Messages:
    405
    Mobo:
    Z170X-UD5 TH
    CPU:
    6700K
    Graphics:
    GTX1080 (Asus ROG Strix)
    Mac:
    iMac, MacBook, MacBook Pro, Mac mini
    Classic Mac:
    PowerBook, Quadra
    Mobile Phone:
    iOS
    Mar 27, 2018 at 10:40 PM #2
    canyondust

    canyondust

    Joined:
    May 31, 2016
    Messages:
    405
    Mobo:
    Z170X-UD5 TH
    CPU:
    6700K
    Graphics:
    GTX1080 (Asus ROG Strix)
    Mac:
    iMac, MacBook, MacBook Pro, Mac mini
    Classic Mac:
    PowerBook, Quadra
    Mobile Phone:
    iOS
    Great work!
    I'll test this on my Z170 (which also has TB3 at RP05/IOPP/PXSX/) and let you know how it goes.
     
  3. canyondust

    canyondust

    Joined:
    May 31, 2016
    Messages:
    405
    Mobo:
    Z170X-UD5 TH
    CPU:
    6700K
    Graphics:
    GTX1080 (Asus ROG Strix)
    Mac:
    iMac, MacBook, MacBook Pro, Mac mini
    Classic Mac:
    PowerBook, Quadra
    Mobile Phone:
    iOS
    Mar 28, 2018 at 2:11 PM #3
    canyondust

    canyondust

    Joined:
    May 31, 2016
    Messages:
    405
    Mobo:
    Z170X-UD5 TH
    CPU:
    6700K
    Graphics:
    GTX1080 (Asus ROG Strix)
    Mac:
    iMac, MacBook, MacBook Pro, Mac mini
    Classic Mac:
    PowerBook, Quadra
    Mobile Phone:
    iOS
    Here's my system (17,1 SMBIOS) with SSDT-B vs real iMac (17,1)
    Hopefully this information is useful
    Hack17_1.jpg
    Real17_1.jpg

    Furthermore: with SSDT-B, Devices show up if plugged in before boot (as before), but the system recognizes when they've been disconnected, but not reattached. (First time this has happened) so that's good progress. 1/2 way there! :)
     
    ssprod and LeleTuratti like this.
    Last edited: Mar 28, 2018
  4. canyondust

    canyondust

    Joined:
    May 31, 2016
    Messages:
    405
    Mobo:
    Z170X-UD5 TH
    CPU:
    6700K
    Graphics:
    GTX1080 (Asus ROG Strix)
    Mac:
    iMac, MacBook, MacBook Pro, Mac mini
    Classic Mac:
    PowerBook, Quadra
    Mobile Phone:
    iOS
    Mar 29, 2018 at 4:30 AM #4
    canyondust

    canyondust

    Joined:
    May 31, 2016
    Messages:
    405
    Mobo:
    Z170X-UD5 TH
    CPU:
    6700K
    Graphics:
    GTX1080 (Asus ROG Strix)
    Mac:
    iMac, MacBook, MacBook Pro, Mac mini
    Classic Mac:
    PowerBook, Quadra
    Mobile Phone:
    iOS
    had a closer look at the real iMac17,1 vs my Hack, and noticed there is a difference in IOPowermanagement>Capability Flags, and the NVMs are different (but that's probably true)

    RealData.jpg
    hackdata.jpg

    Not sure if that means anything (my test devices is a BlackMagic Decklink Minimonitor (TB to HDMI/HD-SDI output)
     
  5. LeleTuratti

    LeleTuratti

    Joined:
    Aug 17, 2017
    Messages:
    81
    Mobo:
    Z370 AORUS Ultra Gaming
    CPU:
    I7-8700K
    Graphics:
    GTX 970
    Mac:
    MacBook Pro
    Mobile Phone:
    iOS
    Mar 29, 2018 at 3:57 PM #5
    LeleTuratti

    LeleTuratti

    Joined:
    Aug 17, 2017
    Messages:
    81
    Mobo:
    Z370 AORUS Ultra Gaming
    CPU:
    I7-8700K
    Graphics:
    GTX 970
    Mac:
    MacBook Pro
    Mobile Phone:
    iOS
    I do not know your interface, but with the Thunderbolt devices I made comparisons with my MacBookPro9.1

    IOReg Z370 Gigabyte - Alpine Ridge with SSDT B: IOReg SSDT.zip
    IOReg MacBookPro9.1 with devices connected and turned on, then off and on again: MacBook Pro Device OFF-ON.zip

    In the Macbook you notice different voices like Thunderbolt Path and Thunderbolt Entry ID.

    Someone with good skills in SSDT would be very helpful! I do not know if @apfelnico can help us
     

    Attached Files:

  6. beelzebozo

    beelzebozo Super Moderator

    Joined:
    Mar 31, 2010
    Messages:
    3,726
    Mobo:
    Main Build: ASUS z170-Deluxe
    CPU:
    i7 - 6700K
    Graphics:
    GTX 1080
    Mac:
    MacBook Pro
    Classic Mac:
    Power Mac
    Mobile Phone:
    iOS
    Mar 29, 2018 at 4:28 PM #6
    beelzebozo

    beelzebozo Super Moderator

    Joined:
    Mar 31, 2010
    Messages:
    3,726
    Mobo:
    Main Build: ASUS z170-Deluxe
    CPU:
    i7 - 6700K
    Graphics:
    GTX 1080
    Mac:
    MacBook Pro
    Classic Mac:
    Power Mac
    Mobile Phone:
    iOS
    Can you attach iMac 17,1 ACPI tables if you don't mind in a zip file?
     
  7. canyondust

    canyondust

    Joined:
    May 31, 2016
    Messages:
    405
    Mobo:
    Z170X-UD5 TH
    CPU:
    6700K
    Graphics:
    GTX1080 (Asus ROG Strix)
    Mac:
    iMac, MacBook, MacBook Pro, Mac mini
    Classic Mac:
    PowerBook, Quadra
    Mobile Phone:
    iOS
    Mar 29, 2018 at 6:07 PM #7
    canyondust

    canyondust

    Joined:
    May 31, 2016
    Messages:
    405
    Mobo:
    Z170X-UD5 TH
    CPU:
    6700K
    Graphics:
    GTX1080 (Asus ROG Strix)
    Mac:
    iMac, MacBook, MacBook Pro, Mac mini
    Classic Mac:
    PowerBook, Quadra
    Mobile Phone:
    iOS
    Absolutely! Find them attached.
     
    beelzebozo likes this.

    Attached Files:

  8. Consigliere

    Consigliere

    Joined:
    Mar 28, 2011
    Messages:
    96
    Mobo:
    Aorus z370 Gaming 5
    CPU:
    8700K
    Graphics:
    Aorus RX580 8GB
    Mac:
    iMac, MacBook Pro
    Mar 29, 2018 at 11:00 PM #8
    Consigliere

    Consigliere

    Joined:
    Mar 28, 2011
    Messages:
    96
    Mobo:
    Aorus z370 Gaming 5
    CPU:
    8700K
    Graphics:
    Aorus RX580 8GB
    Mac:
    iMac, MacBook Pro
    Keep up the good work! So glad that people prioritise this a bit.
     
  9. buyjoey

    buyjoey

    Joined:
    Feb 9, 2012
    Messages:
    261
    Mobo:
    GA-Z370 Aorus Gaming 7
    CPU:
    i7 8700k
    Graphics:
    Vega 64 Liquid cool
    Mac:
    iMac, MacBook Pro
    Mobile Phone:
    iOS
    Mar 30, 2018 at 6:18 AM #9
    buyjoey

    buyjoey

    Joined:
    Feb 9, 2012
    Messages:
    261
    Mobo:
    GA-Z370 Aorus Gaming 7
    CPU:
    i7 8700k
    Graphics:
    Vega 64 Liquid cool
    Mac:
    iMac, MacBook Pro
    Mobile Phone:
    iOS
    Thank you!! hopefully working my Ultrafine 5k monitor after sleep.
     
  10. zipb

    zipb

    Joined:
    Aug 25, 2012
    Messages:
    487
    Mobo:
    Gigabyte Z170X-UD5-TH
    CPU:
    Intel i7 6700K
    Graphics:
    MSI AMD RX480/8GB
    Mac:
    MacBook Pro
    Classic Mac:
    Performa, Power Mac, PowerBook
    Mar 30, 2018 at 10:24 AM #10
    zipb

    zipb

    Joined:
    Aug 25, 2012
    Messages:
    487
    Mobo:
    Gigabyte Z170X-UD5-TH
    CPU:
    Intel i7 6700K
    Graphics:
    MSI AMD RX480/8GB
    Mac:
    MacBook Pro
    Classic Mac:
    Performa, Power Mac, PowerBook
    Great! Proper Thunderbolt behaviour is the final frontier on my Hack.
     

Share This Page