Kryptonite: TB1/2 Mac eGPU Support with FileVault, SIP, and ART Enabled
 
Notifications
Clear all

Kryptonite: TB1/2 Mac eGPU Support with FileVault, SIP, and ART Enabled  

 of  22
  RSS

ponqable
(@ponqable)
Active Member
Joined: 3 months ago
 

IMPORTANT BUG ALERT:

don't use the format option of the kryptonite installer for now!!!! it just erased a completely different partition on a different drive!

for details see: https://github.com/mayankk2308/kryptonite/issues/2

luckily it deleted "just" 200GB of downloads and i do have backups, but the damage could be immense!

fixed by now, details see below

2012 Mac Mini Server [3rd,4C,Q] + GTX 770 @ 10Gbps-TB1>TB3 (Sonnet Breakaway 550) + macOS 10.15.7 + Win10 (21H1)


ReplyQuote
mac_editor
(@mac_editor)
Famed Member Moderator
Joined: 4 years ago
 

@ponqable, can you show me the PCI section of System Info with eGPU connected and booted via Kryptonite?

The installer is disabled for now. I have been unable to reproduce the issue. Investigating.

 

Author: kryptonitepurge-wranglertbt-flashpurge-nvdaset-eGPU
Insights Into macOS Video Editing Performance

Master Threads:
2014 15-inch MacBook Pro 750M
2018 15-inch MacBook Pro

 
2019 13" MacBook Pro [8th,4C,U] + RX Vega 64 @ 32Gbps-TB3 (Mantiz Venus) + macOS 10.14.6 & Win10 [build link]  


ReplyQuote
ponqable
(@ponqable)
Active Member
Joined: 3 months ago
 
Screenshot 2021 06 13 at 14.45.40
Screenshot 2021 06 13 at 14.44.31

regarding format bug: Could you trace something wrong in my report? I'm currently booted into the system and as i appended to https://github.com/mayankk2308/kryptonite/issues/2, i can reproduce the error. so perhaps i could give you further info

2012 Mac Mini Server [3rd,4C,Q] + GTX 770 @ 10Gbps-TB1>TB3 (Sonnet Breakaway 550) + macOS 10.15.7 + Win10 (21H1)


ReplyQuote
mac_editor
(@mac_editor)
Famed Member Moderator
Joined: 4 years ago
 

@ponqable, I've fixed the bug, thanks. If you are willing to test, you can manually download the installer from Github and try. Thanks a bunch again.

Hmm, so looking at the PCI section, it's clear that the NVIDIA drivers don't want to load on your system. Have you tried booting with the eGPU vs. hot plug? Looking at the logs, all patches seem to have been successfully applied and the GTX 780 works for me on a 2018 and 2014 MBP.

 

Author: kryptonitepurge-wranglertbt-flashpurge-nvdaset-eGPU
Insights Into macOS Video Editing Performance

Master Threads:
2014 15-inch MacBook Pro 750M
2018 15-inch MacBook Pro

 
2019 13" MacBook Pro [8th,4C,U] + RX Vega 64 @ 32Gbps-TB3 (Mantiz Venus) + macOS 10.14.6 & Win10 [build link]  


ReplyQuote
ponqable
(@ponqable)
Active Member
Joined: 3 months ago
 

Every test was with egpu plugged in (1 monitor cable each to igpu and egpu). My (newbish) understanding is that this late 2012 mac mini (server) with tb1 does not really support hotplug. at least i wasn't able to successfully perform hotplug on macos. on windows the nvidia driver can connect / disconnect to the egpu while running, but when booting without the tb adapter attached it is not able to detect the egpu. i'll test a little bit longer with reconnecting and logging in/out on macos

ok, i was wrong: hotplug does work! (i don't know, which strange things i did test some weaks ago that i came to this wrong conclusion, but i'm still quite new to the egpu topic and only got this one device to work with)

so finally kryptonite works on my system! but the boot procedure is quite a bit more complicated than using purge-wrangler (with which i didn't had to dis/reconnect anything for both os). now i have to boot unplugged, then plug egpu in, log out and in again and then everhything works!

@mac_editor, do you have any idea, why this is so different to the purge-wrangler solution?

2012 Mac Mini Server [3rd,4C,Q] + GTX 770 @ 10Gbps-TB1>TB3 (Sonnet Breakaway 550) + macOS 10.15.7 + Win10 (21H1)


PsyPryss liked
ReplyQuote
ponqable
(@ponqable)
Active Member
Joined: 3 months ago
 

regarding the format bug: current release seems to have fixed this issue (all-clear on my side)

2012 Mac Mini Server [3rd,4C,Q] + GTX 770 @ 10Gbps-TB1>TB3 (Sonnet Breakaway 550) + macOS 10.15.7 + Win10 (21H1)


ReplyQuote
mac_editor
(@mac_editor)
Famed Member Moderator
Joined: 4 years ago
 
Posted by: @ponqable

Every test was with egpu plugged in (1 monitor cable each to igpu and egpu). My (newbish) understanding is that this late 2012 mac mini (server) with tb1 does not really support hotplug. at least i wasn't able to successfully perform hotplug on macos. on windows the nvidia driver can connect / disconnect to the egpu while running, but when booting without the tb adapter attached it is not able to detect the egpu. i'll test a little bit longer with reconnecting and logging in/out on macos

ok, i was wrong: hotplug does work! (i don't know, which strange things i did test some weaks ago that i came to this wrong conclusion, but i'm still quite new to the egpu topic and only got this one device to work with)

so finally kryptonite works on my system! but the boot procedure is quite a bit more complicated than using purge-wrangler (with which i didn't had to dis/reconnect anything for both os). now i have to boot unplugged, then plug egpu in, log out and in again and then everhything works!

@mac_editor, do you have any idea, why this is so different to the purge-wrangler solution?

So the patches seem to be working correctly as per the logs. Interesting that it does not work when booting with the eGPU plugged in. On my system it does (I do have to disable the discrete NVIDIA GPU but that's a separate matter). Kryptonite works very differently to purge-wrangler even though they aim to accomplish the same thing. Patching in memory/RAM has far more to it than patching on disk (purge-wrangler does the latter). Patching on disk guarantees that the code being executed (in memory) is patched. Patching in memory can sometimes be pointless if the code has already executed. So there might be a possibility that when you boot with the eGPU plugged in, the patch hasn't taken place and thus non-patched code is executed. Yet, I would expect similar behavior on my system. So yeah, I'm baffled here.

Author: kryptonitepurge-wranglertbt-flashpurge-nvdaset-eGPU
Insights Into macOS Video Editing Performance

Master Threads:
2014 15-inch MacBook Pro 750M
2018 15-inch MacBook Pro

 
2019 13" MacBook Pro [8th,4C,U] + RX Vega 64 @ 32Gbps-TB3 (Mantiz Venus) + macOS 10.14.6 & Win10 [build link]  


ReplyQuote
mac_editor
(@mac_editor)
Famed Member Moderator
Joined: 4 years ago
 

@ponqable I tested on the 2018 MBP on Monterey just now and that seemed to work for both cases too. Can you try again with the eGPU plugged in?

This time, if the eGPU doesn't work (Drivers installed says "No" in PCI section), try manually loading the NVIDIA drivers:

[Please login to see this]

After each load, refresh system information window (CMD+R) and see if eGPU has been activated in PCI and Graphics sections.

Monterey 780 2018 MBP

Author: kryptonitepurge-wranglertbt-flashpurge-nvdaset-eGPU
Insights Into macOS Video Editing Performance

Master Threads:
2014 15-inch MacBook Pro 750M
2018 15-inch MacBook Pro

 
2019 13" MacBook Pro [8th,4C,U] + RX Vega 64 @ 32Gbps-TB3 (Mantiz Venus) + macOS 10.14.6 & Win10 [build link]  


ReplyQuote
ponqable
(@ponqable)
Active Member
Joined: 3 months ago
 
Posted by: @mac_editor

Patching in memory/RAM has far more to it than patching on disk

Phui!! This is pretty advanced stuff! I know this because I worked a few years for a company that developes special banking software, that heavily relies on hooking loadfunctions for dynlibs (i.e. dlls on windows) and even blacklist / reload most of them in order to throw out potential insecure code injections from other installed software. as this alone is not stable in most situations and let to race conditions on software startup, further techniques were involnved like suspending all other threads as early as possible to perform the memory patches as clean as possible. but doing this in kernel space at system boot up is absolutely out of my experience. are the kexts loaded sequentially, i.e. in one process? if so, can you determine at which 'position' the LiLu (kryptonite) kext is applied? maybe there is something like a kext-dependency-mechanism to tell the kernel, that loading the nvidia kexts depends on earlier loading of LiLu (kryptonite) or something? but i'm just guessing, my macos development skills are quite limited..

Posted by: @mac_editor

After each load, refresh system information window (CMD+R) and see if eGPU has been activated in PCI and Graphics sections.

unfortunatly that changed nothing. i did refresh after each line, but without any signs of reloading action (when replugging tb-cable, the monitor briefly blinks). even did log out and in again, but system report still shows No in Driver Installed Column. Looking inside /System/Library/Extensions there are quite a few other similar sounding extensions. Could it be, that they just differ between our gpu models?

[Please login to see this]

but kextload-ing them again didn't change anything either...

2012 Mac Mini Server [3rd,4C,Q] + GTX 770 @ 10Gbps-TB1>TB3 (Sonnet Breakaway 550) + macOS 10.15.7 + Win10 (21H1)


ReplyQuote
mac_editor
(@mac_editor)
Famed Member Moderator
Joined: 4 years ago
 
Posted by: @ponqable

if so, can you determine at which 'position' the LiLu ( kryptonite ) kext is applied?

This is somewhat tricky, but kernel caches play a role and macOS Big Sur some significant changes on how things are loaded - although that does not apply to your setup since you are using Catalina. Kexts can declare dependencies in their Info.plist (you can see Kryptonite declaring dependence on Lilu, for example) so to declare a dependency on Lilu/Kryptonite in NVIDIA kexts would require manually injecting them I suppose (but this is tricky itself if you already have kexts residing on disk). The reason I'm using OpenCore is to inject kexts early in the boot process instead of letting the kernel handle it. This is essentially required for Big Sur, but on Catalina and older, you can actually use the kexts w/o OpenCore and it should still work (SIP with kext and NVRAM protections need to be disabled). The Lilu + Kryptonite kexts can be placed /Library/Extensions/ (make sure to fix permissions on the kexts) and I've still had success w/o OpenCore and 10.15 and older. You can try this.

Additionally, for OpenCore, try setting DisableLinkeditJettison to false and try.

The 770 and 780 should use the same exact driver afaik. I actually have a 770 I think, it's chilling at another friend's home I think. Perhaps it's time for me to call in and get it :p 

Author: kryptonitepurge-wranglertbt-flashpurge-nvdaset-eGPU
Insights Into macOS Video Editing Performance

Master Threads:
2014 15-inch MacBook Pro 750M
2018 15-inch MacBook Pro

 
2019 13" MacBook Pro [8th,4C,U] + RX Vega 64 @ 32Gbps-TB3 (Mantiz Venus) + macOS 10.14.6 & Win10 [build link]  


PsyPryss liked
ReplyQuote
 of  22