Contribute
Register

Razer Blade 15 - High Sierra 10.13.6 - Success(-)

Status
Not open for further replies.
I'm running 17G2208 and using the native Coffee Lake Framebuffer with the 3e9b0000 platform-id and this patch didn't work for me, it actually broke brightness entirely.

But maybe I'm using it wrong, what exactly is the Whatevername for? I tried running it and I have no idea where to start with it. I installed the whatevergreen.kext from your package and I booted with no brightness at all, not even after 3 minutes. Is there some trick to installing the patch?

I don't know what Whatevername is for, the WEG build process includes it in the package and I didn't remove it. You can ignore it, I only changed the kext.

Did it break by having the panel stuck full-bright? or stuck turned off?

If you can, open a terminal on the machine after it boots with broken backlight control and run:
Code:
sudo dmesg | grep wrapHwSetPanelPowerConfig
and paste the result. If the backlight doesn't come up (and you can't see anything), I guess you'll have to ssh into it.


Here's the ACPI patch (for SSDT-2-SaSsdt) that I also had to apply to enable the native brightness control, in case you were doing something different to get that working. I got this from somewhere else as a generic "enable native brightness control" patch.

Code:
diff --git a/SSDT-2-SaSsdt.dsl b/SSDT-2-SaSsdt.dsl
index 4614d30..c454733 100644
--- a/SSDT-2-SaSsdt.dsl
+++ b/SSDT-2-SaSsdt.dsl
@@ -175,6 +175,62 @@ DefinitionBlock ("", "SSDT", 2, "SaSsdt", "SaSsdt ", 0x00003000)
 
     Scope (\_SB.PCI0.GFX0)
     {
+
+        /* BEGIN ACPI brightness fix */
+        Device (PNLF)
+        {
+            // normal PNLF declares (note some of this probably not necessary)
+            Name (_ADR, Zero)
+            Name (_HID, EisaId ("APP0002"))
+            Name (_CID, "backlight")
+            Name (_UID, 10)
+            Name (_STA, 0x0B)
+            // _BCM/_BQC: set/get for brightness level
+            Method (_BCM, 1, NotSerialized)
+            {
+                // Update backlight via existing DSDT methods
+                ^^DD1F._BCM(Arg0)
+            }
+            Method (_BQC, 0, NotSerialized)
+            {
+                Return(^^DD1F._BQC())
+            }
+            Method (_BCL, 0, NotSerialized)
+            {
+                Return(^^DD1F._BCL())
+            }
+            Method (_DOS, 1, NotSerialized)
+            {
+                ^^_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())
+            }
+            // Use XOPT=1 to disable smooth transitions
+            Name (XOPT, Zero)
+            // XRGL/XRGH: defines the valid range
+            Method (XRGL, 0, NotSerialized)
+            {
+                Store(_BCL(), Local0)
+                Store(DerefOf(Index(Local0, 2)), Local0)
+                Return(Local0)
+            }
+            Method (XRGH, 0, NotSerialized)
+            {
+                Store(_BCL(), Local0)
+                Store(DerefOf(Index(Local0, Subtract(SizeOf(Local0), 1))), Local0)
+                Return(Local0)
+            }
+        }
+        /* END ACPI brightness fix */
+
         Method (_DOS, 1, NotSerialized)  // _DOS: Disable Output Switching
         {
             Store (And (Arg0, 0x07), DSEN)
 
Here's the ACPI patch (for SSDT-2-SaSsdt) that I also had to apply to enable the native brightness control, in case you were doing something different to get that working. I got this from somewhere else as a generic "enable native brightness control" patch.

Code:
diff --git a/SSDT-2-SaSsdt.dsl b/SSDT-2-SaSsdt.dsl
index 4614d30..c454733 100644
--- a/SSDT-2-SaSsdt.dsl
+++ b/SSDT-2-SaSsdt.dsl
@@ -175,6 +175,62 @@ DefinitionBlock ("", "SSDT", 2, "SaSsdt", "SaSsdt ", 0x00003000)
 
     Scope (\_SB.PCI0.GFX0)
     {
+
+        /* BEGIN ACPI brightness fix */
+        Device (PNLF)
+        {
+            // normal PNLF declares (note some of this probably not necessary)
+            Name (_ADR, Zero)
+            Name (_HID, EisaId ("APP0002"))
+            Name (_CID, "backlight")
+            Name (_UID, 10)
+            Name (_STA, 0x0B)
+            // _BCM/_BQC: set/get for brightness level
+            Method (_BCM, 1, NotSerialized)
+            {
+                // Update backlight via existing DSDT methods
+                ^^DD1F._BCM(Arg0)
+            }
+            Method (_BQC, 0, NotSerialized)
+            {
+                Return(^^DD1F._BQC())
+            }
+            Method (_BCL, 0, NotSerialized)
+            {
+                Return(^^DD1F._BCL())
+            }
+            Method (_DOS, 1, NotSerialized)
+            {
+                ^^_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())
+            }
+            // Use XOPT=1 to disable smooth transitions
+            Name (XOPT, Zero)
+            // XRGL/XRGH: defines the valid range
+            Method (XRGL, 0, NotSerialized)
+            {
+                Store(_BCL(), Local0)
+                Store(DerefOf(Index(Local0, 2)), Local0)
+                Return(Local0)
+            }
+            Method (XRGH, 0, NotSerialized)
+            {
+                Store(_BCL(), Local0)
+                Store(DerefOf(Index(Local0, Subtract(SizeOf(Local0), 1))), Local0)
+                Return(Local0)
+            }
+        }
+        /* END ACPI brightness fix */
+
         Method (_DOS, 1, NotSerialized)  // _DOS: Disable Output Switching
         {
             Store (And (Arg0, 0x07), DSEN)

It is essentially my "Brightness Fix (ACPI 100)" patch from my laptop patch repo.
 
I don't know what Whatevername is for, the WEG build process includes it in the package and I didn't remove it. You can ignore it, I only changed the kext.

Did it break by having the panel stuck full-bright? or stuck turned off?

If you can, open a terminal on the machine after it boots with broken backlight control and run:
Code:
sudo dmesg | grep wrapHwSetPanelPowerConfig
and paste the result. If the backlight doesn't come up (and you can't see anything), I guess you'll have to ssh into it.


Here's the ACPI patch (for SSDT-2-SaSsdt) that I also had to apply to enable the native brightness control, in case you were doing something different to get that working. I got this from somewhere else as a generic "enable native brightness control" patch.

Code:
diff --git a/SSDT-2-SaSsdt.dsl b/SSDT-2-SaSsdt.dsl
index 4614d30..c454733 100644
--- a/SSDT-2-SaSsdt.dsl
+++ b/SSDT-2-SaSsdt.dsl
@@ -175,6 +175,62 @@ DefinitionBlock ("", "SSDT", 2, "SaSsdt", "SaSsdt ", 0x00003000)
 
     Scope (\_SB.PCI0.GFX0)
     {
+
+        /* BEGIN ACPI brightness fix */
+        Device (PNLF)
+        {
+            // normal PNLF declares (note some of this probably not necessary)
+            Name (_ADR, Zero)
+            Name (_HID, EisaId ("APP0002"))
+            Name (_CID, "backlight")
+            Name (_UID, 10)
+            Name (_STA, 0x0B)
+            // _BCM/_BQC: set/get for brightness level
+            Method (_BCM, 1, NotSerialized)
+            {
+                // Update backlight via existing DSDT methods
+                ^^DD1F._BCM(Arg0)
+            }
+            Method (_BQC, 0, NotSerialized)
+            {
+                Return(^^DD1F._BQC())
+            }
+            Method (_BCL, 0, NotSerialized)
+            {
+                Return(^^DD1F._BCL())
+            }
+            Method (_DOS, 1, NotSerialized)
+            {
+                ^^_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())
+            }
+            // Use XOPT=1 to disable smooth transitions
+            Name (XOPT, Zero)
+            // XRGL/XRGH: defines the valid range
+            Method (XRGL, 0, NotSerialized)
+            {
+                Store(_BCL(), Local0)
+                Store(DerefOf(Index(Local0, 2)), Local0)
+                Return(Local0)
+            }
+            Method (XRGH, 0, NotSerialized)
+            {
+                Store(_BCL(), Local0)
+                Store(DerefOf(Index(Local0, Subtract(SizeOf(Local0), 1))), Local0)
+                Return(Local0)
+            }
+        }
+        /* END ACPI brightness fix */
+
         Method (_DOS, 1, NotSerialized)  // _DOS: Disable Output Switching
         {
             Store (And (Arg0, 0x07), DSEN)

Are you using a generic SSDT-2-SaSSsdt.dsl for this patch? I just tried to patch my own SSDT-2-SaSSsdt.dsl with it and I got a massive amount of errors while trying to compile.
Currently I'm using the SSDT-PNLF from Rehab Man for my brightness control fix.

And that version of Whatevergreen breaks brightness stuck off. I'll install it again and get the results of wrapHwSetPanelPowerConfig
 
Are you using a generic SSDT-2-SaSSsdt.dsl for this patch? I just tried to patch my own SSDT-2-SaSSsdt.dsl with it and I got a massive amount of errors while trying to compile.
Currently I'm using the SSDT-PNLF from Rehab Man for my brightness control fix.

And that version of Whatevergreen breaks brightness stuck off. I'll install it again and get the results of wrapHwSetPanelPowerConfig

No, I decompiled and patched my own DSDT/SSDTs. I've attached the entire patched SSDT-2-SaSsdt.dsl file for reference. I'm on BIOS 1.05. (There were basically no changes in this SSDT between 1.00 and 1.05, though, so it shouldn't matter).

Don't just compile this SSDT and drop it in, though -- there are some offsets for system config regions in this file that will probably be different on your machine. (Lines starting with OperationRegion in particular). If you want to use it, only merge the PCI0.GFX0 section into your decompiled copy.
 

Attachments

  • SSDT-2-SaSsdt.dsl
    81.8 KB · Views: 76
No, I decompiled and patched my own DSDT/SSDTs. I've attached the entire patched SSDT-2-SaSsdt.dsl file for reference. I'm on BIOS 1.05. (There were basically no changes in this SSDT between 1.00 and 1.05, though, so it shouldn't matter).

Don't just compile this SSDT and drop it in, though -- there are some offsets for system config regions in this file that will probably be different on your machine. (Lines starting with OperationRegion in particular). If you want to use it, only merge the PCI0.GFX0 section into your decompiled copy.

Well I got the patch to work with my SSDT. Laptop booted with full brightness this time around, but I had no brightness control. The output of the command in terminal was:
WhateverGreen: igfx @ wrapHwSetPanelPowerConfig(): BXT_BLC_PWM_FREQ1=0x1d4c0, AIFBC PWM freq=0x1d4c0

WhateverGreen: igfx @ wrapHwSetPanelPowerConfig(): BXT_BLC_PWM_FREQ1=0x1d4c0, AIFBC PWM freq=0x1d4c0

WhateverGreen: igfx @ wrapHwSetPanelPowerConfig(): BXT_BLC_PWM_FREQ1=0x1d4c0, AIFBC PWM freq=0x1d4c0

WhateverGreen: igfx @ wrapHwSetPanelPowerConfig(): BXT_BLC_PWM_FREQ1=0x1d4c0, AIFBC PWM freq=0x1d4c0

WhateverGreen: igfx @ wrapHwSetPanelPowerConfig(): BXT_BLC_PWM_FREQ1=0x1d4c0, AIFBC PWM freq=0x1d4c0


To top it off, with that SSDT patched and that version of Whatever green, every 60 seconds the laptop tried to put itself to sleep, even if I was typing or doing something. Also somehow this broke my trackpad, even after reverting back to my previous set up, I still have no trackpad. Gotta figure this one out.
 
Well I got the patch to work with my SSDT. Laptop booted with full brightness this time around, but I had no brightness control. The output of the command in terminal was:
WhateverGreen: igfx @ wrapHwSetPanelPowerConfig(): BXT_BLC_PWM_FREQ1=0x1d4c0, AIFBC PWM freq=0x1d4c0

WhateverGreen: igfx @ wrapHwSetPanelPowerConfig(): BXT_BLC_PWM_FREQ1=0x1d4c0, AIFBC PWM freq=0x1d4c0

WhateverGreen: igfx @ wrapHwSetPanelPowerConfig(): BXT_BLC_PWM_FREQ1=0x1d4c0, AIFBC PWM freq=0x1d4c0

WhateverGreen: igfx @ wrapHwSetPanelPowerConfig(): BXT_BLC_PWM_FREQ1=0x1d4c0, AIFBC PWM freq=0x1d4c0

WhateverGreen: igfx @ wrapHwSetPanelPowerConfig(): BXT_BLC_PWM_FREQ1=0x1d4c0, AIFBC PWM freq=0x1d4c0


To top it off, with that SSDT patched and that version of Whatever green, every 60 seconds the laptop tried to put itself to sleep, even if I was typing or doing something. Also somehow this broke my trackpad, even after reverting back to my previous set up, I still have no trackpad. Gotta figure this one out.

Well, that's certainly unexpected. Neither the WEG or SSDT patches touch anything related to the trackpad or sleep/wake.

If you have no brightness control, either something went wrong when you applied the SSDT patch, or maybe you have another SSDT that's adding more stuff into \_SB_.PCI0.GFX0 and overwriting it.

The BXT_BLC_PWM_FREQ1 register on your machine is set the same as on mine, and the patch is loaded, so at least that's working as expected.

I would probably re-dump a fresh copy of the SSDT and reapply your patches. I had a lot of trouble when bringing up this machine with stale DSDT and SSDTs causing weird hardware issues. Any BIOS config or hardware changes cause the OperationRegion values in the DSDT and some of the SSDTs to shift around -- if you're using one with old values, random things will stop working.
 
Well, that's certainly unexpected. Neither the WEG or SSDT patches touch anything related to the trackpad or sleep/wake.

If you have no brightness control, either something went wrong when you applied the SSDT patch, or maybe you have another SSDT that's adding more stuff into \_SB_.PCI0.GFX0 and overwriting it.

The BXT_BLC_PWM_FREQ1 register on your machine is set the same as on mine, and the patch is loaded, so at least that's working as expected.

I would probably re-dump a fresh copy of the SSDT and reapply your patches. I had a lot of trouble when bringing up this machine with stale DSDT and SSDTs causing weird hardware issues. Any BIOS config or hardware changes cause the OperationRegion values in the DSDT and some of the SSDTs to shift around -- if you're using one with old values, random things will stop working.

I'll revisit this in the morning when I have time to play with it. I'll re-dump a fresh copy of my SSDT's and DSDT and re-patch them and see what happens. Once I get the trackpad up and running I'll try your patch again and see if it works
 
I'll revisit this in the morning when I have time to play with it. I'll re-dump a fresh copy of my SSDT's and DSDT and re-patch them and see what happens. Once I get the trackpad up and running I'll try your patch again and see if it works

You might want to ask yourself why you're patching SSDTs...
 
Well, that's certainly unexpected. Neither the WEG or SSDT patches touch anything related to the trackpad or sleep/wake.

If you have no brightness control, either something went wrong when you applied the SSDT patch, or maybe you have another SSDT that's adding more stuff into \_SB_.PCI0.GFX0 and overwriting it.

The BXT_BLC_PWM_FREQ1 register on your machine is set the same as on mine, and the patch is loaded, so at least that's working as expected.

I would probably re-dump a fresh copy of the SSDT and reapply your patches. I had a lot of trouble when bringing up this machine with stale DSDT and SSDTs causing weird hardware issues. Any BIOS config or hardware changes cause the OperationRegion values in the DSDT and some of the SSDTs to shift around -- if you're using one with old values, random things will stop working.

Hey, possible can you write a guide and provide us the efi and the files that we need? would be awesome to make it work fully. I think we would be super grateful to you.
 
You might want to ask yourself why you're patching SSDTs...

I think you understand what I meant. It was a general statement, mostly geared towards patching the DSDT and the one single SSDT that we've been referencing the past few reply's to try and fix the 3 minute black screen bug.
 
Status
Not open for further replies.
Back
Top