Jump to content
559 posts in this topic

Recommended Posts

Summary:

  • V200 active  fb[+0x4A18] = 1 set in AppleIntelFramebufferinit so Apple's stack picks Y-tiled end-to-end
  • V99R/V99f/V99F adapted — convert X-tiled (0x14 stride / bit 10) → Y-tiled (0x50 stride / bit 12); pass through Y-tiled (0x50 / bit 12) unchanged. Linear values pass through too (just logged)
  • V99S adapted — hardware-side: force HW stride 0x50 and HW CTL bit 12 if currently wrong; skip if already Y-tiled. Single coherent target = Y-tiled-legacy throughout
  • V99R[P] non-aperture redirect + V99G GGTT remap preserved for dp0
  • All other defenses preserved (Path B/C, V55, V97, V103, V195)

Boot. Look in the log:

V200[1..3]: fb[+0x4A18]=1 forced
V99R[Sp1]: PLANE_STRIDE 0x50 passthrough         ← Apple natively Y-tiled (good)
V99R[Cp1]: PLANE_CTL 0x94001008 passthrough (tiling=4)
V99R[S1]: PLANE_STRIDE 0x14 -> 0x50 (X->Y)        ← only if some path emits X-tiled
V99R[C1]: PLANE_CTL ... -> ... (X->Y)             ← same defensive case
V99S[1]: SURF arm ... pre-arm STRIDE=0x50 CTL=0x94001008  ← hardware coherent

Visually: aiming for coherent login + HD cursor. If still corruption, the new log lines will show whether anything still emits non-Y-tiled values that are slipping past us.

Posted (edited)

i just remenbered the backlight. if your display shows as AppleBacklightDisplay u gonna have extra work so

for now try get rid of it. disable ssdt or try my backlight panel hack

 

i got this back from old git but maybe this is working for adl

care as if this is wrong set apple code will force link training

{"__ZN31AppleIntelFramebufferController38mapIOBitsPerColorToEncoderBitsPerColorEjPj",mapIOBitsPerColorToEncoderBitsPerColor, this->omapIOBitsPerColorToEncoderBitsPerColor},

 


{
    //TODO: filter for edp only + check other options
    //[drm:intel_edp_fixup_vbt_bpp [i915]] pipe has 24 bpp for eDP panel, overriding BIOS-provided max 18 bpp
    if (param_2 != (uint *)0x0) {
      param_1 = 2;
    }
    
    return FunctionCast(mapIOBitsPerColorToEncoderBitsPerColor, callback->omapIOBitsPerColorToEncoderBitsPerColor)(that,param_1,param_2);;
};

 

send a xlog i think u have some power issue maybe

 

this line

AGDCC: Unauthorized client 'PerfPowerServices' blocked (IOService:/AppleACPIPlatformExpert/PC00/AppleACPIPCI/IGPU@2/AppleIntelFramebufferController/IntelFBClientControl)

do a panic check here idk if patch is working

const LookupPatchPlus patch {&kextAGDP, kAGDPBoardIDKeyOriginal, kAGDPBoardIDKeyPatched, 1};

PANIC_COND(!patch.apply(patcher, address, size), "NBlue", "Failed to apply AGDP board-id patch");

Edited by jalavoui
Posted (edited)
59 minutes ago, jalavoui said:

i'm gonna just focus on code as all other questions are not why i'm on insanlymac.

 

when u got time check nblue. the dam mtl bundle in /l/e is not chached so patches wont work

fine for now as i only did a small patch that i moved to original info.plist.

 

time will tell what direction we need togo.

gonna check logs but i think u gonna get the frameb to work and if so its world first

 

u are aware that if this work u can also fix icl ?

very good options ahead

I need to be aligned with u before go on, like u said

Edited by Stezza88
Posted (edited)

dont try nblue now u will have to change a lot. try some fixes 1st

 

this is apple not helping u maybe 

this is your log

2026-05-09 20:03:10.619474+0200  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:621 VendorEventHandler [IGPU:AppleIntelBaseController]: Port: 8418928.00000000 Event:ModesetCallback [c]
2026-05-09 20:03:10.619480+0200  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:760 **************** kAGDCRegisterLinkModesetCallback #0 **************** 1:0:1
2026-05-09 20:03:10.619483+0200  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:762 kAGDCRegisterLinkModesetCallback-ext: FB:0 -> 2560 x 1600, ext_blanking=0, 285600000 Hz
2026-05-09 20:03:10.662679+0200  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:621 VendorEventHandler [IGPU:AppleIntelBaseController]: Port: 10401392.00000000 Event:ModesetCallback [c]
2026-05-09 20:03:10.662696+0200  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:760 **************** kAGDCRegisterLinkModesetCallback #0 **************** 1:1:1
2026-05-09 20:03:10.662704+0200  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:762 kAGDCRegisterLinkModesetCallback-ext: FB:0 -> 2560 x 1600, ext_blanking=0, 285600000 Hz
2026-05-09 20:03:10.683057+0200  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:621 VendorEventHandler [IGPU:AppleIntelBaseController]: Port: 4060784.00000000 Event:ModesetCallback [c]
2026-05-09 20:03:10.683065+0200  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:760 **************** kAGDCRegisterLinkModesetCallback #0 **************** 1:1:1
2026-05-09 20:03:10.683070+0200  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:762 kAGDCRegisterLinkModesetCallback-ext: FB:0 -> 2560 x 1600, ext_blanking=0, 285600000 Hz
2026-05-09 20:03:10.970623+0200  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:621 VendorEventHandler [IGPU:AppleIntelBaseController]: Port: 3044976.00000000 Event:ModesetCallback [c]
2026-05-09 20:03:10.970626+0200  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:760 **************** kAGDCRegisterLinkModesetCallback #0 **************** 1:1:1
2026-05-09 20:03:10.970628+0200  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:762 kAGDCRegisterLinkModesetCallback-ext: FB:0 -> 2560 x 1600, ext_blanking=0, 285600000 Hz

look at my log. it validades 1 port and "bugs" other

2026-05-06 19:27:48.252727+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:621 **************** kAGDCRegisterLinkModesetCallback #0 **************** 1:0:1
2026-05-06 19:27:48.252729+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:623 kAGDCRegisterLinkModesetCallback-ext: FB:0 -> 1920 x 1080, ext_blanking=0, 142000000 Hz
2026-05-06 19:27:48.252731+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:624 kAGDCRegisterLinkModesetCallback-ext-2: pEnc=0x1, pBPC=0x2, pColometry=0x1, dRange=0x1 dscBPP=0
2026-05-06 19:27:48.252734+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: validateMode:166 Validating mode FB:0 -> 1920 x 1080, 142000000 Hz
2026-05-06 19:27:48.252736+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: validateMode:368 response accepted on:0
2026-05-06 19:27:48.335234+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:484 VendorEventHandler [IGPU:AppleIntelBaseController]: Port: 868005504.00000000 Event:ModesetCallback [c]
2026-05-06 19:27:48.335239+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:621 **************** kAGDCRegisterLinkModesetCallback #0 **************** 1:1:1
2026-05-06 19:27:48.335241+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:623 kAGDCRegisterLinkModesetCallback-ext: FB:0 -> 1920 x 1080, ext_blanking=0, 142000000 Hz
2026-05-06 19:27:48.335244+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:624 kAGDCRegisterLinkModesetCallback-ext-2: pEnc=0x1, pBPC=0x2, pColometry=0x1, dRange=0x1 dscBPP=0
2026-05-06 19:27:48.335246+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) Warning!! AGDP: vendor modeset callback invalid sequence or interleaving!!
2026-05-06 19:27:48.335248+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: validateMode:166 Validating mode FB:0 -> 1920 x 1080, 142000000 Hz
2026-05-06 19:27:48.335250+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: validateMode:368 response accepted on:0
2026-05-06 19:27:48.575254+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:484 VendorEventHandler [IGPU:AppleIntelBaseController]: Port: 867645056.00000000 Event:ModesetCallback [c]
2026-05-06 19:27:48.575262+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:621 **************** kAGDCRegisterLinkModesetCallback #0 **************** 1:1:1
2026-05-06 19:27:48.575266+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:623 kAGDCRegisterLinkModesetCallback-ext: FB:0 -> 1920 x 1080, ext_blanking=0, 142000000 Hz
2026-05-06 19:27:48.575271+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:624 kAGDCRegisterLinkModesetCallback-ext-2: pEnc=0x1, pBPC=0x2, pColometry=0x1, dRange=0x1 dscBPP=0
2026-05-06 19:27:48.575275+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) Warning!! AGDP: vendor modeset callback invalid sequence or interleaving!!
2026-05-06 19:27:48.575278+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: validateMode:166 Validating mode FB:0 -> 1920 x 1080, 142000000 Hz
2026-05-06 19:27:48.575282+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: validateMode:368 response accepted on:0
2026-05-06 19:27:48.774254+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:484 VendorEventHandler [IGPU:AppleIntelBaseController]: Port: 867284608.00000000 Event:ModesetCallback [c]
2026-05-06 19:27:48.774261+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:621 **************** kAGDCRegisterLinkModesetCallback #0 **************** 1:1:1
2026-05-06 19:27:48.774264+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:623 kAGDCRegisterLinkModesetCallback-ext: FB:0 -> 1920 x 1080, ext_blanking=0, 142000000 Hz
2026-05-06 19:27:48.774268+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:624 kAGDCRegisterLinkModesetCallback-ext-2: pEnc=0x1, pBPC=0x2, pColometry=0x1, dRange=0x1 dscBPP=0
2026-05-06 19:27:48.774271+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) Warning!! AGDP: vendor modeset callback invalid sequence or interleaving!!
2026-05-06 19:27:48.774273+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: validateMode:166 Validating mode FB:0 -> 1920 x 1080, 142000000 Hz
2026-05-06 19:27:48.774277+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: validateMode:368 response accepted on:0
2026-05-06 19:29:32.823508+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) Adding AGDP mode validate property

conclusion: apple is hanging u

your display is alive just find the 5% missing so it doesnt look broken

Edited by jalavoui
  • Like 1
1 minute ago, jalavoui said:

dont try nblue now u will have to change a lot. try some fixes 1st

I was needing only osinfo thy

4 minutes ago, jalavoui said:

dont try nblue now u will have to change a lot. try some fixes 1st

 

this is apple not helping u maybe 

this is your log

2026-05-09 20:03:10.619474+0200  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:621 VendorEventHandler [IGPU:AppleIntelBaseController]: Port: 8418928.00000000 Event:ModesetCallback [c]
2026-05-09 20:03:10.619480+0200  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:760 **************** kAGDCRegisterLinkModesetCallback #0 **************** 1:0:1
2026-05-09 20:03:10.619483+0200  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:762 kAGDCRegisterLinkModesetCallback-ext: FB:0 -> 2560 x 1600, ext_blanking=0, 285600000 Hz
2026-05-09 20:03:10.662679+0200  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:621 VendorEventHandler [IGPU:AppleIntelBaseController]: Port: 10401392.00000000 Event:ModesetCallback [c]
2026-05-09 20:03:10.662696+0200  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:760 **************** kAGDCRegisterLinkModesetCallback #0 **************** 1:1:1
2026-05-09 20:03:10.662704+0200  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:762 kAGDCRegisterLinkModesetCallback-ext: FB:0 -> 2560 x 1600, ext_blanking=0, 285600000 Hz
2026-05-09 20:03:10.683057+0200  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:621 VendorEventHandler [IGPU:AppleIntelBaseController]: Port: 4060784.00000000 Event:ModesetCallback [c]
2026-05-09 20:03:10.683065+0200  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:760 **************** kAGDCRegisterLinkModesetCallback #0 **************** 1:1:1
2026-05-09 20:03:10.683070+0200  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:762 kAGDCRegisterLinkModesetCallback-ext: FB:0 -> 2560 x 1600, ext_blanking=0, 285600000 Hz
2026-05-09 20:03:10.970623+0200  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:621 VendorEventHandler [IGPU:AppleIntelBaseController]: Port: 3044976.00000000 Event:ModesetCallback [c]
2026-05-09 20:03:10.970626+0200  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:760 **************** kAGDCRegisterLinkModesetCallback #0 **************** 1:1:1
2026-05-09 20:03:10.970628+0200  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:762 kAGDCRegisterLinkModesetCallback-ext: FB:0 -> 2560 x 1600, ext_blanking=0, 285600000 Hz

look at my log. it validades 1 port and "bugs" other

2026-05-06 19:27:48.252727+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:621 **************** kAGDCRegisterLinkModesetCallback #0 **************** 1:0:1
2026-05-06 19:27:48.252729+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:623 kAGDCRegisterLinkModesetCallback-ext: FB:0 -> 1920 x 1080, ext_blanking=0, 142000000 Hz
2026-05-06 19:27:48.252731+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:624 kAGDCRegisterLinkModesetCallback-ext-2: pEnc=0x1, pBPC=0x2, pColometry=0x1, dRange=0x1 dscBPP=0
2026-05-06 19:27:48.252734+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: validateMode:166 Validating mode FB:0 -> 1920 x 1080, 142000000 Hz
2026-05-06 19:27:48.252736+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: validateMode:368 response accepted on:0
2026-05-06 19:27:48.335234+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:484 VendorEventHandler [IGPU:AppleIntelBaseController]: Port: 868005504.00000000 Event:ModesetCallback [c]
2026-05-06 19:27:48.335239+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:621 **************** kAGDCRegisterLinkModesetCallback #0 **************** 1:1:1
2026-05-06 19:27:48.335241+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:623 kAGDCRegisterLinkModesetCallback-ext: FB:0 -> 1920 x 1080, ext_blanking=0, 142000000 Hz
2026-05-06 19:27:48.335244+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:624 kAGDCRegisterLinkModesetCallback-ext-2: pEnc=0x1, pBPC=0x2, pColometry=0x1, dRange=0x1 dscBPP=0
2026-05-06 19:27:48.335246+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) Warning!! AGDP: vendor modeset callback invalid sequence or interleaving!!
2026-05-06 19:27:48.335248+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: validateMode:166 Validating mode FB:0 -> 1920 x 1080, 142000000 Hz
2026-05-06 19:27:48.335250+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: validateMode:368 response accepted on:0
2026-05-06 19:27:48.575254+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:484 VendorEventHandler [IGPU:AppleIntelBaseController]: Port: 867645056.00000000 Event:ModesetCallback [c]
2026-05-06 19:27:48.575262+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:621 **************** kAGDCRegisterLinkModesetCallback #0 **************** 1:1:1
2026-05-06 19:27:48.575266+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:623 kAGDCRegisterLinkModesetCallback-ext: FB:0 -> 1920 x 1080, ext_blanking=0, 142000000 Hz
2026-05-06 19:27:48.575271+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:624 kAGDCRegisterLinkModesetCallback-ext-2: pEnc=0x1, pBPC=0x2, pColometry=0x1, dRange=0x1 dscBPP=0
2026-05-06 19:27:48.575275+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) Warning!! AGDP: vendor modeset callback invalid sequence or interleaving!!
2026-05-06 19:27:48.575278+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: validateMode:166 Validating mode FB:0 -> 1920 x 1080, 142000000 Hz
2026-05-06 19:27:48.575282+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: validateMode:368 response accepted on:0
2026-05-06 19:27:48.774254+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:484 VendorEventHandler [IGPU:AppleIntelBaseController]: Port: 867284608.00000000 Event:ModesetCallback [c]
2026-05-06 19:27:48.774261+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:621 **************** kAGDCRegisterLinkModesetCallback #0 **************** 1:1:1
2026-05-06 19:27:48.774264+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:623 kAGDCRegisterLinkModesetCallback-ext: FB:0 -> 1920 x 1080, ext_blanking=0, 142000000 Hz
2026-05-06 19:27:48.774268+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: VendorEventHandler:624 kAGDCRegisterLinkModesetCallback-ext-2: pEnc=0x1, pBPC=0x2, pColometry=0x1, dRange=0x1 dscBPP=0
2026-05-06 19:27:48.774271+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) Warning!! AGDP: vendor modeset callback invalid sequence or interleaving!!
2026-05-06 19:27:48.774273+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: validateMode:166 Validating mode FB:0 -> 1920 x 1080, 142000000 Hz
2026-05-06 19:27:48.774277+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) AGDP:: validateMode:368 response accepted on:0
2026-05-06 19:29:32.823508+0100  localhost kernel[0]: (AppleGraphicsDevicePolicy) Adding AGDP mode validate property

conclusion: apple is hanging u

 

I'm of a different opinion..

Posted (edited)

from old code, this might be on your way 

use to disable

{"__ZN21AppleIntelFramebuffer17prepareToExitWakeEv",dovoid},

{"__ZN21AppleIntelFramebuffer18prepareToExitSleepEv",dovoid},

{"__ZN21AppleIntelFramebuffer19prepareToEnterSleepEv",dovoid},

{"__ZN21AppleIntelFramebuffer18prepareToEnterWakeEv",dovoid}

 

maybe this also as apple code use a lot. this disables

{"__ZN24AppleIntelBaseController18hasExternalDisplayEv",hasExternalDispla},// external wrong detection

 

this flag if setup like this will set powerwell always on. might help. u can check on ghidra were it is used

getMember<volatile uint32_t>(that, 0xc58)=FB_FLAG_BOOST_PIXEL_FREQUENCY_LIMIT;

 

gonna check ngreen on git. i bet its just small things

gonna send u a ngreen "fixed" sec

 

try if u get kp check where. it as some little bugs i removed

 

ng.zip

 

dam i forgot add the functions disablers. u can copy from this post

Edited by jalavoui
  • Like 1
Posted (edited)
8 hours ago, jalavoui said:

dam i just updated a old release

nvm u can check what changed

small things

 

Problem is deeper, I reviewed your small changes and applied some. Some of those I have trashed because hang on boot.

Edited by Stezza88
Posted (edited)

if it complicates u need to follow linux log. e.g

 

2024-10-23T18:27:18.191869+02:00 sgiammoript-Predator-PT14-51 kernel: i915 0000:00:02.0: [drm:intel_psr_init_dpcd [i915]] Panel replay is not supported by panel
2024-10-23T18:27:18.192206+02:00 sgiammoript-Predator-PT14-51 kernel: i915 0000:00:02.0: [drm:intel_crtc_state_dump [i915]] psr: disabled, psr2: disabled, panel replay: disabled, selective fetch: disabled

 

think u can train ai to use linux code from lib + match linux log with apple log ?

otherwise ai will just try keep guessing

worst part is do all by linux and apple code at some point undo the fix

but no other options it must be done.

 

dont trash code cause of hang on boot. hang means apple code failed at some stage. try fix is always better

otherwise ai will just do bad hacks and hide the problem.

 

i double apple code as linux if(display)>=13 logic

Edited by jalavoui
Posted (edited)
1 hour ago, jalavoui said:

if it complicates u need to follow linux log. e.g

 

2024-10-23T18:27:18.191869+02:00 sgiammoript-Predator-PT14-51 kernel: i915 0000:00:02.0: [drm:intel_psr_init_dpcd [i915]] Panel replay is not supported by panel
2024-10-23T18:27:18.192206+02:00 sgiammoript-Predator-PT14-51 kernel: i915 0000:00:02.0: [drm:intel_crtc_state_dump [i915]] psr: disabled, psr2: disabled, panel replay: disabled, selective fetch: disabled

 

think u can train ai to use linux code from lib + match linux log with apple log ?

otherwise ai will just try keep guessing

worst part is do all by linux and apple code at some point undo the fix

but no other options it must be done.

 

dont trash code cause of hang on boot. hang means apple code failed at some stage. try fix is always better

otherwise ai will just do bad hacks and hide the problem.

 

i double apple code as linux if(display)>=13 logic

 

I set a comment near //necessary if not...

 

I repeat : if I reach a clean login I will check every point pf the library to improve it..

Edited by Stezza88
Posted (edited)

* Improved section "initPlatformWorkaroundsfor display 13 . still to be committed

 

got the full ADL-P workaround set from Linux i915:

Register Addr Bits Linux name Reason
PIPE_CHICKEN(A) 0x70038 bit 30 set UNDERRUN_RECOVERY_DISABLE_ADLP Underrun recovery must always be disabled on Display 13+
PIPE_CHICKEN(A) 0x70038 bit 7 set PER_PIXEL_ALPHA_BYPASS_EN Display WA #1153
PIPE_CHICKEN(A) 0x70038 bit 15 set PIXEL_ROUNDING_TRUNC_FB_PASSTHRU Display WA #1605353570
XELPD_DISPLAY_ERR_FATAL_MASK 0x4421C all = 1 Mask all fatal errors on Display 13
GEN9_CLKGATE_DIS_5 0x46540 bit 17 set DPCE_GATING_DIS Wa_22011091694:adlp
GEN8_CHICKEN_DCPR_1 0x46430 bit 7 cleared DDI_CLOCK_REG_ACCESS Bspec/49189 ADL-P init

Apple's TGL kext doesn't apply any of these. Adding V212 to initPlatformWorkarounds (gated by !isRealTGL so real TGL isn't affected):

 

  • V212: ADL-P Display 13+ workarounds applied — PIPE_CHICKEN(A)=... in the log — confirms it ran. Note the values: PIPE_CHICKEN bit 30/15/7 set, etc.
  • Visual change — best case: less corruption / better frame stability since underrun-recovery loops and unmasked fatal errors can't keep firing
  • No regression (no kernel panic) — these are documented Linux workarounds that your hardware specifically needs
Edited by Stezza88
Posted (edited)

i think i know what's making all not to work. 2 many ai hacks

e.g.

image.png.1474e37d4ca1b72d7c516cddbe12dda9.png

 

this are just hacks real problem not solved.

u'll get better results with clean code. make nblue load and fix as need but not with this hacks. 

 

same as this fix in hwSetPowerWellStatePGE() ai just hide the problem

now that u learn howto solve things just start with working code then u will get results

check github use the kext installer i'm using

we need tobe on same base or this will take forever

Edited by jalavoui
  • Like 1

Recommended dismantle order (easiest → hardest):

  1. raWriteRegister32b (forwarder) — pure forwarder to raWriteRegister32. Removing it changes nothing observable; Apple's volatile-pointer WriteRegister32(volatile void*, ulong, uint) overload runs natively. Zero-risk first win
  2. raWriteRegister32 body — strip the band-aids one block at a time. Each block = one experiment:
    • V99R[S/C/Cdp] PLANE_STRIDE × 8 / PLANE_CTL X→Y → drop entirely; if buffer-vs-scanout actually mismatches, fix at the allocator/renderer side (the real layer where layout is decided), not at the register write
    • V72 EMR mask → likely redundant now that V212 writes XELPD_DISPLAY_ERR_FATAL_MASK = ~0 (the Linux-correct way to mask display errors on Display 13)
    • V97 TRANS_DDI_FUNC_CTL bit16 clear → verify against Linux i915: bit 16 is TRANS_DDI_PORT_SYNC_MODE_MASTER_SELECT and Linux sets it conditionally on multi-stream MST. We blindly clear it always — wrong gate
    • V103 DC_STATE_EN block → only needed if ngreen-dmc=adlp DMC blob isn't fully restoring power state. Verify with DMC blob loaded properly first
    • V195 CTL1 preserve → ADL-P power-well handling differs from TGL; check Linux's intel_display_power.c and replace with the proper read-modify-write rather than rewriting on every cache write
  3. wrapICLReadAUX — keep V99 LINK_STATUS_UPDATED suppression (or better: find why it's getting set on this hardware in the first place), drop V97AUX/V98T diagnostic logging
Posted (edited)

i'm not saying this as "your doing a bad job"

thing is you are on a old nblue base full of bugs and ofc it doesnt help

 u learned howto research, howto write some code

just get a good base and refuse some ai hacks

at some point u gonna move to production frame and icl

nblue as all working just patch what is need

 

keep what u doing when ready just switch base

i know its anoying to start all over but i just got rid of old junk and all working better now

 

when all this is sync we gonna laugh if find out all it takes are 3 or 4 good patches

Edited by jalavoui
2 minutes ago, jalavoui said:

i'm not saying this as "your doing a bad job"

thing is you are on a old nblue base full of bugs and ofc it doesnt help

 u learned howto research, howto write some code

just get a good base and refuse some ai hacks

at some point u gonna move to production frame and icl

nblue as all working just patch what is need

 

keep what u doing when ready just switch base

i know its anoying to start all over but i just got rid of old junk and all working better now

 

I never annoyed. Want to reach login with fb-only for starting point

Posted (edited)

This is THE CORE but still bugged. wanna make me crazy

 

// V99R[P] + V99G + linear CTL/STRIDE forces — CORE scanout coherence.
// Applied unconditionally; confirmed empirically as the load-bearing path for
// visible scanout in dp0, dp1, AND without any -ngreendp* boot arg.
//
// 1. SURF redirect: non-aperture writes (>=0x10000000) → 0, so the display engine
// always scans from the same GGTT page range (GGTT[0..3999]) no matter where
// Apple's setupScanoutMemory chose to migrate the surface.
// 2. V99G: one-shot GGTT remap — copies the PTEs at the migrated surface pages
// down to GGTT[0..3999] so SURF=0 fetches the same physical memory WS's CPU
// compositor is writing into.
// 3. Linear CTL/STRIDE forces (tiling→0, STRIDE=0xa0): required for visible
// output. Removing them produces a black screen with no scanout activity,
// confirmed empirically. Side effect: produces the fragmented/repeated
// pattern when Apple's allocator stores buffer in non-linear physical layout
// — that is a known cost of this path, not a removable hack.
if (param_2 >= 0x10000000u) {
				static int v99PCount = 0;
				if (v99PCount < 8)
					SYSLOG("ngreen", "V99R[P%d]: SURF 0x%x->0 (dp0: non-aperture blocked, aperture kept)",
						   ++v99PCount, (uint32_t)param_2);

				// V99G: one-shot GGTT remap — copy PTEs from the non-aperture surface pages
				// (GGTT[surfPage..surfPage+3999]) to GGTT[0..3999] so that SURF=0x0 scans
				// the SAME physical memory that WS's CPU compositor is writing into.
				static bool ggttRemapped = false;
				if (!ggttRemapped) {
					ggttRemapped = true;
					uint32_t srcPage = (uint32_t)param_2 >> 12;
					int remapped = 0, remapSkipped = 0;
					for (int i = 0; i < 4000; i++) {
						uint32_t lo = NGreen::callback->readReg32(GGTT_PTE_LO(srcPage + i));
						uint32_t hi = NGreen::callback->readReg32(GGTT_PTE_HI(srcPage + i));
						if (!(lo & 1)) { remapSkipped++; continue; }
						NGreen::callback->writeReg32(GGTT_PTE_LO(i), lo);
						NGreen::callback->writeReg32(GGTT_PTE_HI(i), hi);
						remapped++;
					}
					NGreen::callback->writeReg32(0x101008, 0x1); // flush GGTT TLB
					SYSLOG("ngreen", "V99G: GGTT[0..%d] <- GGTT[0x%x..] remapped=%d skip=%d",
						   remapped - 1, srcPage, remapped, remapSkipped);
				}

				param_2 = 0;
			}
			// dp0: force CTL linear and STRIDE=0xa0 (CPU compositor writes linearly via BAR2).
			uint32_t hwTiling = (hwCtl >> 10) & 0x7;
			if (hwTiling != 0)
				NGreen::callback->writeReg32(0x70180, hwCtl & ~(0x7u << 10));
			if (hwStride != 0xa0)
				NGreen::callback->writeReg32(0x70188, 0xa0);

 

Edited by Stezza88
Posted (edited)

u can look for some important structures in apple code. check u have this struct crtcparam defined like this in ghidra

if not just add with github header

 

image.thumb.png.42801a89547b787fe81323570dd2f364.png

 

if u do a search for this struct it is used a lot in apple code.

 

i've removed this struct from code when exporting but it can be rebuild -> planeparams

image.png.42b66219bf3ad5d29a772f17069e4a8b.png

 

for scaler i got this. probably incomplete

image.thumb.png.dde5f945d19d47a6d2d215523cee2cd0.png

 

this are key points that may require fix for your display

hacking regs only wont work

leave ws alone -> problem is in apple tgl frame code

 

if u can make ai check the relations of this search u probably will find something to fix

image.png.3364818e41e91897dd52e4d8011ee8d3.png

Edited by jalavoui
  • Like 1

I cleaned so much, now with FB-only I use, and this is your hint too 

-v keepsyms=1 debug=0x100 IGLogLevel=8 -ngreentglfb -NGreenDebug -liludbg liludump=220 ngreen-dmc=adlp -ngreenv189
Posted (edited)

u will end up finding a solution it's a matter of time. remenber that your display show signs of be alive

try those params analysys maybe u find something

 

tell ai stop alucinating with memory writes! that is not a fix. try fix origin not hack with mem writes

 

linux seems dsc not enabled

2024-10-23T18:27:18.191617+02:00 sgiammoript-Predator-PT14-51 kernel: i915 0000:00:02.0: [drm:print_ddi_port [i915]] Port A VBT info: CRT:0 DVI:0 HDMI:0 DP:1 eDP:1 DSI:0 DP++:0 LSPCON:0 USB-Type-C:0 TBT:0 DSC:0
is ai reading linux log ?

2024-10-23T18:27:18.193666+02:00 sgiammoript-Predator-PT14-51 kernel: i915 display info: has_dsc: yes
but not used in linux code. need confirmation

 

inside nblue info.plist in firmware folder  i set

image.png.3f91fd96c899b7b61a7ee07e12b716d6.png

but at least for my display it is not available. this set come from icl settings time

 

apple decides dsc in getDPCDInfo() verify if origin here as im not sure

we just total forgot frameb base settings. there are the ones from info.plist and also others in a apple function

this is a good example why global analysys matters. need to see what apple does everywere or risk bad hacks

Edited by jalavoui
  • Like 1
×
×
  • Create New...