- Joined
- Jul 13, 2014
- Messages
- 284
I've had some more time to look into this, and try to understand how it actually works. The info below is how I currently understand it. If you skip it, patches are at the bottom. First one is required, second one fixes some issues while creating others (details below).
2 components involved: MEI driver (AppleIntelMEIDriver) and ME controller (AppleMEClientController), both packaged within the framebuffer kext.
As long as the driver can't write to the ME, sleep/shutdown after 3+ hours running is fixed. 2 ways to do that:
- Prevent the driver from starting by following 'disabled by plist' in AppleIntelMEIDriver::start()
- Prevent the driver from writing to ME by jumping over AppleIntelMEIDriver::writeMessageToME(). Note: make sure the call returns 0 or it creates load in the kernel, breaking speedstep (symptom: kernel_task stuck at ~7% cpu constantly).
At this point, some issues:
- Slow boot (adds ~15 seconds to boot)
- Coming back from sleep, screen is stuck at min brightness for a couple minutes.
The above issues disappear if the ME controller is disabled (i.e. prevented from starting). But that creates yet some other issues (hang with quicktime, slow opening of vlc). This is the current compromise I'm running (i.e., this is what the 2nd patch below does).
However, this means the issues of slow boot/low brightness are triggered in the controller (makes sense.. driver is probably called through the controller from the kernel/rest of the OS). Next step is to find a clean fix for these issues in the controller. So far:
- Patch AppleMEClientController::sendMessage --> no change
- Patch AppleMEClientController::sendCommon --> no change
More experimentation to be done, hopefully a clean fix can be found.
Patches for 10.10.3:
2 components involved: MEI driver (AppleIntelMEIDriver) and ME controller (AppleMEClientController), both packaged within the framebuffer kext.
As long as the driver can't write to the ME, sleep/shutdown after 3+ hours running is fixed. 2 ways to do that:
- Prevent the driver from starting by following 'disabled by plist' in AppleIntelMEIDriver::start()
- Prevent the driver from writing to ME by jumping over AppleIntelMEIDriver::writeMessageToME(). Note: make sure the call returns 0 or it creates load in the kernel, breaking speedstep (symptom: kernel_task stuck at ~7% cpu constantly).
At this point, some issues:
- Slow boot (adds ~15 seconds to boot)
- Coming back from sleep, screen is stuck at min brightness for a couple minutes.
The above issues disappear if the ME controller is disabled (i.e. prevented from starting). But that creates yet some other issues (hang with quicktime, slow opening of vlc). This is the current compromise I'm running (i.e., this is what the 2nd patch below does).
However, this means the issues of slow boot/low brightness are triggered in the controller (makes sense.. driver is probably called through the controller from the kernel/rest of the OS). Next step is to find a clean fix for these issues in the controller. So far:
- Patch AppleMEClientController::sendMessage --> no change
- Patch AppleMEClientController::sendCommon --> no change
More experimentation to be done, hopefully a clean fix can be found.
Patches for 10.10.3:
Code:
<dict>
<key>Name</key>
<string>AppleIntelFramebufferAzul</string>
<key>Comment</key>
<string>AppleIntelMEIDriver::writeMessageToME</string>
<key>Find</key>
<string>4883EC1844894DD04589C589CB</string>
<key>Replace</key>
<string>4883EC18E9E5010000909089CB</string>
</dict>
<dict>
<key>Name</key>
<string>AppleIntelFramebufferAzul</string>
<key>Comment</key>
<string>AppleMEClientController::start</string>
<key>Find</key>
<string>4885C00F8405030000488B05E50D0100488945D0</string>
<key>Replace</key>
<string>4885C0E90603000090488B05E50D0100488945D0</string>
</dict>