Contribute
Register

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

Status
Not open for further replies.
This is my unpacthed DSDT.aml

Thanks.
Added the required/corrected additional patch to github:
Code:
NUC6i7KYK:laptop.git rehabman$ git diff
diff --git a/battery/battery_Razer-Blade-2014.txt b/battery/battery_Razer-Blade-2014.txt
index 1759840..04c08f9 100644
--- a/battery/battery_Razer-Blade-2014.txt
+++ b/battery/battery_Razer-Blade-2014.txt
@@ -9,6 +9,7 @@
 #  Razer Blade Stealth (Kaby Lake), per BlenderSleuth
 #  Razer Blade (14", late 2016)
 #  Razer Blade Pro (2017)
+#  Razer Blade 15 (2015), per JomanJi/blodtanner
 into method label B1B2 remove_entry;
 into definitionblock code_regex . insert
@@ -36,6 +37,10 @@ into method label _BST code_regex \^\^EC0\.BST1, replaceall_matched begin B1B2(^
 into method label _BST code_regex \^\^EC0\.BST2, replaceall_matched begin B1B2(^^EC0.ST20,^^EC0.ST21), end;
 into method label _BST code_regex \^\^EC0\.BST3, replaceall_matched begin B1B2(^^EC0.ST30,^^EC0.ST31), end;
+# added for Razer Blade 15 (2015), per JomanJi
+into device label EC0 code_regex BIF0,\s+16, replace_matched begin IF00,8,IF01,8, end;
+into method label _BIF code_regex \(\^\^EC0.BIF0, replaceall_matched begin (B1B2(\^\^EC0.IF00,\^\^EC0.IF01), end;
+
 # utility methods to read/write buffers from/to EC
 into method label RE1B parent_label EC0 remove_entry;
 into method label RECB parent_label EC0 remove_entry
 
Thanks.
Added the required/corrected additional patch to github:
Code:
NUC6i7KYK:laptop.git rehabman$ git diff
diff --git a/battery/battery_Razer-Blade-2014.txt b/battery/battery_Razer-Blade-2014.txt
index 1759840..04c08f9 100644
--- a/battery/battery_Razer-Blade-2014.txt
+++ b/battery/battery_Razer-Blade-2014.txt
@@ -9,6 +9,7 @@
 #  Razer Blade Stealth (Kaby Lake), per BlenderSleuth
 #  Razer Blade (14", late 2016)
 #  Razer Blade Pro (2017)
+#  Razer Blade 15 (2015), per JomanJi/blodtanner
 into method label B1B2 remove_entry;
 into definitionblock code_regex . insert
@@ -36,6 +37,10 @@ into method label _BST code_regex \^\^EC0\.BST1, replaceall_matched begin B1B2(^
 into method label _BST code_regex \^\^EC0\.BST2, replaceall_matched begin B1B2(^^EC0.ST20,^^EC0.ST21), end;
 into method label _BST code_regex \^\^EC0\.BST3, replaceall_matched begin B1B2(^^EC0.ST30,^^EC0.ST31), end;
+# added for Razer Blade 15 (2015), per JomanJi
+into device label EC0 code_regex BIF0,\s+16, replace_matched begin IF00,8,IF01,8, end;
+into method label _BIF code_regex \(\^\^EC0.BIF0, replaceall_matched begin (B1B2(\^\^EC0.IF00,\^\^EC0.IF01), end;
+
 # utility methods to read/write buffers from/to EC
 into method label RE1B parent_label EC0 remove_entry;
 into method label RECB parent_label EC0 remove_entry

Thanks for adding my patch. Just a minor detail; model year is 2018, not 2015.
 
I replied to that thread (the debug files posted there prove that brightness was not implemented correctly... not even an attempt).

I did some digging around, and I notice that in the SSDT-PNLF there is really no branch for i7 8750h. We spoof 0x5916 to use skylake PWMMax.
// 0x5916, 0x5912, 0x591b, others...
Local2 = SKYLAKE_PWMMAX

How do I find out what the value is supposed to be? I read through the open source implementation for Linux drivers, but I was not able to find any references.

I also notice that in the SSDT-PNLF it returns a _UID,
If (Local2 == SANDYIVY_PWMMAX) { _UID = 14 }
how does that match up to the AppleBacklightInjector.kext injector, the panels segment (F14)?

I can make a patch for this (0x3e92), or a new SSDT-PNLF just for the razer, but just randomly trying PWMMAX values seems like it would take a while.

Update;
[ 10.776202] [drm:intel_bios_init [i915]] VBT initial LVDS value 300
[ 10.776317] [drm:intel_bios_init [i915]] VBT backlight PWM modulation frequency 200 Hz, active high, min brightness 30, level 255, controller 0

I found this dump from a linux forum for 3E92. 200 to hex doesn't seem to match the pwmmax values already in the SSDT-PNLF
 
Last edited:
I did some digging around, and I notice that in the SSDT-PNLF there is really no branch for i7 8750h. We spoof 0x5916 to use skylake PWMMax.
// 0x5916, 0x5912, 0x591b, others...
Local2 = SKYLAKE_PWMMAX

How do I find out what the value is supposed to be? I read through the open source implementation for Linux drivers, but I was not able to find any references.

I also notice that in the SSDT-PNLF it returns a _UID,
If (Local2 == SANDYIVY_PWMMAX) { _UID = 14 }
how does that match up to the AppleBacklightInjector.kext injector, the panels segment (F14)?

I can make a patch for this (0x3e92), or a new SSDT-PNLF just for the razer, but just randomly trying PWMMAX values seems like it would take a while.

Update;
[ 10.776202] [drm:intel_bios_init [i915]] VBT initial LVDS value 300
[ 10.776317] [drm:intel_bios_init [i915]] VBT backlight PWM modulation frequency 200 Hz, active high, min brightness 30, level 255, controller 0

I found this dump from a linux forum for 3E92. 200 to hex doesn't seem to match the pwmmax values already in the SSDT-PNLF
As per rules, please update your hardware profile to allow others to help you easier
https://www.tonymacx86.com/account/

please read the faq for proper hardware profile setup:
https://www.tonymacx86.com/threads/faq-read-first-laptop-frequent-questions.164990/
 
I did some digging around, and I notice that in the SSDT-PNLF there is really no branch for i7 8750h. We spoof 0x5916 to use skylake PWMMax.
// 0x5916, 0x5912, 0x591b, others...
Local2 = SKYLAKE_PWMMAX

How do I find out what the value is supposed to be? I read through the open source implementation for Linux drivers, but I was not able to find any references.

I also notice that in the SSDT-PNLF it returns a _UID,
If (Local2 == SANDYIVY_PWMMAX) { _UID = 14 }
how does that match up to the AppleBacklightInjector.kext injector, the panels segment (F14)?

I can make a patch for this (0x3e92), or a new SSDT-PNLF just for the razer, but just randomly trying PWMMAX values seems like it would take a while.

Update;
[ 10.776202] [drm:intel_bios_init [i915]] VBT initial LVDS value 300
[ 10.776317] [drm:intel_bios_init [i915]] VBT backlight PWM modulation frequency 200 Hz, active high, min brightness 30, level 255, controller 0

I found this dump from a linux forum for 3E92. 200 to hex doesn't seem to match the pwmmax values already in the SSDT-PNLF

In the thread I replied to, the user there is not spoofing KabyLake or Skylake (note: 0x5916 will spoof KabyLake, not Skylake).

If you need help, you must attach PR files as per FAQ.
No "Problem Reporting" files attached.
Read FAQ, "Problem Reporting" again. Carefully. Attach all requested files/output.
https://www.tonymacx86.com/threads/faq-read-first-laptop-frequent-questions.164990/
Use the gen_debug.sh tool mentioned in the FAQ, that way it is less likely you'll omit something.
 
https://01.org/sites/default/files/documentation/intel-gfx-prm-osrc-kbl-vol12-display.pdf
Page 144.

Different than
https://01.org/sites/default/files/documentation/intel-gfx-prm-osrc-skl-vol12-display.pdf
Page 189.

So the issue might be somewhere in here;
Local0 = (((^LEVX & 0xFFFF) * Local2) / Local1) | (Local2 << 16)
//REVIEW: wait for vblank before setting new PWM config
//For (Local7 = ^P0BL, ^P0BL == Local7, ) { }
^LEVX = Local0

I'm just brute forcing this problem since I don't know anything about what different registers do.

Update:
NVM, pretty sure this is related to pwmmax.
 
Last edited:
I downloaded RWEverything, and my BAR1 was at 0xAB000004.
I added 4824c. The first word is 0x80000000.
When I change brightness the next word doesn't change (every word is empty except 0x80000000).

Strange.

Update:
0x70040 -> lots of changes, nothing related to brightness
0xc8250 -> jackpot?
0x80000000, next word never changes but reads: 0001D4C0, next word changes with brightness.
Lowest brightness reads: 17DC, highest 1D4C0. I notice that this segment is repeated every 64 bytes.

When I manually change AB0C8258 the brightness does adjust. Changing any of the repeating 64 byte blocks doesn't do anything.

For completeness I checked 0xe1180. I cannot change any values at the other addresses, and no of them affect brightness.

So for this laptop the BAR1 is at
0xAB000004
Offset is
0xC8254 (pretty sure :) )
Max PWM(?) is 1D4C0, lowest is 17DC.
 
Last edited:
Status
Not open for further replies.
Back
Top