I think you're using ig-platform-id 0x19160000. PWMMax assumed by that platform-id is 0x056c (1388).
It corresponds well to the brightness data in the AppleBacklightInjector.kext that you're using:
Code:
ProBook-4540s:Downloads Admin$ echo -n ABEAAAAYACcAOgBSAHEAlgDEAPwBQAGTAfYCbgL+A6oEeAVs|base64 --decode|xxd
00000000: 0011 0000 0018 0027 003a 0052 0071 0096 .......'.:.R.q..
00000010: 00c4 00fc 0140 0193 01f6 026e 02fe 03aa [email protected]....
00000020: 0478 056c .x.l
So two possibilities (since you're claiming it is working well):
- The new drivers for SKL graphics initialize the PWMMax... (as I noted before, typically this was not the case)
OR
- Your BIOS also happens to use 0x56c for PWMMax initialization
There are various ways to find out PWMMax. Here are a couple:
- use RWEverything in Windows (involves tracking down the value in SystemMemory... I describe it in one of my older brightness guides, or you can read the ACPI code below to understand how to get from the BAR1 address to LEVX)
- use ACPIDebug to print the value out...
Refer to SSDT-PNLF.dsl for how it is addressed in ACPI code... For Haswell/Skylake/KabyLake it is the MSW of LEVX from below:
Code:
OperationRegion(RMB1, SystemMemory, \_SB.PCI0.IGPU.BAR1 & ~0xF, 0xe1184)
Field(RMB1, AnyAcc, Lock, Preserve)
{
Offset(0x48250),
LEV2, 32,
LEVL, 32,
Offset(0x70040),
P0BL, 32,
Offset(0xc8250),
LEVW, 32,
LEVX, 32,
Offset(0xe1180),
PCHL, 32,
}
IGPU.BAR1 is defined in SSDT-IGPU.dsl
Code:
Scope(_SB.PCI0.IGPU)
{
// need the device-id from PCI_config to inject correct properties
OperationRegion(RMP1, PCI_Config, 0, 0x14)
Field(RMP1, AnyAcc, NoLock, Preserve)
{
Offset(0x02), GDID,16,
Offset(0x10), BAR1,32,
}
Code from SSDT-PNLF.dsl:
Code:
Method(_INI)
{
...
// otherwise... Assume Haswell/Broadwell/Skylake
Local2 = \RMCF.LMAX
if (Ones == \RMCF.LMAX) { Local2 = HASWELL_PWMMAX }
// This 0xC value comes from looking what OS X initializes this\n
// register to after display sleep (using ACPIDebug/ACPIPoller)\n
LEVW = 0xC0000000
// change/scale only if different than current...
Local1 = LEVX >> 16
If (!Local1) { Local1 = Local2 }
If (Local2 != Local1)
{
// set new backlight PWMAX but retain current backlight level by scaling
Local0 = (((LEVX & 0xFFFF) * Local2) / Local1) | (Local2 << 16)
//REVIEW: wait for vblank before setting new PWM config
//For (Local7 = P0BL, P0BL == Local7, ) { }
LEVX = Local0
}
...
If you wanted to only print out the value:
Code:
Method(_INI)
{
\RMDT.P2("LEVX is", LEVX)
}
Hopefully that is enough for you to put together the puzzle...