Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

h9826790

macrumors P6
Apr 3, 2014
16,656
8,587
Hong Kong
If you're not a developer, how were you able to ask about the boot screens?! Who did you reach out to and what did you ask them?

Simply go to bugreport.apple.com to report the bug. In my experience, most reports will get Apple engineer's reply.
 

cdf

macrumors 68020
Jul 27, 2012
2,256
2,583
Just tried with my 5,1. Responsive caps lock, but no display. As expected, rEFInd can't find any graphics modes...

Code:
3:807  0:041  ConsoleControl ok
3:815  0:008  UgaDraw ok
3:823  0:008  GraphicsOutput ok
3:832  0:008  Available graphics modes for refit.conf screen_resolution:
3:840  0:008  Curr. Mode = 0, Modes = 0, FB = 0, FB size=0x0
3:848  0:008  SetMaxResolution: found best mode 0: 0x0
3:890  0:041   - already set

I also tried setting the modes manually in refind.config. For GOP, the modes are single valued, so I tried 3:

Code:
4:494  0:431  Error setting graphics mode 3 x 0; using default mode!
Available modes are:

Since rEFInd apparently tried to set this as a resolution, I tried 1024 x 768 instead:

Code:
4:584  0:470  Error setting graphics mode 1024 x 768; using default mode!
Available modes are:

Notice that in both cases, the list of available modes is blank. @DearthnVader do you think you could make available the source you are working on?
 
Last edited:

DearthnVader

Suspended
Original poster
Dec 17, 2015
2,207
6,392
Red Springs, NC
https://sourceforge.net/u/jief7/refind/ci/master/tree/

https://github.com/jief666/refind-edk2

Fallow the instructions in the readme from the second link, except step three should be:

Code:
$ cd RefindPkg
 $ git clone https://git.code.sf.net/u/jief7/refind u-jief7-refind

Requires Xcode7.2 and it's command line tools, you can install them up to High Sierra, but you'll need an Apple Dev account to download them. The free one is fine.

Also brew install nasm, and you will have to very carefully build mtoc with this link:

https://github.com/tianocore/tianocore.github.io/wiki/Xcode

Also, most of the relevant code is in:

https://sourceforge.net/u/jief7/refind/ci/master/tree/libeg/screen.c

Also this code maybe of some use, I think I built it before and used it in this thread to get a list of GOP modes in OVMF with a few cards ( RX580/GTX1050 ).

https://blog.fpmurphy.com/2015/05/check-available-text-and-graphics-modes-from-uefi-shell.html
 
Last edited:
  • Like
Reactions: Traace and cdf

abdyfranco

macrumors regular
Dec 4, 2017
127
121
Today I released a new beta of Next Loader, with some of the bugs reported fixed.
Some of the bugs fixed are:
- Unable to boot an NVMe SSD
- Next Loader crashes when loading drivers on a cMP 3,1
- Startup Manager freezes when choosing "More Options"
- CrScreenshotDxe has been removed, as it caused problems on MacBook Pro with retina display

It also includes some changes to the code in screen.c related to GOP initialization. I don't have a graphics card with GOP or an NVMe SSD to test the changes. If anyone wants to try the new beta, it would be a great help to continue with the improvement and development.

https://github.com/abdyfranco/next-loader/tree/master/build
 

two-mac-jack

macrumors member
Mar 25, 2016
38
17
@abdyfranco, can you give more specific instructions on how to do the testing, including any system requirements (like a minimum ROM version), and how to capture log data?

I have a 2010 cMP 5,1 (not a flashed 4,1) currently using the rEFInd boot loader, with an R9 280x GPU, and an NVME 960 EVO on a Lycom DT-120 card. The R9 280x is flashed for Mac boot screens, but I think if I flip the card's ROM switch to the other position it will behave as a standard PC card that supports GOP.

I noticed the "install.sh" script in the root folder, and reading through I saw that it prompts for a volume to wipe and install the bootloader on. This sounds something like what rEFInd does when installing on the EFI partition. So I wiped my NVME drive, and created two partitions: one for the bootloader, and the other for High Sierra. I cloned a High Sierra boot drive onto a "Boot" partition of the NVME, and called the other "UEFI". Then I ran your install script, told it to wipe the volume called "UEFI", and to become the primary bootloader. It ran without errors, although I did get prompted to install the Xcode command tools in order to run "SetFile" (or something like that). I let it download and install the tools, which succeeded, but the installer seemed to have finished by then. I shut down the computer, flipped the GPU's ROM switch to the PC position, and rebooted.

Unfortunately nothing ever happened -- after the chime, I waited a couple of minutes, but the monitor stayed black (no signal) and never came to life. I shut down, flipped the GPU's ROM switch to the Mac position, and restarted. Eventually I got a gray screen, and after about a minute got the icon of a blinking folder with a question mark -- I think that was the Mac EFI taking over and being unable to read the NVME drive. I couldn't find any log files.

Do I need a particular BootROM or macOS version? Do I need to inject my BootROM with code for NVME boot support? My cMP 5,1 is normally running El Capitan 10.11.6, and my BootROM is version 15G20015 -- with no NVME boot drive support. With El Capitan I use a version of the HackrNVMeFamily kext created by RehabMan's patch-nvme scripts, which lets me use NVME as a data drive but not a boot drive.
 

abdyfranco

macrumors regular
Dec 4, 2017
127
121
@abdyfranco, can you give more specific instructions on how to do the testing, including any system requirements (like a minimum ROM version), and how to capture log data?

I have a 2010 cMP 5,1 (not a flashed 4,1) currently using the rEFInd boot loader, with an R9 280x GPU, and an NVME 960 EVO on a Lycom DT-120 card. The R9 280x is flashed for Mac boot screens, but I think if I flip the card's ROM switch to the other position it will behave as a standard PC card that supports GOP.

I noticed the "install.sh" script in the root folder, and reading through I saw that it prompts for a volume to wipe and install the bootloader on. This sounds something like what rEFInd does when installing on the EFI partition. So I wiped my NVME drive, and created two partitions: one for the bootloader, and the other for High Sierra. I cloned a High Sierra boot drive onto a "Boot" partition of the NVME, and called the other "UEFI". Then I ran your install script, told it to wipe the volume called "UEFI", and to become the primary bootloader. It ran without errors, although I did get prompted to install the Xcode command tools in order to run "SetFile" (or something like that). I let it download and install the tools, which succeeded, but the installer seemed to have finished by then. I shut down the computer, flipped the GPU's ROM switch to the PC position, and rebooted.

Unfortunately nothing ever happened -- after the chime, I waited a couple of minutes, but the monitor stayed black (no signal) and never came to life. I shut down, flipped the GPU's ROM switch to the Mac position, and restarted. Eventually I got a gray screen, and after about a minute got the icon of a blinking folder with a question mark -- I think that was the Mac EFI taking over and being unable to read the NVME drive. I couldn't find any log files.

Do I need a particular BootROM or macOS version? Do I need to inject my BootROM with code for NVME boot support? My cMP 5,1 is normally running El Capitan 10.11.6, and my BootROM is version 15G20015 -- with no NVME boot drive support. With El Capitan I use a version of the HackrNVMeFamily kext created by RehabMan's patch-nvme scripts, which lets me use NVME as a data drive but not a boot drive.
Next Loader can boot NVMe drives without any firmware modification, but it cannot be installed on an NVMe drive itself. It must be installed on an AHCI drive or USB 2.0 drive. Although there is no specific Firmware requirement for Next Loader, it is recommended to use MP51.0084.B00 or higher.

Next Loader (inherited from rEFInd) does not generate any kind of log file, however I am already working on implementing a log registration system for a future version.

Try installing Next Loader on an AHCI drive, or a USB drive (connected to a USB 2.0 port) if you don't want to format or partition any of your Mac's internal drives.
 
  • Like
Reactions: MisterAndrew

two-mac-jack

macrumors member
Mar 25, 2016
38
17
I installed Next Loader to a partition on a clean USB drive connected to a front-panel USB 2.0 port.

I rebooted with the GPU still in "Mac" mode. After the chime, in about 3 seconds I got a gray screen, then about 5 seconds later I got a small red box at the bottom of the screen saying "hit any key to continue". I hit the spacebar and immediately saw some console output, captured with my phone:

console.jpeg


A couple of seconds later I got the boot menu screen:

bootmenu.jpeg


I selected the NVME drive and then it began the normal boot process, and soon enough I was in High Sierra:

hs.jpeg

Congratulations, booting from a NVME drive works great!!

Then I shut down the machine, flipped my GPU switch to "PC" mode, and restarted. Sadly the screen never came to life after waiting a couple of minutes. Unfortunately, I can't guarantee that my GPU's PC ROM is original, since I bought the card flashed for Mac. I noticed that the caps lock key was working, and I tried hitting the return and arrow keys in case I just couldn't see the output, but nothing happened. I could get an RX580 or some other "known good" GOP-capable card if that's what you need for testing. And I'm sure having some kind of logging mechanism would be helpful.
 
  • Like
Reactions: abdyfranco

abdyfranco

macrumors regular
Dec 4, 2017
127
121
I installed Next Loader to a partition on a clean USB drive connected to a front-panel USB 2.0 port.

I rebooted with the GPU still in "Mac" mode. After the chime, in about 3 seconds I got a gray screen, then about 5 seconds later I got a small red box at the bottom of the screen saying "hit any key to continue". I hit the spacebar and immediately saw some console output, captured with my phone:

View attachment 780589

A couple of seconds later I got the boot menu screen:

View attachment 780590

I selected the NVME drive and then it began the normal boot process, and soon enough I was in High Sierra:

View attachment 780591

Congratulations, booting from a NVME drive works great!!

Then I shut down the machine, flipped my GPU switch to "PC" mode, and restarted. Sadly the screen never came to life after waiting a couple of minutes. Unfortunately, I can't guarantee that my GPU's PC ROM is original, since I bought the card flashed for Mac. I noticed that the caps lock key was working, and I tried hitting the return and arrow keys in case I just couldn't see the output, but nothing happened. I could get an RX580 or some other "known good" GOP-capable card if that's what you need for testing. And I'm sure having some kind of logging mechanism would be helpful.
Thank you very much for your feedback. I see the NVMe boot is working completely well.


From what I read in other messages in this thread, Apparently the firmware performs a kind of verification of the GOP driver before loading it and if the card has been modified the driver is marked as invalid. It is possible that flashing the graphics card for Mac, altered that verification, But I'm not 100% sure.
 

Xanix

macrumors member
Oct 10, 2011
94
46
Thank you very much for your feedback. I see the NVMe boot is working completely well.


From what I read in other messages in this thread, Apparently the firmware performs a kind of verification of the GOP driver before loading it and if the card has been modified the driver is marked as invalid. It is possible that flashing the graphics card for Mac, altered that verification, But I'm not 100% sure.

Hi. Thank you for your work, to the community.

Mac Pro (2010) + Latest Firmware + AMD R9 NANO 4 GB (Pc) Factory Default

Bay 1 - HD - macOS High Sierra (GUID) HFS+
Bay 2 - HD - macOS Mojave Beta (GUID) HFS+
Bay 3 - HD - Windows 8.1 x64 (EFI) NTFS
Bay 4 - HD - Windows 10 x64 (EFI) NTFS

> Boot installed on USB 2.0 flash Drive...

No success; black screen on boot!

Kind regards,
Xanix
 

abdyfranco

macrumors regular
Dec 4, 2017
127
121
Hi. Thank you for your work, to the community.

Mac Pro (2010) + Latest Firmware + AMD R9 NANO 4 GB (Pc) Factory Default

Bay 1 - HD - macOS High Sierra (GUID) HFS+
Bay 2 - HD - macOS Mojave Beta (GUID) HFS+
Bay 3 - HD - Windows 8.1 x64 (EFI) NTFS
Bay 4 - HD - Windows 10 x64 (EFI) NTFS

> Boot installed on USB 2.0 flash Drive...

No success; black screen on boot!

Kind regards,
Xanix
cry.gif

Yesterday I was doing some tests with an EFI shell, and I think it can be very useful to debug and see why the GOP drivers of the graphics card are not being loaded. This would however require two graphics cards, one with Mac EFI and one with GOP.
 

DearthnVader

Suspended
Original poster
Dec 17, 2015
2,207
6,392
Red Springs, NC
cry.gif

Yesterday I was doing some tests with an EFI shell, and I think it can be very useful to debug and see why the GOP drivers of the graphics card are not being loaded. This would however require two graphics cards, one with Mac EFI and one with GOP.
So far, only works on the 3,1, tests with the 5,1 shows the GOP driver linked and loaded for AMD cards, but the Graphics Modes not being reported.

Some difference between the 5,1 firmware, but i can't say what. I don't know if anyone tested the 4,1 or an nVidia card in a 3,1. I'll get around to testing GOP in the 3,1 with nVidia one day.
 

Mr-Mur

macrumors member
Jul 4, 2018
50
25
Stratnge thing: earlier I tried the Next Loader with my iMac with GTX 780M card, but loader did not show GUI,
I have thought then that card does not support GOP and started searching for enabling GOP for it.

I found this topic: https://www.win-raid.com/t892f16-AMD-and-Nvidia-GOP-update-No-requests-DIY-41.html (you can notice my reports there)

And it turns out that my card HAD a GOP-support! But the Next Loader somehow were not able to recognize it!

So how can I read logs data, because loader is defintely loading at startup (USB drive's LED is flashing)?
 

watkipet

macrumors member
Aug 11, 2018
42
22
I compiled Jief_Machak's version of rEFInd, that should have support for initializing graphics cards that have a GOP rom on them. Pretty much any resent graphics card should work.

I have a Mac Pro 4,1 flashed to 5,1 an NVIDIA GT 120 and a Sapphire RX 580 Pulse which I'd like to test this on. However, there's something I don't understand:

UEFI and GOP specifically provide a pre-boot environment to notify you about POST errors, no disks found, etc. UEFI also provides post-boot services and lots of other things.

How does loading a new UEFI image on the drive help with displaying a boot screen? Isn't the boot screen displayed before the drives are even enumerated? Does blessing the EFI image copy it into some sort of drive-independent NVRAM?
 

h9826790

macrumors P6
Apr 3, 2014
16,656
8,587
Hong Kong
I have a Mac Pro 4,1 flashed to 5,1 an NVIDIA GT 120 and a Sapphire RX 580 Pulse which I'd like to test this on. However, there's something I don't understand:

UEFI and GOP specifically provide a pre-boot environment to notify you about POST errors, no disks found, etc. UEFI also provides post-boot services and lots of other things.

How does loading a new UEFI image on the drive help with displaying a boot screen? Isn't the boot screen displayed before the drives are even enumerated? Does blessing the EFI image copy it into some sort of drive-independent NVRAM?

http://www.uefi.org/sites/default/files/resources/UEFI_2.4.pdf

11.9:

The goal of this section is to replace the functionality that currently exists with VGA hardware and

its corresponding video BIOS. The Graphics Output Protocol is a software abstraction and its goal is

to support any foreseeable graphics hardware and not require VGA hardware, while at the same time

also lending itself to implementation on the current generation of VGA hardware.

Graphics output is important in the pre-boot space to support modern firmware features. These

features include the display of logos, the localization of output to any language, and setup and

configuration screens.

Graphics output may also be required as part of the startup of an operating system. There are

potentially times in modern operating systems prior to the loading of a high performance OS

graphics driver where access to graphics output device is required. The Graphics Output Protocol

supports this capability by providing the EFI OS loader access to a hardware frame buffer and

enough information to allow the OS to draw directly to the graphics output device.
 

abdyfranco

macrumors regular
Dec 4, 2017
127
121
I have a Mac Pro 4,1 flashed to 5,1 an NVIDIA GT 120 and a Sapphire RX 580 Pulse which I'd like to test this on. However, there's something I don't understand:

UEFI and GOP specifically provide a pre-boot environment to notify you about POST errors, no disks found, etc. UEFI also provides post-boot services and lots of other things.

How does loading a new UEFI image on the drive help with displaying a boot screen? Isn't the boot screen displayed before the drives are even enumerated? Does blessing the EFI image copy it into some sort of drive-independent NVRAM?
In a true UEFI environment, it happens just as you say, The GOP drivers of the card are loaded before anything else during the pre-boot phase.

But one of the special features of UEFI/EFI, is the ability to load and unload drivers and applications on the fly, so an application like rEFInd can manipulate the drivers and applications of the EFI environment to load new drivers and new code, This makes EFI extendable.

Thanks to the fact that EFI is extendable, there is a small possibility that by manipulating the EFI environment once loaded into the Mac Pro through an application, a UEFI GOP graphics card can be initialized.
 

watkipet

macrumors member
Aug 11, 2018
42
22
Thanks to the fact that EFI is extendable, there is a small possibility that by manipulating the EFI environment once loaded into the Mac Pro through an application, a UEFI GOP graphics card can be initialized.

The Graphics Output Protocol supports this capability by providing the EFI OS loader access to a hardware frame buffer and enough information to allow the OS to draw directly to the graphics output device.

Thanks for the clarification. I cloned the repo and put it on a USB thumb drive using build/install.sh. I'll start experimenting.
 
  • Like
Reactions: h9826790

watkipet

macrumors member
Aug 11, 2018
42
22
Here are my results with my MacPro4,1 flashed to a 5,1 with a Sapphire Radeon RX 580:

Before and after installing Next Loader, there's no boot screen. However, after installing Next Loader, my boot process got "stuck" on the black screen. I had to press return on the keyboard to continue booting. I presume this is because Next Loader is attempting to show me a boot picker UI and waiting for input--however, my GPU isn't displaying anything at this point so I don't see the screen. I also see the lights on my USB drive, onto which I installed Next Loader, flash near the start of the boot sequence.

I haven't modified the ROM on my RX 580, so unless there's something else going on with my machine, I don't think it's modified GPU ROMS that are keeping GOP display from working on MacPro4,1 machines flashed to 5,1.

Next, I'll try and squeeze my GT 120 card in the machine to see if there are any errors.
 

DearthnVader

Suspended
Original poster
Dec 17, 2015
2,207
6,392
Red Springs, NC
Here are my results with my MacPro4,1 flashed to a 5,1 with a Sapphire Radeon RX 580:

Before and after installing Next Loader, there's no boot screen. However, after installing Next Loader, my boot process got "stuck" on the black screen. I had to press return on the keyboard to continue booting. I presume this is because Next Loader is attempting to show me a boot picker UI and waiting for input--however, my GPU isn't displaying anything at this point so I don't see the screen. I also see the lights on my USB drive, onto which I installed Next Loader, flash near the start of the boot sequence.

I haven't modified the ROM on my RX 580, so unless there's something else going on with my machine, I don't think it's modified GPU ROMS that are keeping GOP display from working on MacPro4,1 machines flashed to 5,1.

Next, I'll try and squeeze my GT 120 card in the machine to see if there are any errors.

A 4,1 with a 5,1 firmware is effectively a 5,1, you'd have to revert to the 4,1 firmware to tell us anything new.
 

two-mac-jack

macrumors member
Mar 25, 2016
38
17
I presume this is because Next Loader is attempting to show me a boot picker UI and waiting for input

I just had the same experience with a unmodified GT 710. About 3 seconds after the chime there is disk activity, about 10 seconds later the caps lock key works, and then if you hit return twice it eventually boots to your default desktop. The first return keypress is for Next-Loader's "hit any key" screen, the second is for the boot picker screen to select the default drive.
 

bookemdano

macrumors 68000
Jul 29, 2011
1,514
846
A 4,1 with a 5,1 firmware is effectively a 5,1, you'd have to revert to the 4,1 firmware to tell us anything new.
I'm not sure anyone has been successful in reverting to 4,1 firmware. I recall a thread here a month or so ago wherein someone was trying and was ultimately unsuccessful. It would probably be possible if someone currently running 4,1 firmware would use ROMDump to dump their ROM and submit it to tsialex. But I'm not sure he's found anyone to do that yet. So if anyone sees this who hasn't yet flashed up to 5,1, please get PM tsialex before you do!
 

tsialex

Contributor
Jun 13, 2016
13,455
13,601
I'm not sure anyone has been successful in reverting to 4,1 firmware. I recall a thread here a month or so ago wherein someone was trying and was ultimately unsuccessful. It would probably be possible if someone currently running 4,1 firmware would use ROMDump to dump their ROM and submit it to tsialex. But I'm not sure he's found anyone to do that yet. So if anyone sees this who hasn't yet flashed up to 5,1, please get PM tsialex before you do!

It's easy to revert to 4,1 with a reconstructed BootROM or the original 4,1 dump, but you will have to use a Nehalem Xeon.

Btw, a 5,1 dump used to recreate a 4,1 BootROM will create a brick if not modified correctly. The jump points are different in the last sector of the BootROM.

The LBSN_BD sector has a jumping point at the end of it that differs from 4,1 to 5,1:

4,1:
Code:
BF5041EB 1D000000 00000000 00000000 FFFFFFFF FFFFFFFF
FFFFFFFF 6804FFFF 0F09E91B F3000000 78563412 0000FFFF
5,1:
Code:
BF5041EB 1D000000 00000000 00000000 FFFFFFFF FFFFFFFF
FFFFFFFF E802FFFF 0F09E9FB F2000000 78563412 0000FFFF
 
Last edited:
  • Like
Reactions: crjackson2134
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.