dortania / OpenCore-Legacy-Patcher

Experience macOS just like before
https://dortania.github.io/OpenCore-Legacy-Patcher/
Other
12.39k stars 1.18k forks source link

Implement Lower Power Mode (LPM) for older Macs in macOS Monterey #316

Open khronokernel opened 3 years ago

khronokernel commented 3 years ago

With macOS Monterey, we've been able to unlock both Sidecar and Airplay support for legacy Macs. However we currently do not enable LPM on pre-Skylake Macs. While the majority of the power management benefits are likely tied to hardware, the OS does handle scheduling and limiting applications' CPU usage meaning there can be benefits to enabling on pre-Skylake hardware.

Currently LPM is supported on the following models:

We believe Apple hard coded hardware support inside /System/Library/PrivateFrameworks/PowerUI.framework/Versions/A/PowerUI. Below is a binary ripped from 12.0:

Note: Compared to SidecarFixup and AirplayCore, Apple did not hard code a full model array into PowerUI. Further investigation required for how Apple handles device checks

3wnbr1 commented 2 years ago

Maybe PowerManagement-1132.141.1 would be a good place to start

diogoterremoto commented 2 years ago

Would love getting this working on my MacBook Pro 2015, even if it's only software wise, as the hardware can be down clocked with Turbo Switcher to disable Intel Turbo Boost.

I'm new at this. Search the OP binary for some Model Identifiers but only found random models. The compatibility starts at MacBook (Early 2016 [MacBook9,1] and later) and MacBook Pro (Early 2016 [MacBookPro13,1] and later). Also didn't found anything on previous post repository.

Any tips?

khronokernel commented 2 years ago

Model lock is within the IOKit framework and is stored as minimum model integer(s) (inside IOPMFeatureIsAvailableWithSupportedTable, note not as blacklisted model strings as generally done). Additionally there needs to be an /dev/xcpm stub present (powerd verifies this, however Haswell+ already support this in macOS)

Since symbol solving in userspace is non-functional, creating a stable patch base is difficult and unlikely. However if you're interested in researching, feel free to PR to FeatureUnlock's repository