PIXLAS Adventures - Chapter 4
With extra power taps, it is time to solve a compatibility problem. How to get a Snow Leopard graphics card to live with a modern one, allowing boot into Snow Leopard and any later OS. Especially Mojave and Monterey. Without switching cards and wearing out slots.
Snow Leopard (with my old games) is happy to boot with both cards present. It mostly ignores the modern card. It may use an attached monitor with software rendering if the modern card has Mac firmware (or OpenCore provides GOP injection). Both cards can be present through High Sierra.
But Mojave and later will not boot if there is both a Metal and non-Metal card installed. And no Metal card has drivers in Snow Leopard. Until recently, that was the end of the story. Swap one or both cards every time you boot back or forward.
OpenCore has changed that.
Later CPUs offer hardware virtualization. At least since 2009, and perhaps earlier. This was originally for servers, but over time the feature migrated down to regular CPU chips.
If you buy server time (like your own website), the data center will rarely give you a dedicated computer. Maybe, if you pay enough. More likely, there will be 50+ sites hosted on a single real machine. The machine boots a virtualizer (often called a Hypervisor or VMM
) which then launches 50+ simulated machines. Intel and AMD moved some of the VMM functions into hardware, so there was almost no speed penalty to running within a virtual machine.
This doesn't do much for the average user, unless you are running a guest OS like Windows from within macOS. However, it started getting used in the Hackintosh community. Use the VMM functions to smooth over the differences between their PC and a real Mac. So macOS launches and sees the usual hardware. Behind the scenes, the VMM translates driver calls etc, between what macOS sees, and the actual incompatible hardware on the PC side.
The most popular implementation for this became the OpenCore
bootloader. Then real Mac owners got interested. OpenCore can intercept and translate low-level graphics calls. ie - it can make a PC video card appear to have Mac firmware. Boot screens, a boot drive selector, etc. It could also enable later macOS features, by making supported hardware be present.
The Mac side of things has mostly evolved into OpenCore Legacy Patcher
, which is a polished Mac app to enable installation of Big Sur, Monterey, Ventura, and (later this year) Sonoma. On older Macs that have been dropped by macOS. Besides later OSes, it can still give boot screens to PC graphics cards.
Easy Option - Use an Old Graphics Card
Mojave and later can be patched to use the old non-Metal rendering path. So you use an old card compatible with Snow Leopard. If you are using a Mac made before 2011 and it isn't a Mac Pro, this is your only easy option.
I've tested this with a 2009 iMac with a Radeon HD 4850 GPU. It works great through High Sierra. Mojave is OK too. Big Sur not tested. Monterey had occasional visual imperfections, which went away after a logout-login. I should have used the default OpenCore patching options. Ventura graphics were fine.
The main drawback is old cards have poor performance in later OSes. SL games run great, while modern games may need settings turned down. But at least your older iMac gets a new lease on life, with a modern macOS version. And access to the App Store.
Note1: iMacs made 2009-2011 have OEM graphics cards called MXM cards. They can be changed in theory. But MXM cards were not sold retail - you'd have to grab one from a later Mac, or from a PC. This quickly turns into serious hacking, so we're not exploring that here.
Note2: Macs made from 2011 onwards include Thunderbolt ports. A Metal-compatible eGPU can be plugged in. However, this gets complicated too. A) Apple disabled eGPU use over Thunderbolt 1 and 2. Takes minor hacking to bypass. B) The built-in card will still be non-Metal, causing complications booting into Mojave or later.
Difficult Option - Use Old and New cards
My Mac Pro has PCIe slots, so I plugged in both a Radeon HD 5870 and a Radeon RX-580. Then explored if OpenCore could smooth over the Metal / non-Metal divide.
1) Boot as normal. No screens lit up, crash on boot. A few tries and it somehow screwed up the security checksums on the later OSes. I eventually had to reinstall Monterey and Ventura before they would boot again. The boot screens were being sent to the 5870 (until the crashes), and there was no monitor attached to the 5870 at the time.
2) Boot into High Sierra. Both cards are seen and have drivers. Recompile OpenCore Legacy Patcher, reinstall to disk. No difference. OCLP could see both cards, but didn't do anything special during installation. It does macOS driver patching after booting into an OS, but nothing special before that. Which does not help, as Mojave+ will not boot when both cards are present.
3) Remove the RX 580. Boot with only the HD 5870. Everything boots OK, though you get software rendering in Mojave and later. I could fix that using OLCP's "Post-Install Root Patch" option, which patches the OS in Big Sur and later. Use DosDude's patched installers to patch Mojave
for older GPUs. I didn't do the OS patches because they probably break Metal cards, and I want to use the RX-580 in the later OSes.
4) Plug in both cards, and use OpenCore to hide the HD 5870. This finally did what I wanted, but it required manual work. Finally, it's time for the pictures.
Make a non-Metal graphics card invisible
This option has not been picked up on the Mac side yet. It's used by the Hackintosh
people to hide an unsupported graphics card. We have to borrow their tricks, and apply them on the Mac side. You must install OpenCore Legacy Patcher before doing this, as you need to edit OCLP's config file on disk.
I set up shop in High Sierra to do the dirty work. I suggest keeping a High Sierra install on your Mac for troubleshooting. Any time you reinstall OpenCore for example, you'll have to redo some of the steps below. Note: the OCLP app currently requires Yosemite as the minimum OS. So your hacking digs could be in Yosemite, El Capitan, Sierra, or High Sierra.
Pull up System Profiler -> PCI again. Select the non-Metal card, and write down the ID numbers. You want the Vendor ID and Device ID.
In my case, the HD 5870 is in Slot-1, has a Vendor ID of 1002, with a Device ID of 6898. These are hex numbers, so besides digits, they can contain letters a-f. Note: "1002" is the vendor ID for AMD. Most AMD cards intended for Mac will be 1002. Your ID numbers will likely be different.
Now you need gfxutil
which is a command-line utility used to collect PCI-related info from macOS. Download the app package and unzip it. You'll get a folder.
Open Terminal, type "cd " and drag/drop the gfxutil folder into your Terminal window. Note that "cd " has a trailing space.
"cd" means Change Directory. You're setting the path for Terminal to use this folder.
Type "./gfxutil" (return key) to run the utility.
You'll get a longish readout. Scroll up and down it, you're looking for the Vendor ID and Device ID you copied earlier.
Note the second column, 1002:6898 -- that's it. What you want is the final column, after the equal sign "= PciRoot(0x0)/Pci(0x3,0x0)/Pci(0x0,0x0)". This is the internal path to your non-Metal graphics card. Copy the part after the equal sign. You need to enter this path later. This particular path is Slot-1 of a MacPro 5,1 -- it will almost certainly be different for other Macs.
Open Disk Utility. Go to the View menu, make sure the checkmark is beside "Show All Devices". In early macOS versions, this was a popup selector in the Disk Utility window.
Select the device you installed OpenCore to. OCLP is installed on the hidden EFI partition at the beginning of a drive. You need to mount that EFI partition, so you can reach OpenCore's config file.
Note the disk number of your OpenCore volume. In my case it is "disk1".
Now open another Terminal window. Type "sudo diskutil mount /dev/disk" (insert your disk number) "s1" and press return. It will ask for your password. Note: this only works from an Admin user account.
"sudo" means "Superuser Do" - your command is to be executed by the root user. Hence why it wants your password.
"diskutil" is the command-line tool for disk commands. You're telling it to mount the EFI partition, which is always "s1".
With the EFI partition mounted, navigate to it with the Finder.
/EFI/EFI/OC/config.plist is the one you want. The Apple folder is used for firmware updates, you don't want that one. You want the "OC" folder for OpenCore.
Note: make a copy of the config.plist file before starting. If you break the syntax, you can fix it without a reinstall of OCLP.
We are following the "DeviceProperties Method" described on the Hackintosh instructions page
Open config.plist in a plist editor if you have one, and follow the instructions on the Hackintosh page. Insert the PCI path you copied earlier.
If you don't have a plist editor, use a text editor. Be careful here, syntax and typos can break OpenCore.
Scroll down the config file until you find the DeviceProperties section. Hopefully your non-Metal GPU will already be listed here for compatibility patching. If it isn't, you'll need to do some copy-paste work to edit the proper stuff in. If you've never programmed, borrow someone who has. Or get a plist editor. Warning - easy to break things.
Note: if you do break OpenCore, copy back the safety copy you made of config.plist earlier. If that doesn't do it (or you skipped the safety copy) you can re-install OpenCore Legacy Patcher. Then re-mount the EFI partition and try to edit again.
In my case, the non-Metal card was already listed.
So I deleted most of the dictionary entry below my key, and added the parts to make the card invisible. Using the instructions from the Hackintosh page. I kept the "rebuild-device-tree" command because it was sensible to do so. Not sure if it's actually necessary.
I suspect this makes only graphics cards invisible in Slot-1. Should something else be plugged into Slot-1, like a SATA card, it would probably be visible. Not tested.
Save the edited file and reboot. If you did everything right, then the job is done.
Hold the Option key while booting, so you boot without OpenCore. This is the way to run Snow Leopard through High Sierra. They'll see both cards. SL will either ignore the Metal card, or will run a software-rendered (non-accelerated) display. If so, make sure the menu bar is on the display with drivers, and game away.
OCLP will have left your boot sequence pointed to the EFI partition with OC on it. If you change that while directly booted into an earlier OS, boot with Option held again. Choose the EFI partition with the icon on it. You'll immediately get the OC boot selector, where you can pick your later OS of choice. Boot an OS through OpenCore, and the non-Metal card will be hidden when the boot process finishes.
Oddly, the boot progress bar can show on the non-Metal card until the high-level graphics drivers load. Right before the login screen appears (or it auto-logs in) the non-Metal display will freeze. Everything further will happen on the Metal card.
Monterey boots fine, and shows nothing in Slot-1. Success.
Note my RX 580 has a Device ID of 67df - remember, these are hex codes which can contain letters a-f.
When you reboot with OpenCore, you normally don't hold Option. Just wait - the OC boot selector will come up every time. You have 5 seconds to press a key, or click with the mouse or it will continue the boot. The 5-second delay can be changed by customizing the OCLP settings when you installed it. You can also change it in the config file - search for "<key>Timeout</key>". The integer value right below this is the boot selector timeout, in seconds.
When booting back before Mojave, remember to hold Option during boot, to get the original firmware selector (before OpenCore loads). If you boot Snow Leopard through OpenCore, SL will not see the old card either.
WARNING - if you reinstall OpenCore Legacy Patcher (perhaps to change a setting, or upgrade to a later OCLP version) you will have to repatch the config.plist file to hide your old graphics card again. Suggest leaving OCLP alone, and keeping a copy of your edited config.plist in a safe place. If/when you have to repatch, you can copy across the entry for your graphics card. DO NOT paste in your whole saved config file - it could mess up the newer OCLP installation. Only copy across your GPU entry.
I ran into one anomaly while testing. My older card got stuck with the fan on a high setting. Whatever speed it was running at when OC made it vanish during the boot process. The solution was to put my Mac to sleep, then wake it up. Sleep causes the PCI slots to power down. Killing power to the old card reset it to default - minimal fan.
While back in Snow Leopard, I tried some:
Return to Castle Wolfenstein
Call Of Duty 1
American McGee's Alice
Bugdom 2 (demo)
Not yet tested:
Jedi Knight II
Tomb Raider Anniversary (Demo)
... and many more.
Some of these do work up to Mojave, but most require PPC Rosetta. ie - Snow Leopard.
I haven't been back to Snow Leopard since installing Mojave. It's been a few years. Good times ahead.