Jump to content

Dr. Hurt

Dr. Hurt

Member Since 29 Jan 2006
Offline Last Active Yesterday, 08:50 PM
*****

Posts I've Made

In Topic: Clover General discussion

08 September 2017 - 06:07 PM

Updated to Clover 4200, all working perfectly. Full backlight range, save/restore across reboots -- working natively with stock Apple kexts :D

 

Thanks Slice, syscl, and everyone else.

In Topic: Clover General discussion

07 September 2017 - 06:45 AM

Here's how to use the new custom value: #73

 

BTW, I think SetIntelBacklight should be deprecated/removed now that we have this.

In Topic: Clover General discussion

07 September 2017 - 06:14 AM

Thank you for this information. The problem is when a user set this boolean key without paying attention just like me setting this boolean value on XPS 13..
 
IMHO, it's better to initialized LevelMaxW correctly, otherwise let users to set LevelMaxW.
 
syscl


My proposed code only was only for Sandy/Ivy (as stated in Clover Changes thread).
Update your code using values from 14353 and try it out.

 

EDIT: Here's a quick fix.

 

--- rEFIt_UEFI/Platform/Settings.c    (revision 4195)
+++ rEFIt_UEFI/Platform/Settings.c    (working copy)
@@ -6603,7 +6603,35 @@
(Pci.Hdr.ClassCode[1] == PCI_CLASS_DISPLAY_OTHER))) {

UINT32 LevelW = 0xC0000000;
- UINT32 LevelMaxW = 0x07100000;
+ // syscl: set PWMMax base on platform
+ // 10: Sandy/Ivy 0x710
+ // 11: Haswell/Broadwell 0xad9
+ // 12: Skylake/KabyLake 0x56c (and some Haswell, example 0xa2e0008)
+ // 99: Other
+ UINT32 LevelMaxW = 0;
+ switch (gCPUStructure.Model) {
+ case CPU_MODEL_SANDY_BRIDGE:

+ case CPU_MODEL_IVY_BRIDGE:
+ LevelMaxW = 0x07100000;
+ break;
+

+ case CPU_MODEL_HASWELL:
+ case CPU_MODEL_HASWELL_ULT:
+ case CPU_MODEL_HASWELL_U5:
+ case CPU_MODEL_CRYSTALWELL:
+ case CPU_MODEL_BROADWELL_HQ:
+ LevelMaxW = 0xad900000;
+ break;
+
+ case CPU_MODEL_SKYLAKE_U:
+ case CPU_MODEL_KABYLAKE1:
+ case CPU_MODEL_KABYLAKE2:
+ LevelMaxW = 0x56c00000;
+ break;
+
+ default:
+ break;
+ }
UINT32 IntelDisable = 0x03;

// gGraphics.DeviceID = Pci.Hdr.DeviceId;

In Topic: Clover General discussion

07 September 2017 - 05:41 AM

@Slice

SetIntelMaxBacklight=True indeed turn my screen into darkvoid on XPS 13 9350(Skylake Iris Model). Thus better to set LevelMaxW depends on the platform, here's the code I change such that XPS 13 9350 won't have a black screen with SetIntelMaxBacklight

--- rEFIt_UEFI/Platform/Settings.c	(revision 4195)+++ rEFIt_UEFI/Platform/Settings.c	(working copy)@@ -6603,7 +6603,35 @@              (Pci.Hdr.ClassCode[1] == PCI_CLASS_DISPLAY_OTHER))) {                UINT32 LevelW = 0xC0000000;-              UINT32 LevelMaxW = 0x07100000;+              // syscl: set PWMMax base on platform+              // 10: Sandy/Ivy 0x710+              // 11: Haswell/Broadwell 0xad9+              // 12: Skylake/KabyLake 0x56c (and some Haswell, example 0xa2e0008)+              // 99: Other+              UINT32 LevelMaxW = 0;+              switch (gCPUStructure.Model) {+                  case CPU_MODEL_SANDY_BRIDGE:+                      LevelMaxW = 0x07100000;+                      break;+                      +                  case CPU_MODEL_IVY_BRIDGE:+                      LevelMaxW = 0xad900000;+                      break;+                      +                  case CPU_MODEL_HASWELL:+                  case CPU_MODEL_HASWELL_ULT:+                  case CPU_MODEL_HASWELL_U5:+                  case CPU_MODEL_CRYSTALWELL:+                  case CPU_MODEL_BROADWELL_HQ:+                  case CPU_MODEL_SKYLAKE_U:+                  case CPU_MODEL_KABYLAKE1:+                  case CPU_MODEL_KABYLAKE2:+                      LevelMaxW = 0x56c00000;+                      break;+                      +                  default:+                      break;+              }               UINT32 IntelDisable = 0x03;                //        gGraphics.DeviceID = Pci.Hdr.DeviceId;
Could you test if it works on your laptop as well? Thank you in advance.

syscl
Sandy/Ivy should be the same. Haswell and skylake should be separate.
See post 14353

Edit: Slice made the value customizable via confit.plist. That would make it easier to experiment.

In Topic: Clover General discussion

06 September 2017 - 02:42 PM

Yeah that's what I thought, so I did it on my Haswell laptop before and it made no difference with my backlight.

Sent from my SM-G930F using Tapatalk

 

I wasn't sure that the max brightness issue affected newer models.

 

Anyway, for Haswell and Broadwell, LEVX should be 0x0AD90000 and Skylake and Kabylake should be 0x056C0000.

 

Perhaps this patch should be dynamic according to device id / CPU model. Or maybe customizable in config.plist

© 2016 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy