Contribute
Register

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

Attachments

  • IMG_20181017_011913.jpg.zip
    1.6 MB · Views: 64

Attachments

  • debug_1256.zip
    2.7 MB · Views: 64
Had to drop the SSDT-PNLF.aml for this. Everything is as it is.

MacBookPro14,3 is the wrong choice. Use MacBookPro14,1 or MacBookPro11,1.

AppleBacklightInjector.kext is replaced by AppleBacklightFixup.kext. Don't forget to remove the KextsToPatch entry.
See guide for details:
https://www.tonymacx86.com/threads/...ontrol-using-applebacklightfixup-kext.218222/

Please use RehabMan Clover build too.
See guide:
https://www.tonymacx86.com/threads/guide-booting-the-os-x-installer-on-laptops-with-clover.148093/
 
There was a flicker for some time when the boot sequence was complete. Otherwise everything else is working. The backlight works. No stall was there. It seems the stall was due to an audio problem. It has been there since I removed gfxhda.kext. When booting without the option of resetting HDA I had no stall. Also a bit of flickering is there while using the laptop.

EDIT 1: Sad to say, it was one of those less often happenings where backlight remained. The issue is still there. Using the AppleBacklightFixup.kext the slider is working. Also the backlight goes off at the end of the boot sequence as it did originally. All other things remain same. PR files updated.

EDIT2: After testing it more, found that after a few hot boots, the backlight works without any flicker. From what I found, It is that initially the backlight would go off at the start. After 2-3 hot boots the backlight would go off at the end of boot sequence. After 2-3 more hot boots the backlight would not go off. It will remain there for as many times you want to hot boot after that. PR files added as edit2.zip for this succesful boot.

EDIT 3: Wrong again. It again has returned to chance.
 

Attachments

  • debug_12812.zip
    2.1 MB · Views: 45
  • edit2.zip
    2.2 MB · Views: 70
Last edited:
Remove the kernel flag for the WEG fix.

If anyone is using my latest patch then the kernel flag is no longer used. The patch is enabled by default. You will actually need igfxcflbklt=none boot flag to disable it.

I had a look at your latest SSDT-PNLF. Where is the actual calculation for BXT_BLC_PWM_DUTY1?
 
I'll tell you how I got the backlight slider working for my system but I still recommend you follow RehabMan's directions as he's far more experienced in this area than me.

1. Download and install RehabMan's version of MaciASL from here
2. Run MaciASL
3. Choose Preferences from the MaciASL menu bar
4. Select Sources
5. Click the [+] button
6. Give it a name (eg. "Laptop Patches")
7. Type the following URL: http://raw.github.com/RehabMan/Laptop-DSDT-Patch/master
8. Copy your DSDT.aml file to /EFI/CLOVER/ACPI/patched and then open it in MaciASL
9. Click the "Patch" icon and select "[igpu] Brightness fix (ACPI 100)" from the list
10. It should say "4 Patches, 1 Change, 0 Rejects"
11. Click Apply button
12. Click the Compile button
13. You will get several errors Eg. "Object not found or not accessible from scope (^^DD02._BCM)"
14. Double click the first error to jump to it
15. Now carefully copy/paste this code over the top of the relevant ACPI code:
Code:
                       // _BCM/_BQC: set/get for brightness level
                       Method (_BCM, 1, NotSerialized)
                       {
                           // Update backlight via existing DSDT methods
                           External(^^DD1F._BCM, MethodObj)
                           ^^DD1F._BCM(Arg0)
                       }
                       Method (_BQC, 0, NotSerialized)
                       {
                           External(^^DD1F._BQC, MethodObj)
                           Return(^^DD1F._BQC())
                       }
                       Method (_BCL, 0, NotSerialized)
                       {
                           External(^^DD1F._BCL, MethodObj)
                           Return(^^DD1F._BCL())
                       }
                       Method (_DOS, 1, NotSerialized)
                       {
                           External(^^_DOS, MethodObj)
                           ^^_DOS(Arg0)
                       }
                       // extended _BCM/_BQC for setting "in between" levels
                       Method (XBCM, 1, NotSerialized)
                       {
                           // Update backlight via existing DSDT methods
                           ^^DD1F._BCM(Arg0)
                       }
                       Method (XBQC, 0, NotSerialized)
                       {
                           Return(^^DD1F._BQC())
                       }
16. Hit Compile again and it should not show any errors
17. Save your changes and reboot

I had tried this method. Sadly no PR files because I was not able to boot as it stalled.
 
There was a flicker for some time when the boot sequence was complete. Otherwise everything else is working. The backlight works. No stall was there. It seems the stall was due to an audio problem. It has been there since I removed gfxhda.kext. When booting without the option of resetting HDA I had no stall. Also a bit of flickering is there while using the laptop.

EDIT 1: Sad to say, it was one of those less often happenings where backlight remained. The issue is still there. Using the AppleBacklightFixup.kext the slider is working. Also the backlight goes off at the end of the boot sequence as it did originally. All other things remain same. PR files updated.

EDIT2: After testing it more, found that after a few hot boots, the backlight works without any flicker. From what I found, It is that initially the backlight would go off at the start. After 2-3 hot boots the backlight would go off at the end of boot sequence. After 2-3 more hot boots the backlight would not go off. It will remain there for as many times you want to hot boot after that. PR files added as edit2.zip for this succesful boot.

Your files still show poor SMBIOS choice.

I think it is a bad sign that AppleBacklightAtBoot is showing as 0x2f2f6.
We expect this value to be 0xFFFF or less.
Note:
Screen Shot 2018-10-16 at 4.34.40 PM.png

It means SSDT-PNLF.aml is not doing what we expect it to do.
It would require some debugging with ACPIDebug.kext.
I will try to create an instrumented SSDT-PNLF.aml in a bit.
 
Last edited:
I had a look at your latest SSDT-PNLF. Where is the actual calculation for BXT_BLC_PWM_DUTY1?
This is the CFL related code:
Code:
                if (Ones == Local2) { Local2 = COFFEELAKE_PWMMAX }
                INI1(Local4)
                // change/scale only if different than current...
                Local1 = ^LEVX
                If (!Local1) { Local1 = Local2 }
                If (Local2 != Local1)
                {
                    // set new backlight PWMMax but retain current backlight level by scaling
                    Local0 = (^LEVD * Local2) / Local1
                    //REVIEW: wait for vblank before setting new PWM config
                    //For (Local7 = ^P0BL, ^P0BL == Local7, ) { }
                    If (Local2 > Local1)
                    {
                        // PWMMax is getting larger... store new PWMMax first
                        ^LEVX = Local2
                        ^LEVD = Local0
                    }
                    Else
                    {
                        // otherwise, store new brightness level, followed by new PWMMax
                        ^LEVD = Local0
                        ^LEVX = Local2
                    }
                }

^LEVX is BXT_BLC_PWM_FREQ1
^LEVD is BXT_BLC_PWM_DUTY1

Code:
        OperationRegion(RMB1, SystemMemory, BAR1 & ~0xF, 0xe1184)
        Field(RMB1, AnyAcc, Lock, Preserve)
        {
            Offset(0x48250),
            LEV2, 32,
            LEVL, 32,
            Offset(0x70040),
            P0BL, 32,
            Offset(0xc2000),
            GRAN, 32,
            Offset(0xc8250),
            LEVW, 32,
            LEVX, 32,
            LEVD, 32,
            Offset(0xe1180),
            PCHL, 32,
        }

The idea is to set a new LEVX and LEVD but to retain the same effective value of LEVD/LEVX, same as done for the other IGPUs.

I think we are going to need some debug instrumentation.
 
This is the CFL related code:
Code:
                if (Ones == Local2) { Local2 = COFFEELAKE_PWMMAX }
                INI1(Local4)
                // change/scale only if different than current...
                Local1 = ^LEVX
                If (!Local1) { Local1 = Local2 }
                If (Local2 != Local1)
                {
                    // set new backlight PWMMax but retain current backlight level by scaling
                    Local0 = (^LEVD * Local2) / Local1
                    //REVIEW: wait for vblank before setting new PWM config
                    //For (Local7 = ^P0BL, ^P0BL == Local7, ) { }
                    If (Local2 > Local1)
                    {
                        // PWMMax is getting larger... store new PWMMax first
                        ^LEVX = Local2
                        ^LEVD = Local0
                    }
                    Else
                    {
                        // otherwise, store new brightness level, followed by new PWMMax
                        ^LEVD = Local0
                        ^LEVX = Local2
                    }
                }

^LEVX is BXT_BLC_PWM_FREQ1
^LEVD is BXT_BLC_PWM_DUTY1

Code:
        OperationRegion(RMB1, SystemMemory, BAR1 & ~0xF, 0xe1184)
        Field(RMB1, AnyAcc, Lock, Preserve)
        {
            Offset(0x48250),
            LEV2, 32,
            LEVL, 32,
            Offset(0x70040),
            P0BL, 32,
            Offset(0xc2000),
            GRAN, 32,
            Offset(0xc8250),
            LEVW, 32,
            LEVX, 32,
            LEVD, 32,
            Offset(0xe1180),
            PCHL, 32,
        }

The idea is to set a new LEVX and LEVD but to retain the same effective value of LEVD/LEVX, same as done for the other IGPUs.

I think we are going to need some debug instrumentation.

There is no RMB1 operation region in my DSDT.
 
Back
Top