Skip to content

Commit

Permalink
Fixed applbkl property failing to disable backlight patches
Browse files Browse the repository at this point in the history
  • Loading branch information
vit9696 committed Aug 23, 2021
1 parent 9aa64a3 commit cfdc85f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ WhateverGreen Changelog
- Added the backlight smoother submodule that makes brightness transitions smoother on Intel IVB+ platforms. (by @0xFireWolf)
- MMIO Register Access submodules are now available on Intel IVB+ platforms. (by @0xFireWolf)
- Improved ASUS-made AMD R9 380 GPU identification
- Fixed `applbkl` property with `<00 00 00 00>` value failing to disable backlight patches
- *Note:* This release requires Lilu v1.5.6 or later.

#### v1.5.2
Expand Down
3 changes: 2 additions & 1 deletion WhateverGreen/kern_weg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,8 @@ void WEG::processKernel(KernelPatcher &patcher) {
}

// Note, disabled Optimus will make videoExternal 0, so this case checks for active IGPU only.
if (appleBacklightPatch == APPLBKL_DETECT && (devInfo->videoBuiltin == nullptr || extNum > 0)) {
DBGLOG("weg", "resulting applbkl value is %d", appleBacklightPatch);
if (appleBacklightPatch == APPLBKL_OFF || (appleBacklightPatch == APPLBKL_DETECT && (devInfo->videoBuiltin == nullptr || extNum > 0))) {
// Either a builtin IGPU is not available, or some external GPU is available.
kextBacklight.switchOff();
}
Expand Down

0 comments on commit cfdc85f

Please sign in to comment.