apple_set_os.efi icon indicating copy to clipboard operation
apple_set_os.efi copied to clipboard

Not working on 10.15

Open Baytwt opened this issue 5 years ago • 28 comments

Baytwt avatar Oct 13 '19 07:10 Baytwt

Can you be a bit more specific? This runs before any operating system, and it doesn't apply to running mac os, so i'm a bit confused what 10.15 has to do with it.

ah- avatar Oct 13 '19 16:10 ah-

Sorry I didn’t add details to it… It shows like this, after I enter the reEFInd page and select the apple_set_os.efi option.

In 10.14, upon selecting this option it would return to reEFInd page. Now it’ll stay here.

IMG_8145

Baytwt avatar Oct 13 '19 17:10 Baytwt

I'm using this .efi to run eGPU on Boot Camp with Macbook pro. The procedure is to load EFI(in macOS), reboot with eGPU plugged, enter the rEFInd page, select the apple_set_os.efi, then enter Windows. I dont know how it works, maybe it enable the internal GPU when booting into bootcamp Windows.

Baytwt avatar Oct 13 '19 17:10 Baytwt

Ah, I guess 10.15 also updated the EFI then?

Can you try building apple_set_os.efi with https://github.com/0xbb/apple_set_os.efi/blob/master/apple_set_os.c#L12 changed to #define APPLE_SET_OS_VERSION "Mac OS X 10.15" or something like that?

ah- avatar Oct 13 '19 17:10 ah-

Ah thanks! But how should I turn it into .efi file?

Baytwt avatar Oct 13 '19 17:10 Baytwt

Try the docker build method: https://github.com/0xbb/apple_set_os.efi#build-via-docker

ah- avatar Oct 13 '19 17:10 ah-

Or try this: apple_set_os.zip

Warning: Completely untested :D

ah- avatar Oct 13 '19 17:10 ah-

@ah- I gave that one a shot and got the same result. @Baytwt, did you figure something out for Catalina? I could try the docker build, but if the one you posted reflects that same change you suggested I'm not sure what else to try. Is there some methodology I can pursue to figure out what the OS version string ought to be?

timfitzzz avatar Nov 10 '19 23:11 timfitzzz

I sadly really don't remember how I originally figured out the string, I think it was via looking at the Mac kernel image. Or at the efi binaries. Either way it'd be running strings on these.

Or before doing that maybe go the easy route and simply try the obvious options, like "Mac OS 10.15" since they rebranded, or also 10.14, or "macOS 10.15".

ah- avatar Nov 10 '19 23:11 ah-

@ah- I gave that one a shot and got the same result. @Baytwt, did you figure something out for Catalina? I could try the docker build, but if the one you posted reflects that same change you suggested I'm not sure what else to try. Is there some methodology I can pursue to figure out what the OS version string ought to be?

Seems it doesnt matter whether the OSversion is 10.9/10.15... The same yellow ERROR appears as well using the 10.15 version efi. I solved my problem by, probably, plugging the eGPU into a fixed one Thunderbolt port.

Baytwt avatar Nov 11 '19 07:11 Baytwt

If it doesn't well, I'll boot into BootCamp without eGPU ,then plug in and reboot ... or try plug into another Thunderbolt port. Sometimes succeed in one try, sometimes it'll take long. Good luck.

Baytwt avatar Nov 11 '19 07:11 Baytwt

So last night after writing this post I tried again, and it worked. Windows booted in its optimal state. Then I made the mistake of closing the lid on my MBP and the thing went to sleep and wouldn't wake up.

And then the next time I tried it, it didn't work. I discovered that it works randomly on rebooting. But then Windows, as has been a thing, wouldn't finish booting -- that too works on some boots and not others. Non-determinatisticness is a strange thing in tech, and yet for some reason it's been really endemic to my eGPU experience with my Mac. It's weird, and frustrating.

I'll try compiling with those obvious options this weekend and see if it makes a difference, thank-you to you both!

timfitzzz avatar Nov 12 '19 06:11 timfitzzz

So I had a look today, and for me (MBP 13,3, Catalina) #define APPLE_SET_OS_VERSION "Mac OS X 10.15" just works: IMG_20191122_014527

Could you maybe try this? apple_set_os.zip

And post the output? @YijieDeng @diceytroop And maybe running it via an EFI shell, e.g. https://github.com/tianocore/edk2/releases/download/edk2-stable201908/ShellBinPkg.zip

If it doesn't work, what hardware you have?

For the record, on OSX this is called by /System/Library/CoreServices/boot.efi, you can see Apple Inc. and Mac OS X 10.15 in there.

You can find the corresponding UEFI module by dumping your firmware with sudo /usr/libexec/firmwarecheckers/eficheck/eficheck --save -b firmware.bin, extracting it with UEFIExtract from https://github.com/LongSoft/UEFITool/releases via ./UEFIExtract firmware.bin, and then looking at ./3 BIOS region/2 B116D52B-E69F-4352-B657-790ECD7F28EB/2 2AD3DE79-63E9-9B4F-B64F-E7C6181B0CEC/1 EE4E5898-3914-4259-9D6E-DC7BD79403CF/1 Volume image section/0 A881D567-6CB0-4EEE-8435-2E72D33E45B5/115 EfiOSInfo/0 PE32 image section/body.bin.

ah- avatar Nov 22 '19 01:11 ah-

Hi, UEFI firmware dump failed prompting ReadBinaryFromKernel: No matching services found. Either this system is not supported by eficheck, or you need to re-load the kext. And I'm using OS X 10.15.1.

The apps_set_os you provided worked for once only, and I get the same error as

IMG_8145 except return code is different. I am running a MacBook Pro 16. Windows recognizes iGPU with that success run and intel graphics driver installed correctly, except I couldn't check if it runs since it is idle all the time. Thanks!

YijieDeng avatar Nov 22 '19 03:11 YijieDeng

Hmm, I'm not sure then, I can just run it multiple times. Maybe something changed on newer macbooks.

It's weird that you can run it once, I wonder why. Maybe you can run it again if you reset nvram with option-cmd-p-r? Or maybe it works again after shutting down completely, or after booting osx?

If I had to guess I'd suspect it expects you to also call some other EFI services that we don't, and that's why it works once but not after. Hard to debug though since it doesn't happen for me.

ah- avatar Nov 22 '19 10:11 ah-

@ah- @Baytwt Unfortunately, I've got the same problem. Is there any idea? My EGPU failed with error 12 in bootcamp after I updated MacOS to 10.15.1.

ronnieyuyiwei avatar Nov 27 '19 06:11 ronnieyuyiwei

@ronnieyuyiwei I can't really debug this since it doesn't happen on my laptop and I don't have access to anything else. But if you want to help maybe try the suggestions one post above, maybe you can figure out why it seems to work but only once.

ah- avatar Nov 27 '19 20:11 ah-

Hi! I'm not a very good developer and I would like to dual boot my computer (MacBook Pro Catalina 10.15.1) installing Ubuntu 16.04; however everytime I boot the computer rEFInd crashes. Is someone so kind to link me a good tutorial? Thanks you! 😅

ghost avatar Dec 02 '19 20:12 ghost

same here, it worked for the first time, and it can directly boot from an USB sticker, but after rebooted, the option just gone. Then I used reEFInd showed the same error that “Could not set version”.

My hardware is MacBook Pro 16” late 2019

shallwey87 avatar Dec 09 '19 07:12 shallwey87

I found that if you startup at the first time , it fails, but after you shut down the MacBook in reEFInd then restart, it works…

shallwey87 avatar Dec 10 '19 02:12 shallwey87

Hello guys, I created an efi based on this project which solved this issue: https://egpu.io/forums/pc-setup/macbook-pro-16-windows-egpu-error-12-fix/

aa15032261 avatar Dec 26 '19 11:12 aa15032261

Nice, that's quite a workaround. I'm impressed it works :D

ah- avatar Dec 26 '19 20:12 ah-

Just to report back, I've found that this version you posted above on 11/21 works well enough for my purposes. Which means that it works with a little bit of persistence (: Sometimes it takes a few restarts before it finishes, but when it does, I can successfully boot Windows about 75% of the time. This feels more regular than before. (So the apple_set_os.efi bit is still less reliable than it used to be, where it ran successfully every time, but the Windows boot process seems more successful, so it more or less evens out in the end.)

Now if only I could just figure out how to get refind to show up when I hit the option key so that I can make Mac OS the default boot disk with refind just a secondary option :D (If my external HD w/ Windows partition is connected to my eGPU, the option key only offers to let me boot it directly, so refind has to be the default for me to access it)

timfitzzz avatar Jan 03 '20 20:01 timfitzzz

Just to report back, I've found that this version you posted above on 11/21 works well enough for my purposes. Which means that it works with a little bit of persistence (: Sometimes it takes a few restarts before it finishes, but when it does, I can successfully boot Windows about 75% of the time. This feels more regular than before. (So the apple_set_os.efi bit is still less reliable than it used to be, where it ran successfully every time, but the Windows boot process seems more successful, so it more or less evens out in the end.)

Now if only I could just figure out how to get refind to show up when I hit the option key so that I can make Mac OS the default boot disk with refind just a secondary option :D (If my external HD w/ Windows partition is connected to my eGPU, the option key only offers to let me boot it directly, so refind has to be the default for me to access it)

You should try this: https://egpu.io/forums/pc-setup/macbook-pro-16-windows-egpu-error-12-fix/

I have fixed this issue.

aa15032261 avatar Jan 04 '20 12:01 aa15032261

I have an Early 2013 MacBook Pro ( MacBookPro10,1 ) with the Mac OS 10.15.5. When I run the above apple_set_os.efi from refind it successfully runs, but then freezes requiring me to force off the laptop.

The linked bootx64.efi (from egpu.io) just continuously reboots when I try using it.

I'd love to get this working so I can use my Intel GPU in Linux.

Blargh5000 avatar Jun 24 '20 23:06 Blargh5000

Hello, I also have an oldisch MBP (11,3) and I'm trying to get the iGPU activated and the dGPU off. I am using refind with the spoof_osx_version setting to either 10.9 or 10.3, which AFAIK should use the apple_set_os script.
When I set to use iGPU with gpu_switch or gfxcardstatus, on next reboot after grub the screen stays black. On the OSX-side, the laptop was updated to Catalina and the firmware is indeed up-to-date (june 2020). I read that recent firmware break this hack. => is there any chance that this can be fixed? I use mainly Linux and I'd love to have control over my laptop and get energy consumption sane.

Thanks a lot

ib84 avatar Sep 28 '20 07:09 ib84

Not to dredge up old threads, but does Big Sur require some changes to this file for it to work? After updating to Big Sur beta, my AMD eGPU gets a code 12 now no matter what fix I try (and have had my AMD eGPU successfully working in Catalina 10.15.6 prior to upgrading to Big Sur. I have since completely erased my entire SSD on my 2019 16" MBP w/5500m and installed Catalina via internet recovery - I still cannot get my eGPU to work again, even after restoring from a backup with winclone 8, as well as a fresh install of the same ISO file of windows I had it working previously with on Catalina 10.15.6. So either something in .7 changed or Big Sur updated some firmware or such and it won't let me roll back by simply deleting the SSD contents... I've tried clearing SMC and NVRam as well. Thoughts?

gleep52 avatar Sep 29 '20 02:09 gleep52

I have a MacBook Pro 2015 15-inch 11,5 with EFI 199.0.0.0.0 and my eGPU no longer gets detected in any macOS nor Windows.

ccfman2004 avatar Nov 11 '20 22:11 ccfman2004