forked from chrultrabook/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from ethanaobrien/macos
macOS reorg w/ custom firmware
- Loading branch information
Showing
6 changed files
with
123 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# macOS Firmware | ||
|
||
It is recommended to flash coreboot with the Intel Management Engine interface enabled to prevent bugs after waking from sleep. | ||
Without the ME interface enabled, the following bugs can occur after waking from sleep: | ||
- Blank Electron / Chromium apps | ||
- Buggy video playback in web browsers like Firefox or Safari | ||
- Display/Wallpaper settings in SysPref/SysSettings | ||
- Logging out freezes your system | ||
|
||
## Custom Firmware | ||
|
||
### Prebuilt | ||
|
||
Prebuilts can be found at [ethanthesleepy.one](https://ethanthesleepy.one/macos/) | ||
|
||
### Building Manually | ||
|
||
1. Follow the steps [here](../../advanced/compiling-coreboot.md) to download the toolchain and build the firmware | ||
* Continue these steps once `build-uefi.sh <boardname>` has been ran | ||
1. Run `make menuconfig`. You will be greeted by a menu which looks like the following: | ||
|
||
![image](/macos/menuconfig.png) | ||
|
||
1. Select `Chipset` | ||
1. Select `Disable HECI1 at the end of boot` then press `N` to disable. The asterik should be gone: | ||
|
||
![image](/macos/heci1.png) | ||
|
||
1. Use the right arrow keys to select `Save` at the bottom, then press `Ok` | ||
1. Use the right/left arrow keys to select `Exit` until back at the prompt. | ||
1. Run `make -j$(nproc)` to build the firmware. | ||
1. The output will be found at `./build/coreboot.rom` | ||
|
||
## Flashing Firmware | ||
|
||
Follow the steps [here](../../advanced/compiling-coreboot.html) to flash the new firmware |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# macOS Hibernation | ||
|
||
macOS by default will try to use hibernation after sleeping for a predetermined amount of time. | ||
Some fixes in the `config.plist` are required in order to take advantage of this: | ||
|
||
- Disable `Booter->Quirks->DevirtualiseMmio` | ||
- Set `Misc->Boot->HibernateMode` to `Auto` | ||
- By default, OpenCore will not look for hibernated images of macOS. | ||
- Set `Misc->Boot->HibernationSkipsPicker` to `True` to skip the picker when resuming from hibernation | ||
- While not strictly required, this speeds up resume times and prevents accidently booting another OS and changing hardware state underneath macOS. | ||
- Create a reserved memory region under `UEFI->ReservedMemory` with the properties: | ||
|
||
| Field | Type | Value | | ||
| ------- | ------- | ----- | | ||
| Comment | String | Fix black screen on wake from hibernation | | ||
| Enabled | Boolean | True | | ||
| Address | Number | 569344 | | ||
| Enabled | Boolean | True | | ||
| Size | Number | 4096 | | ||
| Type | String | RuntimeCode | | ||
|
||
## Testing Hibernation | ||
|
||
To test hibernation, it is recommended to run `sudo pmset -a hibernatemode 25`. | ||
This will force macOS to hibernate immediately whenever the lid is closed or `Sleep` is selected in the menu at the top left. | ||
|
||
### macOS enters S3 sleep instead of shutting down | ||
|
||
Some models (such as `KLED`) have drives not marked as internal, which prevents macOS from entering hibernation. | ||
To fix this, add the `built-in` property to the PCI device under `DeviceProperties->Add-><storage device path>`: | ||
|
||
| Field | Type | Value | | ||
| -------- | ---- | ---------- | | ||
| built-in | Data | <01000000> | | ||
|
||
You may need to add an ACPI device as well. | ||
If an ACPI device does not exist to represent the NVMe or eMMC drive, then device properties will not be applied. | ||
An example SSDT can be found [here](https://github.com/1Revenger1/Acer-Spin-713-Hackintosh/blob/main/src/ACPI/SSDT-Devices.dsl). | ||
|
||
## Hibernate Modes | ||
|
||
Pmset exposes a few different hibernation modes which can be set through `sudo pmset -a hibernatemode <value>`: | ||
|
||
- 0: Disables hibernation | ||
- 3: Hibernates after either `standbydelaylow` or `standbydelayhigh` seconds of sleep | ||
- Which one is used is dependent on the battery percentage. Anything above `highstandbythreshold` will use `standbydelayhigh` instead of `standbydelaylow`. | ||
- 25: Hibernates instead of S3 sleep | ||
|
||
When using hibernate mode 3, macOS may keep sleeping even after the standby time has elapsed. | ||
[`HibernationFixup.kext`](https://github.com/acidanthera/HibernationFixup) may be required in this case, and provides options to fine tune when the Chromebook is allowed to sleep. |