deniro98 / hackintosh-asus-zenbook-duo-ux482ea

55 stars 14 forks source link

Possible fix for Iris Xe G7 IGPU #5

Open MiddlemanTM opened 3 years ago

MiddlemanTM commented 3 years ago

Hi there,

I just thought to let you know, I may have come across a possible 'fix' for the Intel Iris Xe GPU.

https://www.reddit.com/r/hackintosh/comments/o5tcso/xps_9300_i7_1065g7_working_video_out/

Screen Shot 2021-06-23 at 11 46 41 AM

Someone posted on Reddit recently that they installed Catalina and used a fix for their Ice Lake CPU & Iris Plus Graphics G7 GPU (enabled acceleration) and they referred to this site for the answer. > https://github.com/leon0410898/XPS13-9300-hackintosh

As both the Ice Lake and Tiger Lake GPUs are named 'Iris G7', I highly suspect they are really the same chip, but Tiger Lake differs in that it has built-in extra execution cores. So theoretically it can be used/spoofed.

Anyways the method used by leon0410898 is simply enabling the Apple GUC firmware boot-arg fix in Lilu/Whatevergreen. Tiger Lake support (CPU identification) is already present in Opencore since April so I believe this might be possible.

djdeniro commented 3 years ago

@MiddlemanTM i will try, but apple has macbook's with Iris Plus graphics with 10th GEN it must works good, but 11th gen is new and working good, but needs GPU fix.

Anyway, thanks, I'll try, if It will works, I'll answer here!

enderaltin commented 3 years ago

I am using nuc11, I hope your experiment will be positive. hopefully Intel Xe graphics bigsur can also be used.

enderaltin commented 3 years ago

@MiddlemanTM deneyeceğim, ancak Apple'ın 10. Nesil Iris Plus grafikli macbook'ları var, iyi çalışıyor olmalı, ancak 11. nesil yeni ve iyi çalışıyor, ancak GPU düzeltmesi gerekiyor.

Her neyse, teşekkürler, deneyeceğim, eğer işe yararsa, burada cevaplayacağım!

?

enderaltin commented 3 years ago

@MiddlemanTM deneyeceğim, ancak apple'ın 10. Nesil Iris Plus grafikli macbook'ları var, iyi çalışıyor olmalı, ancak 11. nesil yeni ve iyi çalışıyor, ancak GPU düzeltmesi gerekiyor.

I am using nuc11, I hope your experiment will be positive. hopefully Intel Xe graphics bigsur can also be used.

MiddlemanTM commented 2 years ago

Just thought to share this. I recently did a bit of an experiment. With my unsupported RX6600 I managed to boot into the Catalina installer with my card on a Rocket Lake Z590I Gigabyte Vision D. How? By injecting the needed device-id values into the macOS AMD Radeon kexts.

By the same token I believe we can do the same for the Intel Ice Lake graphics. In the S\L\E folder there are two Intel Ice Lake kexts - AppleIntelCLGraphics.kext and AppleIntelICLFramebuffer.kext. If you right click and select to Show Contents you will find inside a Info.plist which can be edited. You will need to add your relevant device-id (derived from Intel's CPU Ark page for your CPU) into the IOPCIClass section under the Info.plist (which shows a whole list of compatible Ice Lake IDs) and then save the file and reboot. To make the edit you will need to first disable SIP under Terminal and then disable Gatekeeper in macOS. From there you can copy the two kexts over to your desktop, edit them using a Plist editor and then recopy them back to the hard drive. If you can't do it on the system standalone, remove your drive and do the copying from another Mac system if you can (with SIP and Gatekeeper disabled preferably). After that is done you add in the relevant AAPL,ig-platform-id to your config.plist for your Intel IGPU device properties. For the UX482 for instance, the injection would be: AAPL,ig-platform-id: 07009A49; device-id: 9A490000. After the values are added you can also try adding Intel IGFX firmware boot-args in the config.plist like -igfxfw or -igfxfw=2.

djdeniro commented 2 years ago

Just thought to share this. I recently did a bit of an experiment. With my unsupported RX6600 I managed to boot into the Catalina installer with my card on a Rocket Lake Z590I Gigabyte Vision D. How? By injecting the needed device-id values into the macOS AMD Radeon kexts.

By the same token I believe we can do the same for the Intel Ice Lake graphics. In the S\L\E folder there are two Intel Ice Lake kexts - AppleIntelCLGraphics.kext and AppleIntelICLFramebuffer.kext. If you right click and select to Show Contents you will find inside a Info.plist which can be edited. You will need to add your relevant device-id (derived from Intel's CPU Ark page for your CPU) into the IOPCIClass section under the Info.plist (which shows a whole list of compatible Ice Lake IDs) and then save the file and reboot. To make the edit you will need to first disable SIP under Terminal and then disable Gatekeeper in macOS. From there you can copy the two kexts over to your desktop, edit them using a Plist editor and then recopy them back to the hard drive. If you can't do it on the system standalone, remove your drive and do the copying from another Mac system if you can (with SIP and Gatekeeper disabled preferably). After that is done you add in the relevant AAPL,ig-platform-id to your config.plist for your Intel IGPU device properties. For the UX482 for instance, the injection would be: AAPL,ig-platform-id: 07009A49; device-id: 9A490000. After the values are added you can also try adding Intel IGFX firmware boot-args in the config.plist like -igfxfw or -igfxfw=2.

My respect

cowpod commented 2 years ago

Tried this on an i7-1165G7. ICL graphics driver loads, however I get a black screen after boot. No clue how to debug

MiddlemanTM commented 2 years ago

You can debug by installing the debug version of Opencore and relevant kexts across your build which is covered here.

https://dortania.github.io/OpenCore-Install-Guide/troubleshooting/debug.html

In general to get Rocket Lake graphics to work, you also must spoof Comet Lake CPUID and Comet Lake IGPU values. For example I have an i9-11900K on my Z590 system. So I would spoof EB060800 00000000 00000000 00000000 as CPUID1Data & FFFFFFFF 00000000 00000000 00000000 as CPUID1Mask, then use the following settings for the IGPU:

Screen Shot 2022-04-07 at 8 25 13 AM

You have to also enable any framebuffer settings such as framebuffer-patch-enable, framebuffer-stolenmem, framebuffer-unifiedmem & framebuffer-fbmem. These will help restore the lost VRAM values that help enable acceleration.

As I use an AMD card in my setup I usually revert to 03 connector on the IGPU ie. 03009BC5. The device-id on the end is derived from the equivalent previous gen IGPU (in my case a i9-10900K). The info for this is found on the Intel Ark spec pages. But for laptops wanting to use the internal IGPU it should be either 00, 07 or 09.

Remember always that the CPUID value (if known) defines the rest of the system. If you use a Comet Lake CPUID you must use Comet Lake IGPU aapl,-ig-platform-id and device-ids - you cannot use say 8th gen Coffee Lake IGPU values with it. Also, whatever the Intel chips are, e.g. RKL they usually only support the previous generation before it ie. CML and not more (afaik). It may be possible to use Skylake values for Comet Lake or Rocket Lake if installing on older OSes earlier than Sierra but I haven't tried it.

cowpod commented 2 years ago

Rocket lake iGPU (UHD630?) is different from Ice Lake iGPU (G7)... What's your iGPU model? I noticed that with the IceLake ig-platform-id 0100518A spoof (and emulate cpu, device-id) the ICLLP driver loads and "display0/AppleDisplay" shows up in IOREG under the IGPU's 2nd connector. There's still no acceleration, and the display is black. I was able to check by VNCing in.

MiddlemanTM commented 2 years ago

Rocket lake iGPU (UHD630?) is different from Ice Lake iGPU (G7)... What's your iGPU model? I noticed that with the IceLake ig-platform-id 0100518A spoof (and emulate cpu, device-id) the ICLLP driver loads and "display0/AppleDisplay" shows up in IOREG under the IGPU's 2nd connector. There's still no acceleration, and the display is black. I was able to check by VNCing in.

Well since you ask, I was using CPUID spoofing to boot the AMD RX6600 dGPU. But the setting for IGPU VESA is under spoofed Comet Lake UHD630 - IGPU is UHD750 from the i9-11900K. In my above post I was describing the method used to alter the AMD kexts for RX6600 under Catalina could be used similar for Ice Lake. Unfortunately there is no real method to enable Rocket Lake IGPU, reasons which I'll explain below.

One thing is I've built quite a number of systems and afaik, the Intel chips should allow for CPUID spoofing for at least one generation before. So say you have a Comet Lake system, you can spoof it to 9th gen Coffee Lake plus Coffee Lake IGPU and not more so long as you have the correct CPUID identifier. The trouble with Rocket Lake is that macOS doesn't have the RKL CPUID identifier so the UHD750 IGPU part of the chip can't be activated.

But what is different about the Ice Lake is that some have managed to get VESA going. This means you have a good chance to get the HW acceleration also, albeit with correct framebuffer VRAM insertion. Usually the following keys will allow this: framebuffer-patch-enable, framebuffer-fbmem, framebuffer-stolenmem & framebuffer-unifiedmem. On all the systems I've built using these patches, Intel Quicksync and HW acceleration is all enabled and working.

I would think if your display turned black, there's a good chance it works, just the signal is being sent somewhere. You'll have to try some Intel firmware boot-args perhaps to see if it switches. Might also be a good idea to set up a debug version of Opencore to see what its posting.

MiddlemanTM commented 2 years ago

Okay I've just done some interesting research. Looks like the system Leon0410898 used was an i7-1065G7 and looking at his EFI, his IGPU device properties were these: Screenshot 2022-04-08 at 11 48 13 AM Screenshot 2022-04-08 at 11 48 27 AM Screenshot 2022-04-08 at 11 49 03 AM

Since he did not use spoofing, that means his CPUID was recognised by the system. Which means that for the Tiger Lake G7 IGPU to work properly (theoretically) the Ice Lake CPUID must be applied to Tiger Lake systems (as well as the above IGPU device properties and boot-args). The value of it according to one poster online is 706E5 which for Opencore will translate to:

CPUID1Data: E5060700 00000000 00000000 00000000 CPUID1Mask: FFFFFFFF 00000000 00000000 00000000

If anyone is willing to try, I believe these are the correct settings to enable the IGPU under Tiger Lake.

cowpod commented 2 years ago

Thanks, tried the above.

Now it's booting to a black screen. Log mentions "link training failed", googling turns up no results. Also a lot of "FB1: is not enabled", so my guess is that I need to fix the connectors. I've already tried some busid combinations, but there's also apparently index combinations I'll need to try. Not sure if these actually do anything, as the log doesn't reflect any framebuffer-con patches.

Do you know if I can (and where) get said connector bus and index information from Linux?

Attached log, filter "AppleIntelICL" to get said errors. log.log.zip

Still of note, over VNC there is no acceleration whatsoever. I'd assume there would be...

MiddlemanTM commented 2 years ago

Thanks, tried the above.

Now it's booting to a black screen. Log mentions "link training failed", googling turns up no results. Also a lot of "FB1: is not enabled", so my guess is that I need to fix the connectors. I've already tried some busid combinations, but there's also apparently index combinations I'll need to try. Not sure if these actually do anything, as the log doesn't reflect any framebuffer-con patches.

Do you know if I can (and where) get said connector bus and index information from Linux?

Attached log, filter "AppleIntelICL" to get said errors. log.log.zip

Still of note, over VNC there is no acceleration whatsoever. I'd assume there would be...

Did you update the AppleIntelCLGraphics.kext and AppleIntelICLFramebuffer.kext to include the IOPCIClass values (device-id) for your IGPU? Also make sure you are using at least OC 0.7.5.

MiddlemanTM commented 2 years ago

Do you know if I can (and where) get said connector bus and index information from Linux?

Under macOS you could try Hackintools. As for Linux, lspci, gfxutil and lshw may help.

cowpod commented 2 years ago

Driver loads, so setting the values in info.plist isn't required. I'm using the same values as in the github link you posted. I had an Ice Lake laptop before, so I know the 0100518A, 518A0000 (and 528A) combination works. Hackintool's display connector is red, with busid=0, index=0, pipe=0. lspci, lshw don't show the display connector details. Gfxutil appears to be unrelated. I'm sure it's possible to find the connector details in Linux... no clue how to do that, google is incredibly unhelpful :(

ygordreyer commented 2 years ago

Damn. Just bought a Tiger Lake thinking that it would be a piece of cake to install Hackintosh. And now I'm searching like crazy for a IGPU fix.

MiddlemanTM commented 2 years ago

Damn. Just bought a Tiger Lake thinking that it would be a piece of cake to install Hackintosh. And now I'm searching like crazy for a IGPU fix.

It might be possible to spoof the CPUID of an Ice Lake system to the Tiger Lake setup. That might enable the IGPU to run in VESA mode. In any case check out this build for clues > https://github.com/leon0410898/XPS13-9300-hackintosh

cowpod commented 2 years ago

Running in VESA seems to be the only option; you'll lose control over the backlight and resolution.

alperenfatiih commented 1 year ago

is there any progress

lshbluesky commented 1 year ago

I recently installed versions of macOS Ventura 13 and macOS Catalina 10.15.7 on the Intel 11th Gen Tiger Lake i5-1135G7 laptop.

I'm trying various things with ICLLP Framebuffer and KBL/CFL Framebuffer, various patches from WhateverGreen, and the framebuffer itself's boot args, but I haven't activated QE/CI acceleration yet.

Currently, I used the RU.efi to set CFG Lock = Disabled, DVMT Pre Allocated Memory = 64MB, CD Clock Frequency = 648 MHz or higher in the BIOS. In some source code of "WhateverGreen" written by 0xFireWolf, it can be seen that macOS requires CD Clock Frequency of 648 MHz or higher. https://github.com/acidanthera/WhateverGreen/blob/master/WhateverGreen/kern_igfx_clock.cpp#L438~L443

But, in macOS Catalina 10.15.7, there is a kernel panic called Unsupported CD Clock Frequency. 20221227_134515

However, in macOS Ventura 13.x, the "busy timeout IGPU" log is repeated indefinitely in the latter half of the macOS boot when the graphics driver is loaded. The kernel panic log is not visible. 20221227_135814

Additionally, applying the Fake ID (Spoof) from macOS Ventura 13.x to 0xFF05 instead of 0x8Axx results in an "Unsupported ICL Sku" kernel panic.

Even if I apply Spoof with the AAPL, ig-platform-id and device-id attributes of KBL/CFL iGPU to use KBL/CFL Framebuffer rather than ICLLP Framebuffer, it does not boot from the part where the graphics driver is loaded, such as macOS Ventura 13.x

h357746 commented 1 year ago

请问有最新进展吗? Do you have the latest development?

lshbluesky commented 1 year ago

请问有最新进展吗? Do you have the latest development?

No, there isn't...

I think the Intel 11th Gen Tiger Lake CPU is an Intel 500 Series Chipset, so QE/CI activation is impossible while outputting the display to Intel Iris Xe Graphics.

For example, the Intel UHD 630 iGPU on the Intel 10th Gen Comet Lake can be QE/CI enabled while outputting the display from macOS on the Intel 400 Series Mainboard. However, with the Intel 500 Series Mainboard, there is a Black Screen issue when enabling QE/CI, and it is not resolved by applying the connector, Bus ID patch.

At the top of the current issue, you can see that cowpod succeeded in loading the ICLLP Framebuffer. But, cowpod said that a Black Screen issue appears.

Tried this on an i7-1165G7. ICL graphics driver loads, however I get a black screen after boot. No clue how to debug https://github.com/deniro98/hackintosh-asus-zenbook-duo-ux482ea/issues/5#issuecomment-1088354424

So, I think Intel Iris Xe Graphics iGPU is not available in macOS.

mtyler1 commented 1 year ago

Just thought to share this. I recently did a bit of an experiment. With my unsupported RX6600 I managed to boot into the Catalina installer with my card on a Rocket Lake Z590I Gigabyte Vision D. How? By injecting the needed device-id values into the macOS AMD Radeon kexts.

By the same token I believe we can do the same for the Intel Ice Lake graphics. In the S\L\E folder there are two Intel Ice Lake kexts - AppleIntelCLGraphics.kext and AppleIntelICLFramebuffer.kext. If you right click and select to Show Contents you will find inside a Info.plist which can be edited. You will need to add your relevant device-id (derived from Intel's CPU Ark page for your CPU) into the IOPCIClass section under the Info.plist (which shows a whole list of compatible Ice Lake IDs) and then save the file and reboot. To make the edit you will need to first disable SIP under Terminal and then disable Gatekeeper in macOS. From there you can copy the two kexts over to your desktop, edit them using a Plist editor and then recopy them back to the hard drive. If you can't do it on the system standalone, remove your drive and do the copying from another Mac system if you can (with SIP and Gatekeeper disabled preferably). After that is done you add in the relevant AAPL,ig-platform-id to your config.plist for your Intel IGPU device properties. For the UX482 for instance, the injection would be: AAPL,ig-platform-id: 07009A49; device-id: 9A490000. After the values are added you can also try adding Intel IGFX firmware boot-args in the config.plist like -igfxfw or -igfxfw=2.

Hey so i got a question, @MiddlemanTM Will this work on Iris xe g4? Also can you show me how to put the ids in the kexts, idk how to specifically do it like i got my device id: 0x9A78 but theres like ones like this for example: 80869999, would it be this: 0x80869A78?