- Joined
- Oct 23, 2012
- Messages
- 442
- Motherboard
- Dell XPS 13 9360 (Clover)
- CPU
- i7-7500U
- Graphics
- HD 620, 1920x1080
The problem is if PWMMax is not set correctly, the brightness levels may be off.
If it is larger than expected, you will not reach 100% brightness. The degree to which you can detect the problem, is dependent on the degree to which PWMMax is larger than the expected value.
If it is smaller than expected, the display will go dark above a certain brightness level (quite easy to detect).
As noted above, PWMMax setting has nothing to do with the data in AppleBacklight[Injector].kext.
It is possible to set PWMMax to anything. Then the current backlight level (LSW of LEVX) is set as a percentage of that max...
I have no idea on why certain values for PWMMax are used.
We already know that various BIOS will use different values on similar hardware.
And we already know that OS X/macOS uses different values depending on ig-platform-id and graphics platform.
Sounds like you're using subjective observations.
It would be great to confirm that the SKL graphics drivers set PWMMax at boot instead of relying on the firmware to do it.
I have never used DirectHW.kext, but it isn't much of a "backdoor". All hardware registers are available at the kernel level... there is no protection there.
I did read Intel documentation.
If I understood correctly, PWMMax is the frequency divider.
It may be initialised by BIOS at boot, but then at wake it is OS responsibility to re-initialise it.
So the two must match, otherwise we get different scaling pre-post wake.
The frequency divider is responsible for allocating time slots for the various duty cycles interpolated by the array of values you set into the injector plist.
This is why, independently from what you set into that injector, if the frequency divider is less than maximum, you are not able to reach full brightness.
So the simplest way to achieve full brightness is to set frequency divider at the same value as the highest brightness value you find on a properly working system (aka Windows with panel drivers installed).
Am I right, @RehabMan?
As side notes:
- Our panel has a shockingly high PWM frequency: 44000 Hz. Hight PWM usually means high minimum brightness. Our panel goes as low as <1%. Very well engineered.
- Our panel, at 100% brightness, still has a duty cycle of ~50%. This means it could be twice as bright, but I think it's locked in display firmare (just as CABC).
- I think that smooth steps are caused by hardware. It's the PWM controller that gradually changes duty cycle. This can be seen also when system hangs and you issue a hard-reboot, display dims and powers up gradually. So, this may be the same on real Macbooks: hardware-generated smoothing. Hackintoshes with no hardware smoothing will have discrete steps, unless smoothing is SW-emulated, like in IntelBacklight (Am I right, @RehabMan?).