Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Status
The first post of this thread is a WikiPost and can be edited by anyone with the appropiate permissions. Your edits will be public.

bookemdano

macrumors 68000
Jul 29, 2011
1,514
846
Thanks for PM-ing me the files, I'll report the issue here, just in case it bites anybody else:

This is actually due to a bug in the very old (2007 copyright) version of efirom which you were using - it is treating filenames which start with / (i.e. filenames specified starting at root) as options (!) and then complaining it is an invalid option. (You can test it, e.g. efirom -d /foo/bar says Invalid option specified: -foo/bar.)

You can actually work round this, even with that version of efirom, by using the script's -t option, e.g. ./vBiosInsert.sh -t temp -a vega56.rom EnableGop.efi vega56Gop.rom will work. You can remove the temp dir and files afterwards.
Thanks! Never would have figured that out.

Maybe (hopefully?) someone knowledgeable would be willing to post somewhat concise instructions for building efirom (I assume it would not be kosher to bundle a precompiled version with the script and that's why it was not included?). I easily found the EDK2 github but there wasn't anything in the readme about building on macOS and the instructions I found online were for building the entire repo which seemed like overkill when we just need the one file.

Edit: Or, if someone just wants to attach a newer pre-compiled version here somewhere that could work too 😅

Anyway, I will proceed with your modified instructions and flash my Vega56 tomorrow sometime. I'll report back with the results.

Thanks again
 
Last edited:

Bmju

macrumors 6502a
Original poster
Dec 16, 2013
701
766
Thanks! Never would have figured that out.

Maybe (hopefully?) someone knowledgeable would be willing to post somewhat concise instructions for building efirom (I assume it would not be kosher to bundle a precompiled version with the script and that's why it was not included?). I easily found the EDK2 github but there wasn't anything in the readme about building on macOS and the instructions I found online were for building the entire repo which I seemed like overkill when we just need the one file.

Edit: Or, if someone just wants to attach a newer pre-compiled version here somewhere that could work too 😅

Anyway, I will proceed with your modified instructions and flash my Vega56 tomorrow sometime. I'll report back with the results.

Thanks again!
Should be able to include, or post, give me a short while.
 

Bmju

macrumors 6502a
Original poster
Dec 16, 2013
701
766
Thanks for PM-ing me the files, I'll report the issue here, just in case it bites anybody else:

This is actually due to a bug in the very old (2007 copyright) version of efirom which you were using - it is treating filenames which start with / (i.e. filenames specified starting at root) as options (!) and then complaining it is an invalid option. (You can test it, e.g. efirom -d /foo/bar says Invalid option specified: -foo/bar.)

You can actually work round this, even with that version of efirom, by using the script's -t option, e.g. ./vBiosInsert.sh -t temp -a vega56.rom EnableGop.efi vega56Gop.rom will work. You can remove the temp dir and files afterwards.
@bookemdano: I have just spotted that the very old version of efirom is actually not outputting the correct PCIE class code either: it should be adding 3 for 'Display Controller' as requested with the -l flag, but it is adding 0 for 'Device was built prior definition of the class code field'(!). I have tested on an AMD card here and it still works, so I believe it will work for you too - but I have added a recent version of EfiRom to the first post here, for yourself and others to use.
 
Last edited:

h9826790

macrumors P6
Apr 3, 2014
16,656
8,584
Hong Kong
I was thinking to try to flash the vBIOS with the updated script, and see if it then works without the artifacts and delayed drawing (only draws new update under the mousepointer - have to “paint” with it to see updated graphics). However, maybe not supported on the Radeon VII as I understand its vBIOS is encrypted..
Not sure if the modded ROM really can work, but the script seems can handle it without any problem.
Screenshot 2023-03-02 at 17.02.20.png
 
  • Like
Reactions: monoton

luckasa

macrumors newbie
Aug 4, 2012
19
12
I've finally compiled EfiRom from edk2. I attach here.
But I'm trying to use the vBiosInsert.sh in an AMD WX4130 rom, but it doesn't work...
Code:
./vBiosInsert.sh -a DellRX5602GB.ROM EnableGop.efi ROMwithGOP.rom
Auto-detecting GOP offset...
Compressing EFI using EfiRom...
Combining...
 - Not enough space within 128k limit - aborting!
 

Attachments

  • arxius_efi.zip
    62.6 KB · Views: 89

Bmju

macrumors 6502a
Original poster
Dec 16, 2013
701
766
I've finally compiled EfiRom from edk2. I attach here.
But I'm trying to use the vBiosInsert.sh in an AMD WX4130 rom, but it doesn't work...
Code:
./vBiosInsert.sh -a DellRX5602GB.ROM EnableGop.efi ROMwithGOP.rom
Auto-detecting GOP offset...
Compressing EFI using EfiRom...
Combining...
 - Not enough space within 128k limit - aborting!

I have just added a compiled copy of EfiRom to the first post, but thank you!

For your AMD issue, see the 'AMD' Spoiler section of the first post.
 

luckasa

macrumors newbie
Aug 4, 2012
19
12
I have just added a compiled copy of EfiRom to the first post, but thank you!

For your AMD issue, see the 'AMD' Spoiler section of the first post.
Thank you very much, but remove VGA section is so complex for me now.
 

Bmju

macrumors 6502a
Original poster
Dec 16, 2013
701
766
Thank you very much, but remove VGA section is so complex for me now.
Yes, it is complex! If you hunt through the links in the first page of the iMac thread, you should be able to find a ROM for your card with everything except EnableGop already done.
 

monoton

macrumors member
Aug 15, 2006
60
50
Oslo / Tokyo
I have tried both EnableGop.ffs and EnableGopDirect.ffs, both have the exact same behavior as in OpenCore when not enabling DirectGopRendring. This is on the Radeon VII as discussed previously.
Not yet tried to flash the GPU itself.

My hope is that this can work just like in OpenCore with DirectGopRendring=true.

Fantastic work, love having the bootscreen functionality back, makes the machine whole again!
 

Attachments

  • 420F69F6-61FF-497B-9DFC-EAE0F72E6E90.jpeg
    420F69F6-61FF-497B-9DFC-EAE0F72E6E90.jpeg
    1.3 MB · Views: 79
Last edited:
  • Like
Reactions: Bmju

zozomester

macrumors 6502
Apr 26, 2017
370
266
Hungary
Apart from the beta display, the problem for me is that the selection screen comes up with the ALT key, whatever I click, the machine freezes and turns off. However, if I don't click anywhere with the mouse, the machine boots normally.
 

Bmju

macrumors 6502a
Original poster
Dec 16, 2013
701
766
Not yet. I have some concern because it's a single ROM card, and I have no hardware flasher to fix it (if anything goes wrong)
Buy a USB CH341A - it's a bit of a knack getting the SOIC clip to attach to the pretty small NVRAM chips, suggest you buy some spare clips as you go through a few to get the hang of it! - and then you can read and write basically any ROM directly from another machine (or from the same machine with a different GPU), using flashrom. I prefer using it from Linux, but there is a macOS version.

And, I would say, do not flash experimental changes without one (and without having pulled a backup of your vBIOS first)!

Btw, file formats produced by flashrom, nvflash, amdvbflash are interchangeable - it's just the raw flash data in all cases. (Although nvflash will only extract the used part of the ROM, so that file would need padding, ideally with FFFFFFFF to avoid wear (although 00000000 would work), if then flashing with flashrom.)

EDIT: Actually, I must add another top tip - after attaching SOIC clip, read the ROM twice and confirm the files are the same, with diff. For reading, that confirms the connection is stable and you have a valid backup. But also do this before writing, each time you reconnect, to be sure you have a stable connection before starting.
 
Last edited:

BrianRecchia

macrumors member
Jan 17, 2008
35
3
Wow, this is amazing! I didn't think I'd ever see the day… Thank you so much!

I can finally get rid of my GeForce GT120!
 

Bmju

macrumors 6502a
Original poster
Dec 16, 2013
701
766
always get a "permission denied" when i try to run the vBiosInsert script...🤷🏻‍♂️

It doesn't need any special permissions.

Make sure you do:

Code:
chmod +x vBiosInsert.sh
./vBiosInsert.sh

Also possibly it's marked as 'potentially a problem, simply because downloaded from the internet' by macOS. There are several ways to fix that, but one of the simplest is to navigate to it in Finder, CTRL+right click on it, select Open. Then confirm you want to open it. It will flash up and disappear. Then you can run it normally from the command line.
 
  • Like
Reactions: Henninges

bookemdano

macrumors 68000
Jul 29, 2011
1,514
846
Posting back as promised!

Thanks @Bmju for adding the EfiRom attachment in the first post. I went ahead and re-created the Gop VBIOS file for my card with that version, just in case there was any other weirdness stemming from using the older one.

The ROM created fine with no issues. I moved it over to my windows disk, fired up AMDVbflash and flashed it over. No issues flashing it.

Then came the reboot. Happy to report I got the native boot screen (and I do not have OpenCore, OCLP or any other third party bootloaders installed--it's a plain vanilla Mojave install). What a pleasure it is to see that again. EDIT: I should add that I am using a Vega 56 (reference design) and the 2nd DisplayPort port. I haven't yet tried the other DP ports or HDMI but will do that and report back if any of them don't work.

Two small issues:
On my 4K Dell P2715Q monitor, the graphics on the boot screen are stretched horizontally (see photo). I think this was previously reported by someone else and is because the bootscreen displays at a 4:3 resolution? Obviously it would be nice to see a normally proportioned Apple logo but I think I can suppress my OCD in this case since I don't reboot that often ;)

bootscreen1.jpg

Secondly, after that initial boot screen shows for a little bit, the screen gets some horizontal blue line glitches on it (see photo), then the monitor goes black for a couple seconds, after which the boot screen returns for a very brief moment (this time correctly rendered in 4K--see photo), then I get my normal login screen.

bootscreen2.jpg bootscreen3.jpg

Again, the glitchy screen isn't a big deal. It only shows up for a second or two before the OS loads, and it in no way affects the functionality of the boot screen, which is the most important thing anyway. I just thought I would mention it just to see if others see that as well, or if it's unique to my Vega 56 setup. Again I am booting Mojave. I'm planning to install OpenCore and get Monterey running soon-ish, so maybe the glitches will go away with the newer drivers in Monterey.

Thank you very much @Bmju! Really appreciate your work on this and sharing it with the community.
 
Last edited:
  • Like
Reactions: Bmju

Macschrauber

macrumors 68030
Dec 27, 2015
2,976
1,483
Germany
the glitches when the driver of the GPU takes over are perfectly normal for most of the GPUs. You just have not seen that because of the lack of the preboot graphics output ;-)
 
Last edited:
  • Like
Reactions: Bmju and bookemdano

bookemdano

macrumors 68000
Jul 29, 2011
1,514
846
the glitches when the driver of the GPU takes over is perfectly normal for most of the GPUs. You just have not seen that because of the lack of the preboot graphics output ;-)
Thanks for letting me know it's expected. You're 100% right--I haven't seen a bootscreen on my cMP since Mojave came out and I had to pull out my MVC-modded 750Ti.

I found the other post a page or two back where someone else saw the stretched graphics on the native bootscreen--looks like it is displaying at 1280x1024. Will all cards using this driver output at that resolution or is that determined by the card itself? I know I *shouldn't* care about this, but just more curious how it's determined which resolution to use. If no one knows, not a big deal.
 

Henninges

macrumors member
Sep 24, 2017
84
30
Helmstedt / Germany
It doesn't need any special permissions.

Make sure you do:

Code:
chmod +x vBiosInsert.sh
./vBiosInsert.sh
sorry for my stupidity...i have all the files in a folder named GOP and placed it on the desktop.
i open a terminal window, change to the folder which contain following files:

- EFIRom
- EnableGop.efi
- UefiRomExtract
- vBiosInsert.sh

at least, i placed the vbios ROM image inside the folder...

i run
Code:
jorghenninges@iHackPro ~ % cd desktop/gop
jorghenninges@iHackPro gop % ./vbiosinsert.sh -a gk107.rom enablegop.efi gk107gop.rom
EfiRom not available!
UEFIRomExtract not available!
jorghenninges@iHackPro gop %

what am i doing wrong?
 

MacNB2

macrumors 6502
Jul 21, 2021
310
238
I found the other post a page or two back where someone else saw the stretched graphics on the native bootscreen--looks like it is displaying at 1280x1024. Will all cards using this driver output at that resolution or is that determined by the card itself? I know I *shouldn't* care about this, but just more curious how it's determined which resolution to use. If no one knows, not a big deal.

That was me with the stretched graphics with the Nvidia GT 730.
Yes it was displaying at 1280x1024 on my Dell S2721QS 4K monitor.
Not all cards will display the boot screen at that stretched resolution as it's specific to that card (and the same for your nividia card).
My other 3 cards displayed at 16:9 ratio.

It's determined by the cards legacy VBIOS resolution. There's a table of default set of resolutions and in my GT 730 there are no resolutions that can display at 16:9 ratio. Looks like yours is the same.

It's also a function of the monitor. It too has a table of "native" resolutions that it can support. When they two cannot agree then they choose to default to the lowest common denominator.

As you say, not a big deal since there's now "something" very useful to see on the screen at boot if you don't have OpenCore.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.