Contribute
Register

[BUG] Black screen 3 minutes after booting, CoffeeLake UHD 630

Are you implying that simply causing a change to the backlight level (eg. hitting your brightness up or down key, assuming you implemented them), fixes the black screen during the 3-minite black screen window?

No, you're right changing brightness does not make a difference to the 3 minute issue. So maybe I'm barking up the wrong tree here but it seems it would be useful to understand how to set these values. Obviously setting the backlight level to 0xFF7B the old way is incorrect. In fact all you need to do to get full brightness upon boot during text display (before the 3 minute issue) is to only set PWM_CTL (0xC8250) to 0xC0000000 and leave the others to the defaults (which I have found to be PWM_FREQ=0x1D4C0, PWM_DUTY=0x1D4C0). So for one thing your implementation in SSDT-PNLF.aml for CFL is incorrect AFAICT.

Now I do like your idea of dumping what "IGPU registers change at that transition" and I did have a look at AppleIntelInfo.kext. The only problem is what IGPU registers and where do I find them defined? Can you give an example and I will implement the output of them so we can test this idea.
 
In fact all you need to do to get full brightness upon boot during text display (before the 3 minute issue) is to only set PWM_CTL (0xC8250) to 0xC0000000 and leave the others to the defaults (which I have found to be PWM_FREQ=0x1D4C0, PWM_DUTY=0x1D4C0).

0xc8250 is already set to 0xC0000000 in SSDT-PNLF.

So for one thing your implementation in SSDT-PNLF.aml for CFL is incorrect AFAICT.

We already suspect something has changed in CFL. That is not in question (SSDT-PNLF last updated for Haswell->KabyLake). The question is what needs to change.
Someone with the hardware needs to investigate...

Now I do like your idea of dumping what "IGPU registers change at that transition" and I did have a look at AppleIntelInfo.kext. The only problem is what IGPU registers and where do I find them defined? Can you give an example and I will implement the output of them so we can test this idea.

You have some ideas on key registers to monitor at 0xc8250, 0xc8254, 0xc8258...
Suggest you dump them from AppleIntelInfo.kext.
Also, reading the Linux PRMs for CFL if available or any Intel datasheet/programming guide for CFL might be helpful.
 
0xc8250 is already set to 0xC0000000 in SSDT-PNLF.

Yes but writing the backlight level to 0xC8254 the same way as KBL is the wrong part. Right now it's best to not write anything.

We already suspect something has changed in CFL. That is not in question (SSDT-PNLF last updated for Haswell->KabyLake). The question is what needs to change.
Someone with the hardware needs to investigate...

Well the answers are in the decompiled CFL FB kext I posted so you don't really need the hardware to help decipher it.

You have some ideas on key registers to monitor at 0xc8250, 0xc8254, 0xc8258...
Suggest you dump them from AppleIntelInfo.kext.
Also, reading the Linux PRMs for CFL if available or any Intel datasheet/programming guide for CFL might be helpful.

Can you give an example of reading 0xc8250 in AppleIntelInfo? I've looked at it and the source for IntelBacklight. Since IntelBacklight registers as a IOPCIDevice it reads the registers from there. I can't see how to do that from AppleIntelInfo.
 
Last edited:
Yes but writing the backlight level to 0xC8254 the same way as KBL is the wrong part. Right now it's best to not write anything.

As per comments in SSDT-RMCF.dsl, you can set RMCF.BKLT bit 1 to 1 and then this register is not set.

Well the answers are in the decompiled CFL FB kext I posted so you don't really need the hardware to help decipher it.

No hardware like this here, so no reason for me to work on it...
This is up to the community with the hardware to solve and contribute the solution.
I'm just trying to nudge those that have hardware into finding a solution on their own.

Can you give an example of reading 0xc8250 in AppleIntelInfo? I've looked at it and the source for IntelBacklight. Since IntelBacklight registers as a IOPCIDevice it reads the registers from there. I can't see how to do that from AppleIntelInfo.

Borrow the required code from IntelBacklight.kext and add it to AppleIntelInfo.kext.
 
Borrow the required code from IntelBacklight.kext and add it to AppleIntelInfo.kext.

Actually it looks like AppleIntelInfo can already dump these registers by setting the REPORT_INTEL_REGS define to 1. Not getting anything yet though. Possibly need to add Coffee Lake specific code. Will report back here when I get it working.

EDIT: Okay also had to enable logIntelRegs in the plist
EDIT2: It freezes on my machine when logging registers is enabled :(
 
Last edited:
Actually it looks like AppleIntelInfo can already dump these registers by setting the REPORT_INTEL_REGS define to 1. Not getting anything yet though. Possibly need to add Coffee Lake specific code. Will report back here when I get it working.

EDIT: Okay also had to enable logIntelRegs in the plist
EDIT2: It freezes on my machine when logging registers is enabled :(

Fun, eh?
 

What have I gotten myself into? lol

I've added a bunch of Coffee Lake specific code. I once got actual output without freezing but all register values were 0xFFFFFFFF so that's not a good sign.

In the OSBundleLibaries Piker has the version of com.apple.kpi.libkern set to 10.4. Do you think I need a newer version?
 
What have I gotten myself into? lol

I've added a bunch of Coffee Lake specific code. I once got actual output without freezing but all register values were 0xFFFFFFFF so that's not a good sign.

Yeah, not a good sign... something is off.
Maybe start with PCI based code in IntelBacklight.kext (that kext actually works when called...).

In the OSBundleLibaries Piker has the version of com.apple.kpi.libkern set to 10.4. Do you think I need a newer version?

As long as the kext loads, it should be fine.
 
What have I gotten myself into? lol

FYI: I notice sherlocks is doing some fiddling in the Clover code related to Intel backlight init.
 
FYI: I notice sherlocks is doing some fiddling in the Clover code related to Intel backlight init.
Yeah I've been trying to help him with the CFL code but so far no luck.
 
Back
Top