Jump to content

[80% Solved] Iris Xe iGPU on Tiger Lake successfully loaded ICLLP Frambuffer and VRAM also recognizes 1536MB! + However, some issues.


shl628
483 posts in this topic

Recommended Posts

On 3/20/2024 at 11:17 AM, jalavoui said:

[CONNECTOR:308:eDP-1] Supported Monitor Refresh rate range is 0 Hz - 0 Hz

this is kinda my macos hack - works for some displays but i dont like it

 

this is ida pro bad dissasemble

GScheduler4 *__fastcall IGScheduler::create(IGScheduler4 *this, IOGraphicsAccelerator2 *a2)
{
  int v2; // eax

  v2 = (*((_DWORD *)this + 1136) >> 22) & 7;
  switch ( v2 )
  {
    case 5:
      return (IGScheduler4 *)IGScheduler5::withAccelerator(this, a2);
    case 4:
      return IGScheduler4::withAccelerator(this, a2);
    case 3:
      return (IGScheduler4 *)IGGuC::withAccelerator(this, a2);
  }
  IGScheduler::create(this, a2);
  return 0LL;

 

boot flags for framebuffer mode:

-v

boot flags for graphics crash mode:

-v -allow3d

NootedBlue.kext.zip 19.17 kB · 5 downloads NootedBlue-master.zip 313.76 kB · 2 downloads

 

I replaced it with your recently modified NootedBlue and did some testing again.
The result is as follows, with some changes :

 

1. -v keepsyms=1 debug=0x100 -igfxcdc -allow3d

 

1-1. GraphicsSchedulerSelect = 0 (Default, not modified NBlue Info.plist)
IOKit Daemon (kernelmanagerd) stall[0], (60s): 'IGPU' (a,24020002) log infinite output.

 

1-2. GraphicsSchedulerSelect = 2
IOKit Daemon (kernelmanagerd) stall[0], (60s): 'IGPU' (a,24020002) log infinite output.

 

2. -v keepsyms=1 debug=0x100 -igfxcdc -allow3d igfxfw=2

 

2-1. GraphicsSchedulerSelect = 0 (Default, unmodified NBlue's Info.plist)
It boots, but logs show firmware load failure and graphics acceleration does not work.
Same as IGPU log in Test6 result above.
 
2-2. GraphicSchedulerSelect = 2
During booting, AuxKC loading is completed and IGPU log output stops.
I think it caused an "Unsupported GraphicsSchedulerSelect=2 kernel panic".
Forced restart shortcut (Ctrl + Command + Power Button) does not work.
 
2-3. GraphicSchedulerSelect = 5
IOKit Daemon (kernelmanagerd) stall[0], (60s): 'IGPU' (a,24020002) log infinite output.

 

Unexpected context status buffer entry kernel panic does not occur, and instead the log below continues to be output infinitely.

IOKit Daemon (kernelmanagerd) stall[0], (60s): 'IGPU' (a,24020002)

 

image.thumb.jpeg.99b894b6807b11eb96ace4e501fa21a3.jpeg

  • Like 1
Link to comment
Share on other sites

i tried nootedblue on my laptop, same results as you all get. im booting into windows until we get a working kext somehow.

Link to comment
Share on other sites

can you guys try use whatevergreen and figure out what parameters are set in framebuffer to make it work ?

the HwRegsNeedUpdate from whatevergreen didint work for me that's why i made a patch

 

GraphicsSchedulerSelect controls the firmware loading dont use with igfxfw...

 

 

Link to comment
Share on other sites

By using the modified whatever green from shl628,

 

the below settings below allow booting to a black screen. you can remote to the machine, the session has the framebuffer working, those images that you see posted near the beginning of this thread are proof.

 

important note, if you change the framebuffer-con1 to framebuffer-con0 in the Device properties while using the below config, you get a KP, however if you change it to con2, con3, there is no change in ioreg, it always attaches to appledisplay on framebuffer@1 the specific property however should be applebacklightdisplay on frambebuffer@0 which doesnt happen.

<key>PciRoot(0x0)/Pci(0x2,0x0)</key>
		<dict>
			<key>AAPL,GfxYTile</key>
			<data>01000000</data>
			<key>AAPL,ig-platform-id</key>
			<data>0100718A</data>
			<key>device-id</key>
			<data>718A0000</data>
			<key>dpcd-max-link-rate</key>
			<data>0A000000</data>
			<key>enable-backlight-registers-fix</key>
			<data>01000000</data>
			<key>enable-cdclk-frequency-fix</key>
			<data>01000000</data>
			<key>enable-dbuf-early-optimizer</key>
			<data>01000000</data>
			<key>enable-dpcd-max-link-rate-fix</key>
			<data>01000000</data>
			<key>enable-dvmt-calc-fix</key>
			<data>01000000</data>
			<key>force-online</key>
			<data>01000000</data>
			<key>framebuffer-con1-alldata</key>
			<data>020000000000000000000000000000000200000018010000</data>
			<key>framebuffer-con1-enable</key>
			<data>01000000</data>
			<key>framebuffer-fbmem</key>
			<data>00009000</data>
			<key>framebuffer-mobile</key>
			<data>01000000</data>
			<key>framebuffer-patch-enable</key>
			<data>01000000</data>
			<key>framebuffer-stolenmem</key>
			<data>00003001</data>
			<key>framebuffer-unifiedmem</key>
			<data>00000080</data>
			<key>igfxfw</key>
			<data>02000000</data>
			</dict>

 

image.png.961d465866136559a0b68cd81fae57e2.png

 

 

image.png.3746024e5fcf601f4b1e2557b08a18d7.png

 

image.thumb.png.1e34e0c0e0c91154be85a900d9eadb4c.png

 

 

 

Link to comment
Share on other sites

this is code from whatevergeen (i guess debug version)

 

#ifdef DEBUG

if (callbackIGFX->dumpFramebufferToDisk) {

char name[64];

snprintf(name, sizeof(name), "/var/log/AppleIntelFramebuffer_%d_%d.%d", cpuGeneration, getKernelVersion(), getKernelMinorVersion());

FileIO::writeBufferToFile(name, callbackIGFX->framebufferStart, callbackIGFX->framebufferSize);

SYSLOG("igfx", "dumping framebuffer information to %s", name);

uint32_t delay = 20000;

PE_parse_boot_argn("igfxdumpdelay", &delay, sizeof(delay));

IOSleep(delay);

}

#endif

 

can you post it after you boot the system ?

Edited by jalavoui
Link to comment
Share on other sites

16 hours ago, jalavoui said:

this is code from whatevergeen (i guess debug version)

 

#ifdef DEBUG

if (callbackIGFX->dumpFramebufferToDisk) {

char name[64];

snprintf(name, sizeof(name), "/var/log/AppleIntelFramebuffer_%d_%d.%d", cpuGeneration, getKernelVersion(), getKernelMinorVersion());

FileIO::writeBufferToFile(name, callbackIGFX->framebufferStart, callbackIGFX->framebufferSize);

SYSLOG("igfx", "dumping framebuffer information to %s", name);

uint32_t delay = 20000;

PE_parse_boot_argn("igfxdumpdelay", &delay, sizeof(delay));

IOSleep(delay);

}

#endif

 

can you post it after you boot the system ?

 

Attach the dump file created after booting by applying -v keepsyms=1 debug=0x100 -wegdbg -igfxcdc -igfxdump boot args.

AppleIntelFramebuffer_15_22.6.zip

  • Like 1
Link to comment
Share on other sites

i haven't figure out howto proper setup the device properties (much easier on amd cards) but i changed default ig-plat and dev-id and it hangs without crashing

 the ig platf/devid combo just loads some incompatible registers?

i set default bios to 4. if you guys wanna try other ig platf/devid do it in code or using opencore (need -allow3d enabled)

 

this is my current OC hacks

 

 

enabling IMEI with or without a fake id will hang the driver. turning off will panic

 

 

Edited by jalavoui
  • Like 1
Link to comment
Share on other sites

well all, i got ventura installed, i tried the fork of nootedblue, and weg, several different deviceproperties  etc. about this mac ONLY shows intel iris xe graphics 7mb, and no framebuffer loaded, no metal/opengl, nothing. Im unsure why, im not booting with -igfxvesa, im literally stumped on how to fix this, i read the whatevergreen faq many times over, etc. i cant find a working display properties setting, any help or advice please let me know. Thanks.

Link to comment
Share on other sites

On 3/24/2024 at 11:03 AM, jalavoui said:

i haven't figure out howto proper setup the device properties (much easier on amd cards) but i changed default ig-plat and dev-id and it hangs without crashing

 the ig platf/devid combo just loads some incompatible registers?

i set default bios to 4. if you guys wanna try other ig platf/devid do it in code or using opencore (need -allow3d enabled)

 

 

Can we redirect the incompatible registers via offsets?

Link to comment
Share on other sites

benmacfreak, dont use whatevergreen with nblue...

 

the  incompatible registers can be changed. but see this sample code:

 

#define SOFT_SCRATCH(n) _MMIO(0xc180 + (n) * 4)

#define SOFT_SCRATCH_COUNT 16

#define GEN11_SOFT_SCRATCH(n) _MMIO(0x190240 + (n) * 4)

#define GEN11_SOFT_SCRATCH(n) _MMIO(0x190240 + (n) * 4)

#define MEDIA_SOFT_SCRATCH(n) _MMIO(0x190310 + (n) * 4)

 

this exists in IGHardwareGuC::loadGuCBinary

 

in ida this is the code

  v7 = this[7];
  v8 = (_DWORD *)*((_QWORD *)v7 + 590);
  v8[1633] = 1;
  v8[319579] = 1;
  v8[9481] = 16;

this might work

from https://github.com/lvs1974/IntelGraphicsFixup/releases

 

uint32_t IGFX::mmioRead(void *fw, uint32_t reg) {

auto fIntelAccelerator = getMember<void *>(fw, 0x10);

auto mmio = getMember<volatile uint32_t *>(fIntelAccelerator, 0x1090);

return mmio[reg/4];

}

 

void IGFX::mmioWrite(void *fw, uint32_t reg, uint32_t v) {

auto fIntelAccelerator = getMember<void *>(fw, 0x10);

auto mmio = getMember<volatile uint32_t *>(fIntelAccelerator, 0x1090);

mmio[reg/4] = v;

}

Edited by jalavoui
Link to comment
Share on other sites

right i wouldnt know how to patch it either, as i have NO coding experience or IDA experience at all, i did look at some videos, and other stuff. I'm tbh lost, and wouldnt know how to do it unless i was to (no lie) have someone on remote helping me..

 

nor am i knowledgable enough with hackintosh to do it for myself whatsoever.

Edited by benmacfreak
Link to comment
Share on other sites

wifi finally working for Intel(R) Wi-Fi 6 AX101 0xA0F0 id 0x0244 in ventura

patched from github version

 

install the Airport kext in OC

the itlwm kext also works but will need some addon to scan networks

for BT i'm using shl628 files

 

updating the os hangs the driver - so just disable nblue if updating

done with ventura latest 13.6.6

 

itlwm.kext.zipAirportItlwm.kext.zip

itlwm-master.zip

Edited by jalavoui
Link to comment
Share on other sites

i am still stumped guys, i havent gotten the patch from yesterday going yet, i'm on Arch Linux for rn till someone can help me..

Link to comment
Share on other sites

idk if this happens with others using tiger lake mobos but

applealc makes kernel_task usage fires to 70% (normal is 2%) while doing nothing

 

nblue is causing displaypolicyd crashes + windowserver usage bump cause of timmings patch

 

i'm rechecking acpi settings and dsdt - guess less bugs on those help a lot

 

did a test with bios reset to defaults + disable secure boot

all good except for applealc usage. i'll try other layout ids... https://github.com/acidanthera/AppleALC/commits/master/Resources/ALC255

 

this is a dump from sys/kernel/debug/...

Kernel: 5.15.0-82-generic x86_64
Driver: 20201103
Time: 1711568886 s 195300 us
Boottime: 925 s 79083 us
Uptime: 924 s 55792 us
Capture: 4295123544 jiffies; 0 ms ago
Reset count: 0
Suspend count: 0
Platform: TIGERLAKE
Subplatform: 0x1
PCI ID: 0x9a49
PCI Revision: 0x01
PCI Subsystem: 1025:1464
IOMMU enabled?: 0
DMC loaded: yes
DMC fw version: 2.12
RPM wakelock: yes
PM suspended: no
GT awake: no
EIR: 0x00000000
IER: 0x00080000
GTIER[0]: 0x09090909
GTIER[1]: 0x09090909
GTIER[2]: 0x00000000
GTIER[3]: 0x00000000
GTIER[4]: 0x00000000
GTIER[5]: 0x00000000
PGTBL_ER: 0x00000000
FORCEWAKE: 0xffff0001
DERRMR: 0xffffffff
  fence[0] = 108603b00880001
  fence[1] = 190603b01100001
  fence[2] = 214603b01940001
  fence[3] = 00000000
  fence[4] = 00000000
  fence[5] = 00000000
  fence[6] = 00000000
  fence[7] = 00000000
  fence[8] = 00000000
  fence[9] = 00000000
  fence[10] = 00000000
  fence[11] = 00000000
  fence[12] = 00000000
  fence[13] = 00000000
  fence[14] = 00000000
  fence[15] = 00000000
  fence[16] = 00000000
  fence[17] = 00000000
  fence[18] = 00000000
  fence[19] = 00000000
  fence[20] = 00000000
  fence[21] = 00000000
  fence[22] = 00000000
  fence[23] = 00000000
  fence[24] = 00000000
  fence[25] = 00000000
  fence[26] = 00000000
  fence[27] = 00000000
  fence[28] = 00000000
  fence[29] = 00000000
  fence[30] = 00000000
  fence[31] = 00000000
FAULT_TLB_DATA: 0x00000000 0x00000000
AUX_ERR_DBG: 0x00000000
  SFC_DONE[0]: 0x000000ff
  SFC_DONE[1]: 0x00000000
  GAM_DONE: 0xffbfffff
GuC firmware: 
	status: DISABLED
	version: wanted 62.0, found 0.0
	uCode: 0 bytes
	RSA: 0 bytes
HuC firmware: 
	status: DISABLED
	version: wanted 7.9, found 0.0
	uCode: 0 bytes
	RSA: 0 bytes
available engines: 417
slice total: 1, mask=0001
subslice total: 5
slice0: 5 subslices, mask=0000001f
EU total: 80
EU per subslice: 16
has slice power gating: yes
has subslice power gating: no
has EU power gating: no
slice0: 5 subslice(s) (0x0000001f):
	subslice0: 16 EUs (0xffff)
	subslice1: 16 EUs (0xffff)
	subslice2: 16 EUs (0xffff)
	subslice3: 16 EUs (0xffff)
	subslice4: 16 EUs (0xffff)
	subslice5: 0 EUs (0x0)
graphics version: 12
media version: 12
display version: 12
gt: 0
iommu: disabled
memory-regions: 5
page-sizes: 211000
platform: TIGERLAKE
ppgtt-size: 48
ppgtt-type: 2
dma_mask_size: 39
is_mobile: no
is_lp: no
require_force_probe: no
is_dgfx: no
has_64bit_reloc: yes
gpu_reset_clobbers_display: no
has_reset_engine: yes
has_global_mocs: yes
has_gt_uc: yes
has_l3_dpf: no
has_llc: yes
has_logical_ring_contexts: yes
has_logical_ring_elsq: yes
has_mslices: no
has_pooled_eu: no
has_rc6: yes
has_rc6p: no
has_rps: yes
has_runtime_pm: yes
has_snoop: no
has_coherent_ggtt: no
unfenced_needs_alignment: no
hws_needs_physical: no
cursor_needs_physical: no
has_cdclk_crawl: no
has_dmc: yes
has_ddi: yes
has_dp_mst: yes
has_dsb: no
has_dsc: yes
has_fbc: yes
has_fpga_dbg: yes
has_gmch: no
has_hdcp: yes
has_hotplug: yes
has_hti: no
has_ipc: yes
has_modular_fia: yes
has_overlay: no
has_psr: yes
has_psr_hw_tracking: yes
overlay_needs_physical: no
supports_tv: no
rawclk rate: 19200 kHz
Has logical contexts? yes
scheduler: 1f
i915.vbt_firmware=(null)
i915.modeset=-1
i915.lvds_channel_mode=0
i915.panel_use_ssc=-1
i915.vbt_sdvo_panel_type=-1
i915.enable_dc=-1
i915.enable_fbc=1
i915.enable_psr=0
i915.psr_safest_params=no
i915.enable_psr2_sel_fetch=no
i915.disable_power_well=1
i915.enable_ips=1
i915.invert_brightness=0
i915.enable_guc=0
i915.guc_log_level=-1
i915.guc_firmware_path=(null)
i915.huc_firmware_path=(null)
i915.dmc_firmware_path=(null)
i915.mmio_debug=0
i915.edp_vswing=0
i915.reset=3
i915.inject_probe_failure=0
i915.fastboot=-1
i915.enable_dpcd_backlight=-1
i915.force_probe=
i915.fake_lmem_start=0
i915.request_timeout_ms=20000
i915.enable_hangcheck=yes
i915.load_detect_test=no
i915.force_reset_modeset_test=no
i915.error_capture=yes
i915.disable_display=no
i915.verbose_state_checks=yes
i915.nuclear_pageflip=no
i915.enable_dp_mst=yes
i915.enable_gvt=no

 

 

Edited by jalavoui
Link to comment
Share on other sites

What was happening when applealc made the kernel shoot to 70%, were you using a specific app?

 

That doesn't happen for me, which codec are you using I see you using layout 37, these are under a range of Realtek and Conexant.

 

Try a different hda layout that works and see if the issue repeats.

 

You could also generate your own layout xml  and sumbit to applealc github to approve or patch it on your own with a new ID

Edited by Mastachief
Link to comment
Share on other sites

 

// GEN8_GTCR _MMIO(0x4274) to  GEN12_GUC_TLB_INV_CR _MMIO(0xcee8)

static const uint8_t f3[] = {

0x74, 0x42, 0x00, 0x00

};

static const uint8_t r3[] = {

0xe8, 0xce, 0x00, 0x00

};

 

{&kextG11HW, f3, r3, arrsize(f3), 22},

 

call    __ZN16IntelAccelerator13SafeForceWakeEbj ; IntelAccelerator::SafeForceWake(bool,uint)
com.apple.driver.AppleIntelICLGraphics:__text:000000001493FDCA                 mov     rax, [r12+1270h]
com.apple.driver.AppleIntelICLGraphics:__text:000000001493FDD2                 mov     ecx, [rax+145948h]
com.apple.driver.AppleIntelICLGraphics:__text:000000001493FDD8                 mov     ecx, [rax+145994h]
com.apple.driver.AppleIntelICLGraphics:__text:000000001493FDDE                 mov     ecx, [rax+145998h]
com.apple.driver.AppleIntelICLGraphics:__text:000000001493FDE4                 mov     [rbp+var_44], ecx
com.apple.driver.AppleIntelICLGraphics:__text:000000001493FDE7                 mov     ecx, [rax+229Ch]
com.apple.driver.AppleIntelICLGraphics:__text:000000001493FDED                 mov     ecx, [rax+7008h]
com.apple.driver.AppleIntelICLGraphics:__text:000000001493FDF3                 mov     ecx, [rax+7000h]
com.apple.driver.AppleIntelICLGraphics:__text:000000001493FDF9                 mov     ecx, [rax+7004h]
com.apple.driver.AppleIntelICLGraphics:__text:000000001493FDFF                 mov     r13d, [rax+9138h]
com.apple.driver.AppleIntelICLGraphics:__text:000000001493FE06                 mov     ecx, [rax+913Ch]
com.apple.driver.AppleIntelICLGraphics:__text:000000001493FE0C                 mov     [rbp+var_3C], ecx
com.apple.driver.AppleIntelICLGraphics:__text:000000001493FE0F                 mov     ecx, [rax+9134h]
com.apple.driver.AppleIntelICLGraphics:__text:000000001493FE15                 mov     [rbp+var_40], ecx
com.apple.driver.AppleIntelICLGraphics:__text:000000001493FE18                 mov     ecx, [rax+911Ch]
com.apple.driver.AppleIntelICLGraphics:__text:000000001493FE1E                 mov     r15d, [rax+9120h]
com.apple.driver.AppleIntelICLGraphics:__text:000000001493FE25                 mov     ecx, [rax+9118h]
com.apple.driver.AppleIntelICLGraphics:__text:000000001493FE2B                 mov     r14d, [rax+9140h]

static void gen12_sseu_info_init(struct intel_gt *gt)
{
	struct sseu_dev_info *sseu = &gt->info.sseu;
	struct intel_uncore *uncore = gt->uncore;
	u32 g_dss_en;
	u16 eu_en = 0;
	u8 eu_en_fuse;
	u8 s_en;
	int eu;

	/*
	 * Gen12 has Dual-Subslices, which behave similarly to 2 gen11 SS.
	 * Instead of splitting these, provide userspace with an array
	 * of DSS to more closely represent the hardware resource.
	 */
	intel_sseu_set_info(sseu, 1, 6, 16);

	/*
	 * Although gen12 architecture supported multiple slices, TGL, RKL,
	 * DG1, and ADL only had a single slice.
	 */
	s_en = intel_uncore_read(uncore, GEN11_GT_SLICE_ENABLE) &
		GEN11_GT_S_ENA_MASK;
	drm_WARN_ON(&gt->i915->drm, s_en != 0x1);

	g_dss_en = intel_uncore_read(uncore, GEN12_GT_GEOMETRY_DSS_ENABLE);

	/* one bit per pair of EUs */
	eu_en_fuse = ~(intel_uncore_read(uncore, GEN11_EU_DISABLE) &
		       GEN11_EU_DIS_MASK);

 

https://elixir.bootlin.com/linux/v6.9-rc2/source/drivers/gpu/drm/i915/gt/uc/intel_guc.c#L212

 

 

Edited by jalavoui
Link to comment
Share on other sites

I am trying to install Sonoma 14.4.1,

 

Apparently after the second reboot in pre-installation it now runs a checks for a graphics card device-ID, this happens even if you boot using -igfvesa, I am redoing the installation and a bios reset on my Dell 5520 to be sure.

 

EDIT:

 

Ill just downgrade to Ventura 13.6.6

Edited by Mastachief
Link to comment
Share on other sites

Its actually really easy to open and edit snapshots in Sonoma for me, I tried catalina Catalina 10.15.7, however after i installed both kexts using hackintool and configured my config.plist to be similar to yours all i got was the Kernel Panic, nblue kext was the cause, and the dependencies were in Lili and virtual smc, I used MacbookPro14,1 and Ventura 13.6.5, picture added.

 

Gen11: @ Failed to apply patches!

 

Config.plist

 

20240404_035718.thumb.jpg.9c64fe571d92ac0c8aa94bdfb5ece5e1.jpg

 

Edited by Mastachief
Updated image
Link to comment
Share on other sites

yes the patches are for ventura only. but you can try to change them

 

// AppleIntelFramebufferController::hwSetMode skip hwRegsNeedUpdate
		static const uint8_t f2[] = {0xE8, 0x31, 0xE5, 0xFF, 0xFF, 0x84, 0xC0, 0x74, 0x3D};
		static const uint8_t r2[] = {0xE8, 0x31, 0xE5, 0xFF, 0xFF, 0x84, 0xC0, 0xEB, 0x3D};
		
		//catalina
			static const uint8_t f3[]= {0xe8, 0x38, 0xe7, 0xff, 0xff, 0x84, 0xc0, 0x74, 0x3d};
			static const uint8_t r3[]= {0xe8, 0x38, 0xe7, 0xff, 0xff, 0x84, 0xc0, 0xeb, 0x3d};

i disabled panic for ventura patches

 

 

update

not panic on patches make them not tobe applyed bylilu. so they need tobe separated

so i fix the catalina code and it is working

 

 

no matter what i do i just cant make wahtevergreen patches work for me...

catalina code patched should work with no injection

 

 

Edited by jalavoui
Link to comment
Share on other sites

×
×
  • Create New...