Mastachief Posted September 12 Share Posted September 12 Its not supposed to hang, its supposed to panic, take a look below at mine Link to comment Share on other sites More sharing options...
jalavoui Posted September 12 Share Posted September 12 (edited) guys who as this dam lcd display with the driver uses this "feature" that we don't need i'm checking linux code i think we need to get rid of this bs and use part of old icl code SO I'LL W8 FOR INTEL Edited September 12 by jalavoui Link to comment Share on other sites More sharing options...
ArtikDiamond Posted September 12 Share Posted September 12 @Mastachiefis there a feature in nblue to disable dgpus? Like -wegnoegpu but for nblue. Without that macOS will try to use our dgpu and we can't test it... Link to comment Share on other sites More sharing options...
BitBass Posted September 12 Share Posted September 12 (edited) 7 hours ago, ArtikDiamond said: Wait a second! Me and some other people managed to boot, install and use macOS normally, you should try too Sure, but some guidance would be appreciated. Let's take it somewhere else though, so we don't muddy the thread with non-dev talk. Edited September 12 by BitBass Link to comment Share on other sites More sharing options...
jalavoui Posted September 12 Share Posted September 12 (edited) a feature in nblue to disable dgpus? i think can be done with opencore injection. i write about it but dont remenber where. i do hope someone get xcode and try a few patches so we can get this done as for non devs just try install it and post logs this patch isnt helping doing a review as it seems tobe setting state to zero need to fix this code plus add extra if (conditon) setportmode(0) return 0 uint32_t AppleIntelPortHAL::probePortMode() { uint64_t rmmio = getMember<uint64_t>(this, 0x9B0); unsigned int uVar3 = *reinterpret_cast<volatile uint32_t *>(rmmio + 0x1638a0); unsigned int *puVar2 = getMember<unsigned int*>(this, 0x548); unsigned long PVar5; unsigned long uVar4; if (getMember<uint64_t>(this, 0x1be0) != 0) { unsigned int uVar2 = *reinterpret_cast<volatile uint32_t *>(rmmio + 0xc4000); unsigned int uVar3 = *reinterpret_cast<volatile uint32_t *>(rmmio + 0x44470); switch(*puVar2) { case 0: uVar4 = (unsigned long)(uVar2 >> 0x10 & 1); break; case 1: uVar4 = (unsigned long)(uVar2 >> 0x11 & 1); break; default: uVar4 = 0; break; case 3: uVar4 = (unsigned long)((uVar3 >> 0x10 | uVar2 >> 0x18 | uVar3) & 1); break; case 4: uVar4 = (unsigned long)((uVar3 >> 0x11 | uVar3 >> 1 | uVar2 >> 0x19) & 1); break; case 5: uVar4 = (unsigned long)((uVar3 >> 0x12 | uVar3 >> 2 | uVar2 >> 0x1a) & 1); break; case 6: uVar4 = (unsigned long)((uVar3 >> 0x13 | uVar3 >> 3 | uVar2 >> 0x1b) & 1); break; case 7: uVar4 = (unsigned long)((uVar3 >> 0x14 | uVar3 >> 4 | uVar2 >> 0x1c) & 1); break; case 8: uVar4 = (unsigned long)((uVar3 >> 0x15 | uVar3 >> 5 | uVar2 >> 0x1d) & 1); } if (uVar4==0) { //setPortMode)((AppleIntelPort *)this,0); if (*(char *)(*(long *)(puVar2 + 0x14) & 8) == 0) { //(*this->vt->resetSoftwareState)(this); *getMember<uint64_t*>(this, 0x114)=0; *getMember<uint64_t*>(this, 0x11c)=0x2000000; *getMember<uint64_t*>(this, 0x124)=0; *getMember<uint64_t*>(this, 0x12c)=0; *getMember<uint64_t*>(this, 0x134)=0; *getMember<uint64_t*>(this, 0x140)=0; *getMember<uint64_t*>(this, 0x550)=0; bzero(getMember<uint64_t*>(this, 0x140),0x400); bzero(getMember<uint64_t*>(this, 0xc),0x108); bzero(getMember<uint64_t*>(this, 0x558),0x1c); } *puVar2 = 0; return 0; } } switch(*puVar2) { case 0: case 1: PVar5 = 1; break; case 2: PVar5 = 0; if (uVar3 != 0xffffffff) { if ((uVar3 & 0x40) == 0) { if ((uVar3 & 0x20) != 0) { LAB_000b2d13: PVar5 = 3; } } else { LAB_000b2d3d: PVar5 = 2; } } break; case 3: PVar5 = 0; if (uVar3 != 0xffffffff) { if ((uVar3 >> 0xe & 1) != 0) { goto LAB_000b2d3d; } if ((uVar3 >> 0xd & 1) != 0) { goto LAB_000b2d13; } } break; case 4: PVar5 = 0; if (uVar3 != 0xffffffff) { if ((uVar3 >> 0x16 & 1) != 0) { goto LAB_000b2d3d; } if ((uVar3 >> 0x15 & 1) != 0) { goto LAB_000b2d13; } } break; case 5: PVar5 = 0; if (uVar3 != 0xffffffff) { if ((uVar3 >> 0x1e & 1) != 0) { goto LAB_000b2d3d; } if ((uVar3 >> 0x1d & 1) != 0) { goto LAB_000b2d13; } } break; default: PVar5 = 0; } LAB_000b2d4a: return PVar5; }; Edited September 12 by jalavoui Link to comment Share on other sites More sharing options...
ArtikDiamond Posted September 12 Share Posted September 12 Me and ben are stuck because of the dgpu unfortunately... Link to comment Share on other sites More sharing options...
jalavoui Posted September 12 Share Posted September 12 (edited) tooke me 3 seconds to find this try the opencore device injection patch that was waht i ment https://dortania.github.io/OpenCore-Install-Guide/extras/spoof.html this part is what i used and tested it works very well to disable the dgpu but make sure you put the right path if working the device will vanish from ioreg do this using opencore config tool Edited September 12 by jalavoui Link to comment Share on other sites More sharing options...
jkbuha Posted September 12 Share Posted September 12 (edited) 35 minutes ago, jalavoui said: tooke me 3 seconds to find this try the opencore device injection patch that was waht i ment https://dortania.github.io/OpenCore-Install-Guide/extras/spoof.html i've used that spoof method previously to inject the 9A49 platform-id instead of my native one, but same results. Did you intend to use it for another purpose? Edit: got it, the injection method is to disable dGPU. note that might work for ˜50% of dGPUs, for the rest you will need to apply an ACPI _PS3 or _OFF call depending on your BIOS. My github has more details on how to do it precisely, it follows the OC-Little method... Edited September 12 by jkbuha Link to comment Share on other sites More sharing options...
benmacfreak Posted September 12 Share Posted September 12 2 hours ago, jalavoui said: a feature in nblue to disable dgpus? i think can be done with opencore injection. i write about it but dont remenber where. i do hope someone get xcode and try a few patches so we can get this done as for non devs just try install it and post logs this patch isnt helping doing a review as it seems tobe setting state to zero need to fix this code plus add extra if (conditon) setportmode(0) return 0 uint32_t AppleIntelPortHAL::probePortMode() { uint64_t rmmio = getMember<uint64_t>(this, 0x9B0); unsigned int uVar3 = *reinterpret_cast<volatile uint32_t *>(rmmio + 0x1638a0); unsigned int *puVar2 = getMember<unsigned int*>(this, 0x548); unsigned long PVar5; unsigned long uVar4; if (getMember<uint64_t>(this, 0x1be0) != 0) { unsigned int uVar2 = *reinterpret_cast<volatile uint32_t *>(rmmio + 0xc4000); unsigned int uVar3 = *reinterpret_cast<volatile uint32_t *>(rmmio + 0x44470); switch(*puVar2) { case 0: uVar4 = (unsigned long)(uVar2 >> 0x10 & 1); break; case 1: uVar4 = (unsigned long)(uVar2 >> 0x11 & 1); break; default: uVar4 = 0; break; case 3: uVar4 = (unsigned long)((uVar3 >> 0x10 | uVar2 >> 0x18 | uVar3) & 1); break; case 4: uVar4 = (unsigned long)((uVar3 >> 0x11 | uVar3 >> 1 | uVar2 >> 0x19) & 1); break; case 5: uVar4 = (unsigned long)((uVar3 >> 0x12 | uVar3 >> 2 | uVar2 >> 0x1a) & 1); break; case 6: uVar4 = (unsigned long)((uVar3 >> 0x13 | uVar3 >> 3 | uVar2 >> 0x1b) & 1); break; case 7: uVar4 = (unsigned long)((uVar3 >> 0x14 | uVar3 >> 4 | uVar2 >> 0x1c) & 1); break; case 8: uVar4 = (unsigned long)((uVar3 >> 0x15 | uVar3 >> 5 | uVar2 >> 0x1d) & 1); } if (uVar4==0) { //setPortMode)((AppleIntelPort *)this,0); if (*(char *)(*(long *)(puVar2 + 0x14) & 8) == 0) { //(*this->vt->resetSoftwareState)(this); *getMember<uint64_t*>(this, 0x114)=0; *getMember<uint64_t*>(this, 0x11c)=0x2000000; *getMember<uint64_t*>(this, 0x124)=0; *getMember<uint64_t*>(this, 0x12c)=0; *getMember<uint64_t*>(this, 0x134)=0; *getMember<uint64_t*>(this, 0x140)=0; *getMember<uint64_t*>(this, 0x550)=0; bzero(getMember<uint64_t*>(this, 0x140),0x400); bzero(getMember<uint64_t*>(this, 0xc),0x108); bzero(getMember<uint64_t*>(this, 0x558),0x1c); } *puVar2 = 0; return 0; } } switch(*puVar2) { case 0: case 1: PVar5 = 1; break; case 2: PVar5 = 0; if (uVar3 != 0xffffffff) { if ((uVar3 & 0x40) == 0) { if ((uVar3 & 0x20) != 0) { LAB_000b2d13: PVar5 = 3; } } else { LAB_000b2d3d: PVar5 = 2; } } break; case 3: PVar5 = 0; if (uVar3 != 0xffffffff) { if ((uVar3 >> 0xe & 1) != 0) { goto LAB_000b2d3d; } if ((uVar3 >> 0xd & 1) != 0) { goto LAB_000b2d13; } } break; case 4: PVar5 = 0; if (uVar3 != 0xffffffff) { if ((uVar3 >> 0x16 & 1) != 0) { goto LAB_000b2d3d; } if ((uVar3 >> 0x15 & 1) != 0) { goto LAB_000b2d13; } } break; case 5: PVar5 = 0; if (uVar3 != 0xffffffff) { if ((uVar3 >> 0x1e & 1) != 0) { goto LAB_000b2d3d; } if ((uVar3 >> 0x1d & 1) != 0) { goto LAB_000b2d13; } } break; default: PVar5 = 0; } LAB_000b2d4a: return PVar5; }; i have an apple dev account and sequoia on my laptop, BUT im unsure what to do to patch the kext, i can build it but unsure HOW to patch the code though.. Link to comment Share on other sites More sharing options...
jalavoui Posted September 12 Share Posted September 12 (edited) i deleted old sources and binarys to clean the thread. latest nblue binary work with icl framebuffer (few posts back) as for tgl this are latest sources - hope some devs helps by publishing new code update sle_internal to allow in future double class injection (currently only links tgl portmode) sle_Internal.zip Nblue will now allow all possible tgl/icl tests by editing the info.plist HookCase-master.zip NootedBlue-master.zip Edited Monday at 01:39 AM by jalavoui 2 1 Link to comment Share on other sites More sharing options...
jkbuha Posted September 13 Share Posted September 13 16 hours ago, jalavoui said: i deleted old sources and binarys to clean the thread. latest nblue binary work with icl framebuffer (few posts back) as for tgl this are latest sources - hope some devs helps by publishing new code NootedBlue-master.zip 410.74 kB · 12 downloads HookCase-master.zip 191 kB · 6 downloads ok, let me try and contribute here. after some configuration, have successfully set up the source code, and built both kexts under xcode. happy to start looking at which functions need to be looked at/uncommented first. just let me know which are the most important ones to start. 1 Link to comment Share on other sites More sharing options...
ArtikDiamond Posted September 13 Share Posted September 13 22 hours ago, jalavoui said: tooke me 3 seconds to find this try the opencore device injection patch that was waht i ment https://dortania.github.io/OpenCore-Install-Guide/extras/spoof.html this part is what i used and tested it works very well to disable the dgpu but make sure you put the right path if working the device will vanish from ioreg do this using opencore config tool I tried both yesterday and today, but igfxutils can't detect my dGPU... Link to comment Share on other sites More sharing options...
jalavoui Posted Sunday at 06:35 PM Share Posted Sunday at 06:35 PM (edited) while i was playing with those apple internal kexts i managed to load the icl framebuufer. the log is huge depending on IGLogLevel=8 number but the advantage of getting proper logs + usage of many parameters not present on production version is huge here's the bin and logs. you need hookcase + previous sle_internal installed to /L/E now it's so clear why many cards dont work - all is in the new logs NootedBlue.kext.zip x.log.zipHookCase.kext.zip Edited Monday at 01:40 AM by jalavoui 3 Link to comment Share on other sites More sharing options...
jkbuha Posted Monday at 11:39 AM Share Posted Monday at 11:39 AM this latest version doesnt detect the iGPU (46a6 or 9a49), and remains looping in text mode without any second boot. no KPs, no blank screen Link to comment Share on other sites More sharing options...
benmacfreak Posted Monday at 01:33 PM Share Posted Monday at 01:33 PM 1 hour ago, jkbuha said: this latest version doesnt detect the iGPU (46a6 or 9a49), and remains looping in text mode without any second boot. no KPs, no blank screen i get the same with my laptop 9a68 device ID Link to comment Share on other sites More sharing options...
jalavoui Posted Tuesday at 02:54 PM Share Posted Tuesday at 02:54 PM (edited) theory then in code DDIx is "index" after this auto portindex we get pipes idk where bus id is used checking icl v tgs then the rest of code fails trying to apply this patch Edited Tuesday at 08:56 PM by jalavoui Link to comment Share on other sites More sharing options...
Mastachief Posted Tuesday at 07:09 PM Share Posted Tuesday at 07:09 PM (edited) From Hackintool BUSID and IndexSection Below is from the BUSID Section: Proven by ApplelntelFramcbufferControllor::MapFBToPort, by a call to ApplelntelFramebufferController::getGMBuslDfromPort. This is GMBUS (Graphic Management Bus) ID described in Gen 9 https://cdrdv2-public.intel.com/ 690989/intel-gfx-prm-osrc-hsw-display.pdf Gen 11 https://cdrdv2-public.intel.com/ 705833/intel-gfx-prm-osrc-tgl-vol-12-display-engine.pdf The use could be found in Intel Linux Graphics Driver source code: https://github.com/torvalds/linux/blob/6481d5ed076e69db83ca75e751ad492a6fb669a7/drivers/gpu/drm/i915/intel_lrc.c https://github.com/torvalds/linux/blob/6481d5ed076e69db83ca75e751ad492a6fb669a7/drivers/gpu/drm/i915/i915_reg.h However, it should be noted that Apple identifiers are slightly different from Linux driver. In Linux 0 means disabled, however, for Apple it has some special meaning and is used for internal display. Other than that the values are the same: • GMBUS_PIN_DPC (4) HDMIC • GMBUS_PIN_DPB (5) SDVO, HDMIB • GMBUS_PIN_DPD (6) HDMID • GMBUS_PIN_VGADDC (2) VGA untilBroadwell inclusive. So basically you could use 4, 5, 6 for arbitrary HDMI or DisplayPort displays. Since 5 supports SDVO (https://en.wikipedia.org/wiki/Seriat_Digital_Video_Out), it may also be used to support DVI displays. Starting with Skylake VGA works via SOVO too (instead of a dedicated GMBUS_PIN_VGAODC id). Below is from the Index Section: Watch out, this is really messy (see ApplelntelFramebutferController::MapFBToPort}. I am not fully sure why this exists, and recommend setting index to array index (i.e. the sequential number from 0). The only accepted values are 0, 1, 2, 3, and-1 (0xFF). When index is equal to arrayindex the logic is simple: Port with index 0 is always considered built-in {of LVOS type) regardless of any other values. Ports with indexes 1-3 are checked against type, HDMI will allow the use of digital audio, otherwise DP is assumed. Port with index 0xFF is ignored and skipped. When index!= array index port type will be read from connector[index].type Say, we have 2 active ports: 0 - [1] buslD 4 type LVDS 1 - [2] buslD 5 type DP 2 - [3] buslD 6 type HDMI 3 - [-1] buslD 0 type Dummy This will result in 2 framebuffers which types will be shifted: 0 - buslD 4 type DP 1 - buslD 5 type HDMI In fact BuslD values are also read as connector[index].buslD, but are later mapped back via ApplelntelFramebufferController::getGMBuslDfromPort by looking up a connector with the specified index. The lookup will stop as soon as a special marker connector (-1) is found. To illustrate, if we have 2 active ports: 0 - [1] buslD 4 type LVDS 1 - [2] buslD 5 typoDP 2 - [-1] buslD 6 type HDMI 3 - I·1] buslD 0 type Dummy The result will be 2 framebuffers which types and the second buslD will be shifted: 0 - buslD 4 typoDP 1 - buslD 6 typeHDMI It is also used for port-number calculation. - LVDS displays (more precisely, displays withCNConnectorAlwaysConnected flag set) get port-number 0. - Other displays go through index - port-number mapping: 1 - 5, 2 - 6, 3 - 7, or fallback to 0. By following the above guide, thats how i came up with the Device properties for Intel Plus Graphics G7 and the alldata connectors patch using whatevergreen. instead of Zero the connectors i just assign different ID's to null them out. as the connector information differed between cannonlake and icelake, there were differences with the alldata, it was half the actual amount of values. <key>PciRoot(0x0)/Pci(0x2,0x0)</key> <dict> <key>AAPL,GfxYTile</key> <data>AQAAAA==</data> <key>AAPL,ig-platform-id</key> <data>AABSig==</data> <key>AAPL,slot-name</key> <string>Internal@0,2,0</string> <key>AAPL00,override-no-connect</key> <data>AP///////wAw5HycAAAAAAAfAQSVIhNgA2+xp1VMniUMUFQAAAABAQEBAQEBAQEBAQEBAQEBLjaAoHA4H0AwIDUAWMIQAAAaHySAoHA4H0AwIDUAWMIQAAAaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAMOv8KPH0SFCR9AAAAAEY=</data> <key>complete-modeset</key> <data>AQAAAA==</data> <key>device-id</key> <data>U4oAAA==</data> <key>device_type</key> <string>VGA compatible controller</string> <key>disable-agdc</key> <data>AAAAAA==</data> <key>dpcd-max-link-rate</key> <data>CgAAAA==</data> <key>enable-cdclk-frequency-fix</key> <data>AQAAAA==</data> <key>enable-dbuf-early-optimizer</key> <data>AQAAAA==</data> <key>enable-dpcd-max-link-rate-fix</key> <data>AQAAAA==</data> <key>enable-dvmt-calc-fix</key> <data>AQAAAA==</data> <key>force-online</key> <data>AQAAAA==</data> <key>framebuffer-con0-alldata</key> <data>AAAAAAAAAAAAAAAAAAAAAAIAAAAYAAAA</data> <key>framebuffer-con0-enable</key> <data>AQAAAA==</data> <key>framebuffer-con1-alldata</key> <data>AgAAAAAAAAABAAAAAQAAAAAEAADBAgAA</data> <key>framebuffer-con1-enable</key> <data>AQAAAA==</data> <key>framebuffer-con2-alldata</key> <data>AwAAAAoAAAABAAAAAQAAAAAEAADBAgAA</data> <key>framebuffer-con2-enable</key> <data>AQAAAA==</data> <key>framebuffer-patch-enable</key> <data>AQAAAA==</data> <key>framebuffer-unifiedmem</key> <data>AAAAgA==</data> <key>model</key> <string>Intel Iris Xe Graphics</string> </dict> Edited Tuesday at 07:33 PM by Mastachief 1 Link to comment Share on other sites More sharing options...
jalavoui Posted Tuesday at 09:07 PM Share Posted Tuesday at 09:07 PM (edited) tks. for future ref i found the condition that is used to match port number to gmbus in code this value is used if not zero the requestes it calls are wonder why i dont see this log line anywere Edited Tuesday at 09:11 PM by jalavoui 1 Link to comment Share on other sites More sharing options...
Recommended Posts