Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EnableGOP in firmware causes MP5,1 startup to hang when Intel 905P Optane SSD is present #2417

Open
MacintoshKeyboardHacking opened this issue Jul 29, 2024 · 21 comments

Comments

@MacintoshKeyboardHacking
Copy link

MacintoshKeyboardHacking commented Jul 29, 2024

was originally titled: after I DXEinject EnableGop 1.4, my MacPro 5,1 won't boot if an Intel Optane PCIe SSD is installed

I have a real MP5,1 (fw 144) with the Sapphire RX580 GPU recommended by Apple. My storage is a fusion drive with a 240GB Intel Optane 905P PCIe SSD and a 7.68TB Intel SATA SSD. I run Catalina without OpenCore installed using boot-args="-no_compat_check" and everything works great. I have in the past (around 0.93) had OpenCore installed on an EFI partition and everything worked including the boot-picker.

I frequently jump into crazy test environments... ESX, Ubuntu, Windows, and thought EnableGOP in the firmware would make life a whole lot easier. Used Macschrauber's RomDump under HighSierra to dump and flash a DXEinject'd EnableGOP 1.4.

When the PCIe Optane card is in the system, regardless of slot, drives, presence or absence of other cards, reset nvram, hold key, etc., the Mac stops at a black screen (backlight enabled) right before the screen should turn gray.

If I pull the Intel 905 card everything works great, boot logo, picker, verbose boot, macOS HighSierra, Linux.

The SSD is running the latest Intel firmware.
The same hardware works fine in a PC, configured for Windows 10 UEFI and secure boot.
I have a 16x PCIe NVME adapter with some different Intel Optane SSDs, it doesn't cause a problem.

I followed a GOPupd8 procedure on the RX580, dumping the rom and replacing my old GOP with a newer (signed, 1.0.69?) version, but it didn't change the situation. GPUz under Windows still seems happy with everything.

If I flash back the stock firmware, everything works fine. I've been through all sorts of NVRAMreset, slot order, boot device settings, etc.

I've attached an ioreg -l with the machine booted normally into Catalina, what's my next step?

ioreg-l-905.txt

@mikebeaton
Copy link
Contributor

It could be an idea to ask on the EnableGop support thread, as there are people on there with experience of the many and varied hardware which can work on a MacPro.

It could be worth trying EnableGop 1.1 - the version bundled with the OpenCore 0.9.0 release files. You should start again and add this to a clean ROM file, to make sure you don't add both versions (which would make it unclear which one is running).

@mikebeaton
Copy link
Contributor

mikebeaton commented Jul 30, 2024

Also, if you still have the stock GT120 graphics card, it would be useful to know for sure whether the native picker, with no EnableGop involved, has problems when the Optane drive is present.

@MacintoshKeyboardHacking
Copy link
Author

MacintoshKeyboardHacking commented Jul 30, 2024

Here are the results. I wound up yanking the powercord between just about every step.

Under stock firmware with the Optane installed, both GT120 and HD5770 display the boot picker and verbose boot, and actually (OMFG) boot into a functional Catalina from the Fusion volume.

I set my startup volume to HighSierra (a separate SATA disk), and DXEinject'd the first EnableGOP from OC 0.89.
At poweron, all 3 cards - GT120, HD5770, and RX580 showed the verbose boot and I arrived at a HighSierra desktop with the Fusion drive mounted!
GT120 and HD5770 both, holding [option] at poweron now freeze at a gray screen when the Optane is installed.
RX580 holding [option], screen stays black.

I pulled the HighSierra drive to fallback to my Catalina install
GT120 and HD5770 now start at a gray screen and hang.
RX580 stops at a black screen, same as before.

Pull the Optane, boot-picker, logo, verbose-boot, it's all good with all cards.

In the "old days" I would have assumed an option ROM conflict and started cutting pins or traces to disable it, but I don't think things are that straightforward anymore. The good news is that I've found a path to boot (blessed HighSierra) without pulling the PCIe Optane; that was getting pretty annoying.

I'll dive into UEFItool to see what things look like under the hood, and stop by the support forum to discuss workarounds, but I think since the patch breaks existing functionality (boot picker on natively supported GPUs) it should at least be on the radar.

I'll keep an eye out for updates, a super-huge thanks to you and all the devs making this possible!
-k

@MacintoshKeyboardHacking MacintoshKeyboardHacking changed the title after I DXEinject EnableGop 1.4, my MacPro 5,1 won't boot if an Intel Optane PCIe SSD installed EnableGOP in firmware causes MP5,1 startup to hang when Intel 905P Optane SSD is present Jul 31, 2024
@mikebeaton
Copy link
Contributor

mikebeaton commented Jul 31, 2024

It seems as if the Optane driver is what is crashing things. My guess would be that ForgeUefiSupport is causing the driver to load then crash, when it otherwise wouldn't load.

I'm not sure we can do much about this, as ForgeUefiSupport is required for many GPUs to work. One could compile a version of EnableGop without ForgeUefiSupport, which would work for all the GPUs which don't require that, and might not hang with the Optane drive installed.

EDIT: If I'm right, then you won't have ever successfully booted from files in ESP on the Optane drive? Or equally, it's quite likely that if you boot to OpenCore with the ForgeUefiSupport config option set and also ReloadOptionRoms set, then it hangs when the Optane drive is present?

@mikebeaton
Copy link
Contributor

Issue is closed, but responses to closed issues are read in this tracker, so feel free to reply with updates if needed.

@MacintoshKeyboardHacking
Copy link
Author

MacintoshKeyboardHacking commented Aug 1, 2024

I didn't quite follow you above about 'ForgeUefiSupport', but I just installed OCLP to the EFI partition of the Optane NVME.
(I hand mount_msdos every other EFI part disk0s1, etc., and verified no files are present!)

I put both GT120 and RX580 in, used the native boot picker to set EFI boot as default.
With both cards in, I get the OCLP picker on GT120 followed by verbose boot. HighSierra works fine, Catalina panic'd all over the place, I saw coredumps in like 3 different modules.

Removed the GT120, now I get the OCLP picker on the RX580 and also verbose boot. HighSierra and Catalina both work fine. So it is at least possible... I'll keep playing, see if I can test those config options you mention.

@MacintoshKeyboardHacking
Copy link
Author

Just to clarify my last comment... stock firmware, I installed the 1.50 OCLP with all defaults except spoof board-ID of MacPro6,1. When I say things were working with GPUs installed, monitors on all installed GPUs were displaying. Also the RX580 was in slot1, the GT120 in slot2.

The way in which Catalina panics when the GT120 is installed (even without it having a monitor connected) is interesting to me. During sequential reboots, I saw different panics and coredumps in ACPI, NVME and apfs, which seemed odd. I can record more information if that would be useful.

I've attached the results of an lspci -v and -nvv for posterity.
lspcis-withoptane.txt

vid=8086&pid=3900
PCI 8086:2700:8086:3900
03:00.0 0108: 8086:2700 (prog-if 02 [NVM Express])
Subsystem: 8086:3900
Intel Corporation Optane SSD 900P Series
Intel Corporation 900P Series

@mikebeaton
Copy link
Contributor

mikebeaton commented Aug 1, 2024

The Catalina/GT 120 issue seems separate. Though again if you raised this in a relevant forum you might get further useful suggestions.

It does sound as if you've identified a real issue here - though it's such an edge case and so apparently unique, and Optane drives are so expensive (!), that I may not end up looking into it any time soon.

I am still wondering whether we have completely clearly established that the Optane drive's UEFI driver can ever load (e.g. you can navigate around a FAT or ESP partition on that drive, using UEFI Shell), when EnableGOP is not present. Or whether it still might be that EnableGOP is prompting the driver to load (and crash) when it otherwise never would (e.g. because EnableGop includes the ForgeUefiSupport code, which might prompt the driver to think it is in a supported environment, and so continue to load, and then crash, when it would otherwise abort loading).

@MacintoshKeyboardHacking
Copy link
Author

Maybe it will help to set the problem to music (lol)

I originally found this issue while making a youtube video called "how to flash EnableGOP to your firmware". Not seeing a clear path to resolution other than "buy a new SSD", I compiled a number of screen captures of startup output from macOS, linux and EFIshell into a chaotic montage.

I suspect "the answer" is in here, otherwise this is just shameless self promotion ;)
https://youtu.be/letXhPNrvyc

thanks!

@mikebeaton
Copy link
Contributor

Can you try injecting this version EnableGop_1.4-min.ffs ?

EnableGop_1.4-min.zip

Please inject from scratch into clean copy of your original ROM.

Questions would be:

  • With this version of EnableGop do you get the native boot picker on some/any of the cards you have?
    • Even if you do not get the native boot picker, it will still be useful to know:
  • With this version of EnableGop does it freeze when Optane is installed?

@mikebeaton mikebeaton reopened this Aug 16, 2024
@MacintoshKeyboardHacking
Copy link
Author

YES!!! I've rebooted at least 30 times, let me try to summarize

At no point does the presence or absense of the Optane seem to have any effect.
startup picker, verbose boot, and booting Catalina from the fusion volume are perfect with all cards.

regardless of the slot 1/2, when both the GT120 and RX580 are present, only the GT120 is started at boot - even without a monitor attached (I guess natively supported GPUs are preferred)
I can boot Catalina with any single card installed. I can not boot Catalina when the GT120 + RX580 both, it gets past the verbose boot to a solid grey screen and nothing else happens. Running both cards works fine in HighSierra
OpenCore is fine

However, the instant I select a Ubuntu EFI partition from the Apple picker, the mouse stops moving and nothing else hapens.

I'll try some Windows and ESXi installs a little later, but the EFI boot freeze is strange. I'm happy to do anything to help debug this if you want, and I'm fully willing to risk bricking things "for science" lol...

This functionality is pretty great! : )

@mikebeaton
Copy link
Contributor

Let me just 100% clarify what you said: this version of EnableGop works for you, gives you the native picker on all the cards you have, and does not cause any crash with your Optane drive? Just a yes/no to this question, if possible! ;)

Can you boot Ubuntu from the native picker without EnableGop present, on a GPU which supports the native picker natively? Yes/no, please!

regardless of the slot 1/2, when both the GT120 and RX580 are present, only the GT120 is started at boot - even without a monitor attached (I guess natively supported GPUs are preferred)

Is the above behaviour the same or different, with and without EnableGop? Same/different pls!

@mikebeaton
Copy link
Contributor

It might be easier to PM to go through the various combinations, and I've got another version of EnableGop I'd like you to try. Do you use Macrumors? I am Bmju on there.

@MacintoshKeyboardHacking
Copy link
Author

MacintoshKeyboardHacking commented Aug 19, 2024

Let me just 100% clarify what you said: this version of EnableGop works for you, gives you the native picker on all the cards you have, and does not cause any crash with your Optane drive? Just a yes/no to this question, if possible! ;)

YES

Can you boot Ubuntu from the native picker without EnableGop present, on a GPU which supports the native picker natively? Yes/no, please!

YES

regardless of the slot 1/2, when both the GT120 and RX580 are present, only the GT120 is started at boot - even without a monitor attached (I guess natively supported GPUs are preferred)

Is the above behaviour the same or different, with and without EnableGop? Same/different pls!

SAME, because without EnableGop the RX580 would never be started until the OS does it. I think this is just a design choice, I'll flash back to stock firmware and do some additional tests with two supported cards to clarify the behavior.

I'll get signed up at MR and PM you later today. Happy to help!

@MacintoshKeyboardHacking
Copy link
Author

wait, I only responded to the part you quoted and asked about. what matters is the 2nd part of my original statement:

I can boot Catalina with any single card installed. I can not boot Catalina when the GT120 + RX580 both, it gets past the verbose boot to a solid grey screen and nothing else happens.

DIFFERENT. But I agree this is strange, odd, possibly not related, probably not important. I tested this point several times because it seemed weird, but I'll test again with a different supported card (AMD HD5770 vs. GT120) and confirm that behavior.

@MacintoshKeyboardHacking
Copy link
Author

I confirmed the following firmware behavior with your EnableGop1.4-min above:

If 2 natively supported graphics cards are installed in slots 1+2, each with a monitor, the picker comes up on the slot1 display. If slot1 doesn't have a monitor connected, the picker comes up on the slot2 display.
If 1 native + 1 RX580 installed, the picker comes up on the native card if a monitor is attached, otherwise everything stays black and nothing happens.
with only the RX580, everything works as if it were natively supported.

with 2 natively supported graphics cards, catalina boots right up to the desktop.
with 1 RX580, catalina boots right up to the desktop.

with 1 natively supported + 1 RX580, catalina verbose boots then freezes right when the Apple + progress bar come up. The progress bar remains empty.

while flashing back to stock firmware to run more tests, I think I made a mistake by "shutting down properly" and corruped my NVRAM variables, because now the machine won't chime and when touching the power button it immediately turns off. I've ordered some SPI modules so it may be a couple days until I'm back in operation, but then I'll be able to hotswap SPI flash chips all day long so it'll be easy to try dangerous stuff.

Thanks again, I'll hit you up on MR when I get my board fixed

@mikebeaton
Copy link
Contributor

mikebeaton commented Aug 20, 2024

I confirmed the following firmware behavior with your EnableGop1.4-min above:

If 2 natively supported graphics cards are installed in slots 1+2, each with a monitor, the picker comes up on the slot1 display. If slot1 doesn't have a monitor connected, the picker comes up on the slot2 display. If 1 native + 1 RX580 installed, the picker comes up on the native card if a monitor is attached, otherwise everything stays black and nothing happens. with only the RX580, everything works as if it were natively supported.

with 2 natively supported graphics cards, catalina boots right up to the desktop. with 1 RX580, catalina boots right up to the desktop.

with 1 natively supported + 1 RX580, catalina verbose boots then freezes right when the Apple + progress bar come up. The progress bar remains empty.

while flashing back to stock firmware to run more tests, I think I made a mistake by "shutting down properly" and corruped my NVRAM variables, because now the machine won't chime and when touching the power button it immediately turns off. I've ordered some SPI modules so it may be a couple days until I'm back in operation, but then I'll be able to hotswap SPI flash chips all day long so it'll be easy to try dangerous stuff.

Thanks again, I'll hit you up on MR when I get my board fixed

Hi Thanks for the update.

Mostly the consensus on the MR threads seems to be that running the cMP5,1 with two GPUs is so poorly supported by Apple, that what EnableGop (or really anything else) does with two GPUs present is pretty irrelevant, it just needs to work as required with one. (Actually I'm not clear what if any described behaviour is 'worse' with EnableGop, but very much no promises to fix it, even if it does become clear, I'm afraid!)

You're the only person so far as I'm aware to have ever hit your main issue, with ForgeUefiSupport. It makes sense that it can happen, though. I will probably add the -min version of the driver to the precompiled ones in each release, for the very rare cases where this happens. (The -min version is not suitable for everyone unfortunately, as not including ForgeUefiSupport quite significantly reduces the number of supported GPUs.)

@mikebeaton
Copy link
Contributor

@MacintoshKeyboardHacking - Pls could you test this version of the driver too?

EnableGop_1.4-min2.zip

@MacintoshKeyboardHacking
Copy link
Author

EG14-min2, everything works. I get a functional picker, macOS verbose startup, and I can now EFI boot Ubuntu and also VMware ESXi!

Same issues as before when mixing new+old cards, Catalina won't finish booting. Probably safe to ignore that...

It works great! Thankyou so incredibly much!

@mikebeaton
Copy link
Contributor

EG14-min2, everything works. I get a functional picker, macOS verbose startup, and I can now EFI boot Ubuntu and also VMware ESXi!

Thank you for the additional testing. There is one part of the above which is unexpected: are you sure the success with EFI booting Ubuntu is due to using -min2 instead of -min?

-min2 disables ForgeUefiSupport, so that is definitely the problem with the Optane drive. And we need to ship a version without ForgeUefiSupport (either -min or -min2), as well as the normal version with it, to allow for this issue.

-min also disables GopBurstMode, as I thought it could be potentially problematic too. But after some early troubles with a very few non-standard GPUs, now fixed, it seems to be compatible with everything (GPUs and other hardware).

It seems very unlikely to me that GopBurstMode is affecting whether you can EFI boot Linux; even more so that adding GopBurstMode is required to make Linux work - could you double check, as to whether Ubuntu EFI boot really changes, between -min and -min2 versions, with no other changes going on?

@MacintoshKeyboardHacking
Copy link
Author

MacintoshKeyboardHacking commented Aug 23, 2024

I went back to the -min version and I can not reproduce the issue with the RX580. The Linux boot screen takes over about 6 seconds after I select EFI boot from the picker.

However...
I had done some of the testing using my GT120... and with either stock or -min2 firmware it is about the same, 6 seconds until you see Linux do something.
with the -min version, I measured over 30 seconds staring at a frozen screen so I was probably giving up too soon. I did 3 boots on each firmware, the times were consistent.

I've got a flash socket and a handful of chips now, so it's straightforward to switch firmwares : )
https://forums.macrumors.com/threads/macpro-spi-flash-compatible-chips.2434105/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants