Jump to content
30960 posts in this topic

Recommended Posts

Feature request: Fix brightness range (max brightness) on 10.12.4+ (tested on HD3000)

         

 

Setting LEVX to 1007 (max brightness for Sandy Bridge) gives me full range of brightness using AppleBacklight.kext without having to binary patch. I think this could be implemented the same way as SetIntelBacklight (which doesn't fully work for me BTW, breaks brightness slider).

 

Hope more people find this useful.

Note that this is fixed with my SSDT-PNLF.aml.

(other fixes needed too: AppleBacklightInjector.kext + AppleBacklight patch)

Note that this is fixed with my SSDT-PNLF.aml.(other fixes needed too: AppleBacklightInjector.kext + AppleBacklight patch)

I only have the above code under igpu in DSDT and that gives me full brightness range.

I only have the above code under igpu in DSDT and that gives me full brightness range.

You will not have correct brightness levels without the appropriate data for AppleBacklight.kext.

'Default' (look in ioreg under PNLF->AppleIntelPanelA) will get you close, but not perfect.

And a side effect/feature of making a match, is that you can customize the levels.

Another thing to note: The code required is different for Haswell and later because the PWM registers are laid out differently, and the PWMMax used is also different (actually depends on ig-platform-id in use).

Feature request: Fix brightness range (max brightness) on 10.12.4+ (tested on HD3000)

         

 

Setting LEVX to 1007 (max brightness for Sandy Bridge) gives me full range of brightness using AppleBacklight.kext without having to binary patch. I think this could be implemented the same way as SetIntelBacklight (which doesn't fully work for me BTW, breaks brightness slider).

 

Hope more people find this useful.

I have to switch off this option too, it breaks brightness (Dell E6430 with Ivy).

I think your proposition can be applied as new option SetIntelMaxBacklight.

 

In my case brightness works with default clover FIX_PNLF. No new kexts.

In system I did the trick:

insert USB keyboard.

Control Panel -> Keyboard -> Shotcuts -> Screen (it appears due to USB keyboard). Thanks to Andrey1970.

and set Reduce brightness F1, Increase F2. Other key-combinations are not working.

  • Like 3

In my case brightness works with default clover FIX_PNLF. No new kexts.

Full brightness range requires patching AppleBacklight.kext Info.plist or an injector (like I use).

You will not get the lower levels if you match on 'Default'.

  • Like 1

Now i have a suggestion feature for kext load by clover.

 

Could we add an list in clover boot GUI to select or cancel one or more kext.

 

It is not just related with kext injection but also have good effect in update system.

 

Sometimes when i update osx it shows kernel panic and i find the kext cause it but i must use such as PE to delete this kext to make me update successfully.

 

If we have this list option can cancel some kext injection it will be more convenient for us to avoid some strange kernel panic which related to some unstable or incompatible kexts.

 

Thanks.

 

 

从我的 iPhone 发送,使用 Tapatalk

Now i have a suggestion feature for kext load by clover.

 

Could we add an list in clover boot GUI to select or cancel one or more kext.

 

It is not just related with kext injection but also have good effect in update system.

 

Sometimes when i update osx it shows kernel panic and i find the kext cause it but i must use such as PE to delete this kext to make me update successfully.

 

If we have this list option can cancel some kext injection it will be more convenient for us to avoid some strange kernel panic which related to some unstable or incompatible kexts.

 

Thanks.

 

 

从我的 iPhone 发送,使用 Tapatalk

I also think about this menu. Should be made.

Temporary you can use Shell provided with Clover to delete or move kexts from Clover folders.

fs0:>rm -r EFI\CLOVER\kexts\Other\Bad.kext

  • Like 4

Looks fine except for the bank number for the vendor. The bank number is 0x83 but the code expects 3 because it does not take into account that the most significant bit is an odd parity bit.

 

The code in file spd.c for DDR3 masks off the parity bit. Maybe the DDR4 code should do the same. Maybe both the DDR3 and DDR4 code should check the parity first and at least give an error message if it's wrong, then mask off the parity bit:

UINT8 parity = bank;
UINT8 testbit = bank;
for (i=6; i >= 0; i--) { parity ^= (testbit <<= 1); }
if ( (parity & 0x80) == 0 ) {
    DBG("Bad parity bank=0x%2X code=0x%2X\n", bank, code);
}
bank &= 0x7f;
Bank 3, code 0x13 is manufacturer "Geil". Is that correct for your ram?

 

How does this SPD data compare to the "Get Smbios" part of the log? Is there a valid manufacturer name there?

 

Thanks for the proposition. I committed it to 4193 and want to see tests.

Full brightness range requires patching AppleBacklight.kext Info.plist or an injector (like I use).

You will not get the lower levels if you match on 'Default'.

May be, but my simple method is enough for me.

Feature request: Fix brightness range (max brightness) on 10.12.4+ (tested on HD3000)

         

 

Setting LEVX to 1007 (max brightness for Sandy Bridge) gives me full range of brightness using AppleBacklight.kext without having to binary patch. I think this could be implemented the same way as SetIntelBacklight (which doesn't fully work for me BTW, breaks brightness slider).

 

Hope more people find this useful.

I will implement this but make please more accurate for the value

0x07100000

or

0x0710

or

or

0x1007

  • Like 2

Sometimes my GPU fails, mainly on coldboot. I have to make a restart to get the nvidiawebdriwers to work.

 I am using Lilu and NvidiaFixup kexts, and I use iMac 17,1 and 18,3 smbioses

 

 

2017-09-06 07:10:47.897014+0200  localhost kernel[0]: (NVDAStartupWeb) <NVDAStartupWeb`NVDAStartupWeb::probe(IOService*, int*)> NVDAStartupWeb: ERROR: failed to find NVRAM registry entry

 

 

<key>nvda_drv</key>
<data>
MQA=
</data>

 

The nvram key / value pair for the webdrivrs are always present, what could be the problem?

 

Thank you very much. Saved me a lot of hard time :)

 

Thanks for the proposition. I committed it to 4193 and want to see tests.

May be, but my simple method is enough for me.

I will implement this but make please more accurate for the value

0x07100000

or

0x0710

or

<1007>

or

0x1007

 

0x07100000 is correct. (at least for Sandy/Ivy, newer iGPUs might need other values)

 

Just tested build 4194 with SetIntelMaxBacklight=True and it works perfectly. I get full range of brightness.  :D

  • Like 1

Thank you very much. Saved me a lot of hard time :)

 

 

0x07100000 is correct. (at least for Sandy/Ivy, newer iGPUs might need other values)

 

Just tested build 4194 with SetIntelMaxBacklight=True and it works perfectly. I get full range of brightness.  :D

Nice.

Can you find Intel datasheet for this setting?

Thank you very much. Saved me a lot of hard time :)

 

 

0x07100000 is correct. (at least for Sandy/Ivy, newer iGPUs might need other values)

 

Just tested build 4194 with SetIntelMaxBacklight=True and it works perfectly. I get full range of brightness.  :D

Where is this option? SetIntelMaxBacklight=True ?

Thanks for the proposition. I committed it to 4193 and want to see tests.

I tested SavageAUS's build 4194 and compared my debug log before and after. The output for ScanSPD is unchanged for me because my ram is DDR4 with vendor "G Skill Intl" which is from bank 4 in memvendors.h, which has odd parity bit set to 0, so it doesn't have the problem that vendors from bank 0, 3, 5, 6, and 9 have.

 

truesoldier should see an improvement in ScanSPD output because he has "Geil" ram (bank 3) which has the odd parity bit set.

  • Like 1

Thank you very much. Saved me a lot of hard time :)

 

 

0x07100000 is correct. (at least for Sandy/Ivy, newer iGPUs might need other values)

 

Just tested build 4194 with SetIntelMaxBacklight=True and it works perfectly. I get full range of brightness.  :D

Probably it should resolve old problem

kernel[0]: IG: Invalid firmware max backlight setting

:)

  • Like 1

You add it to config.plist under Devices.

 

Read this post: #71

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

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

  • Like 2

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

 

 

FYI ... 3 data points on Brightness from 3 systems

 

So for some reason (IIRC to get same brightness after sleep/wake) on my HD 3000 system

- I modify the SNB Framebuffer values to change brightness from 0x0710 (1808) to 0x1312 (4882).

- my brightness then ranges from 0x8c to 0x1312 (140 to 4882) as defined by AppleBacklightInjector

 

i set each to 50% (1/2 way on slider) brightness - note useable-linear-brightness - which is key to the range.

 

$ ioreg -l|grep Panel|grep -v Kit

ioreg -l|grep -i max|grep -i bright|grep -v Profile

    | |   | | |   "FeatureControl" = {"Watermarks"=1,"RenderStandby"=1,"GPUInterruptHandling"=1,"DPM"=1,"MaximumSelfRefreshLevel"=3,"Gamma"=1,"PowerStates"=1,"IgnorePanelTimings"=0,"UseInterruptFilter"=1,"SpreadON"=1,"CachedEDIDDisable"=0,"FastDisplayDetectDisable"=0,"FBC"=0,"SetRC6Voltage"=0}

    | | |   "ApplePanelRawBrightness" = 999

    | | +-o AppleIntelPanelA  <class AppleIntelPanelA, id 0x10000032d, !registered, !matched, active, busy 0, retain 5>

    | |       "IOClass" = "AppleIntelPanelA"

    | |       "ApplePanel" = {"F10T02e2"=<00110000008c00d80136018f01fe02a3034503e704c70535075a091c0b130d9b10591312>}

$  ioreg -l|grep -i max|grep -i bright|grep -v Profile

    | |   | | |       "IODisplayParameters" = {"commit"={"reg"=0},"fade-time2"={"min"=0,"max"=10000,"value"=4000},"linear-brightness-probe"={"min"=0,"max"=4882,"value"=999},"ggsc"={"min"=0,"max"=65536,"value"=65536},"gsc "={"min"=0,"max"=65536,"value"=0},"vblm"={"min"=0,"max"=196608,"value"=65536},"dsyp"={"min"=0,"max"=2,"value"=2},"rgsc"={"min"=0,"max"=65536,"value"=65536},"fade-style"={"min"=0,"max"=10,"value"=0},"fade-time1"={"min"=0,"max"=10000,"value"=500},"bgsc"={"min"=0,"max"=65536,"value"=65536},"brightness-probe"={"min"=0,"max"=1024,"value"=512},"fade-time3"={"min"=0,"max"=10000,"value"=500},"bklt"={"min"=0,"max"=4882,"value"=140},"linear-brightness"={"min"=0,"max"=4882,"value"=999},"brightness"={"max"=1024,"min"=0,"value"=512},"brightness-fade"={"min"=0,"max"=1023,"value"=0},"usable-linear-brightness"={"min"=140,"max"=4882,"value"=999}}

    | | |   "AppleMaxBrightness" = 4882

    | |       "IODisplayParameters" = {"brightness"={"max"=255,"min"=40},"commit"={"reg"=0}}

 

On my HD 4600 (Haswell) system, the maxBrightness seems to be 0xAD8 (2776) versus AD9?

 

 $ ioreg -l|grep Panel|grep -v Kit

    | | |   "ApplePanelRawBrightness" = 568

    | | +-o AppleIntelPanelA  <class AppleIntelPanelA, id 0x10000036f, !registered, !matched, active, busy 0, retain 5>

    | |       "IOClass" = "AppleIntelPanelA"

    | |       "ApplePanel" = {"F10T11ed"=<00110000004f007a00b000e30122017f01db023802b7035a042e052e064c07bc094b0ad8>}

$ ioreg -l|grep -i max|grep -i bright|grep -v Profile

    | |   | | |       "IODisplayParameters" = {"commit"={"reg"=0},"fade-time2"={"min"=0,"max"=10000,"value"=4000},"linear-brightness-probe"={"min"=0,"max"=2776,"value"=568},"ggsc"={"min"=0,"max"=65536,"value"=65536},"gsc "={"min"=0,"max"=65536,"value"=65536},"vblm"={"min"=0,"max"=196608,"value"=65536},"dsyp"={"min"=0,"max"=2,"value"=2},"rgsc"={"min"=0,"max"=65536,"value"=65536},"fade-style"={"min"=0,"max"=10,"value"=0},"fade-time1"={"min"=0,"max"=10000,"value"=500},"bgsc"={"min"=0,"max"=65536,"value"=65536},"brightness-probe"={"min"=0,"max"=1024,"value"=512},"fade-time3"={"min"=0,"max"=10000,"value"=500},"bklt"={"min"=0,"max"=2777,"value"=79},"linear-brightness"={"min"=0,"max"=2776,"value"=568},"brightness"={"max"=1024,"min"=0,"value"=512},"brightness-fade"={"min"=0,"max"=1023,"value"=0},"usable-linear-brightness"={"min"=79,"max"=2776,"value"=568}}

    | | |   "AppleMaxBrightness" = 2776

    | |       "IODisplayParameters" = {"brightness"={"max"=255,"min"=40},"commit"={"reg"=0}}

 

On my MacBookPro (KabyLake) i7-7567U (with Iris 650 gfx) system, the maxBrightness seems to be 0x50F (1295) 

 

$ ioreg -l|grep Panel|grep -v Kit

...

    | | |   "ApplePanelRawBrightness" = 1295

    | | +-o AppleIntelPanelA  <class AppleIntelPanelA, id 0x10000046c, !registered, !matched, active, busy 0, retain 5>

    | |       "IOClass" = "AppleIntelPanelA"

    | |       "ApplePanel" = {"F17Ta033"=<00110000000d00120016001e0028003600490063008700b800fd015d01e3029c039f050f>}

$ ioreg -l|grep -i max|grep -i bright|grep -v Profile

    | |   | |         "IODisplayParameters" = {"commit"={"reg"=0},"fade-time2"={"min"=0,"max"=10000,"value"=4000},"linear-brightness-probe"={"min"=0,"max"=1295,"value"=99},"ggsc"={"min"=0,"max"=65536,"value"=65536},"gsc "={"min"=0,"max"=65536,"value"=65536},"vblm"={"min"=0,"max"=196608,"value"=65536},"dsyp"={"min"=0,"max"=2,"value"=2},"rgsc"={"min"=0,"max"=65536,"value"=65536},"fade-style"={"min"=0,"max"=10,"value"=0},"fade-time1"={"min"=0,"max"=10000,"value"=500},"bgsc"={"min"=0,"max"=65536,"value"=65536},"brightness-probe"={"min"=0,"max"=1024,"value"=512},"fade-time3"={"min"=0,"max"=10000,"value"=500},"bklt"={"min"=0,"max"=1388,"value"=13},"linear-brightness"={"min"=0,"max"=1295,"value"=99},"brightness"={"max"=1024,"min"=0,"value"=513},"brightness-fade"={"min"=0,"max"=1023,"value"=0},"usable-linear-brightness"={"min"=13,"max"=1295,"value"=99}}

    | | |   "AppleMaxBrightness" = 1295

    | |       "IODisplayParameters" = {"brightness"={"max"=255,"min"=40},"commit"={"reg"=0}}

  • Like 1

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

This code added to Clover (SetIntelMaxBacklight) is completely wrong for Haswell and later.

The code, as written, is specific to HD3000/HD4000.

And keep in mind if your BIOS PWMMax setting is larger than 0x710, this "fix" will likely turn the screen black (assuming current PWM level at boot is higher than 0x710).

 

My SSDT-PNLF.dsl has correct/more general code.

  • Like 2

This code added to Clover (SetIntelMaxBacklight) is completely wrong for Haswell and later.

The code, as written, is specific to HD3000/HD4000.

And keep in mind if your BIOS PWMMax setting is larger than 0x710, this "fix" will likely turn the screen black (assuming current PWM level at boot is higher than 0x710).

 

My SSDT-PNLF.dsl has correct/more general code.

yes, my skylake laptop.. i get blackscreen after clover menu with SetIntelMaxBacklight=True

@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

  • Like 1

@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.

×
×
  • Create New...