Skip to content

Commit

Permalink
Merge pull request #113 from dortania/0.8.3-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
dhinakg authored Sep 1, 2022
2 parents bc569a7 + 2f41fd3 commit 766ab95
Show file tree
Hide file tree
Showing 6 changed files with 144 additions and 208 deletions.
2 changes: 1 addition & 1 deletion cosmetic/gui.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ So to start, we'll need a couple things:

* **SetupDelay:**
* By default, leave this at `0`
* Some codecs many need extra time for setup, we recommend setting to `500000`(0.5 Seconds) if you have issues
* Some codecs many need extra time for setup, we recommend setting to `500` milliseconds (0.5 seconds) if you have issues

* **VolumeAmplifier:**
* The Volume amplification, value will differ depending on your codec
Expand Down
Binary file modified images/post-install/iservices-md/not-valid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
50 changes: 22 additions & 28 deletions misc/nvram.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ So this section is for those who don't have native NVRAM, the most common hardwa
* X99
* X299

For B360, B365, H310, H370, Z390 users, make sure you have [SSDT-PMC](https://dortania.github.io/Getting-Started-With-ACPI/) both under EFI/OC/ACPI and config.plist -> ACPI -> Add. For more info on making and compiling SSDTs, please see [**Getting started with ACPI**](https://dortania.github.io/Getting-Started-With-ACPI/)

**Note**: 10th gen CPUs do not need this SSDT
For B360, B365, H310, H370, and Z390 users, make sure you have [SSDT-PMC](https://dortania.github.io/Getting-Started-With-ACPI/) both under EFI/OC/ACPI and config.plist -> ACPI -> Add. For more info on making and compiling SSDTs, please see [**Getting started with ACPI**](https://dortania.github.io/Getting-Started-With-ACPI/)

## Cleaning out the Clover gunk

Expand All @@ -36,57 +34,53 @@ If folders are empty then delete them as well:

## Verifying if you have working NVRAM

To start, open the terminal and run the following one line at a time:
To start, open the terminal and run the following command, which sets a variable named `test` in your NVRAM to the current date and time:

```sh
sudo -s
nvram -c
nvram myvar=test
exit
sudo nvram myvar="$(date)"
```

Now reboot and run this:

```sh
nvram -p | grep -i myvar
nvram myvar
```

If nothing returns then your NVRAM is not working. If a line containing `myvar test` returns, your NVRAM is working.

Note: `nvram -c` requires SIP to be off, an alternative is to wipe NVRAM at the boot menu. Reminder you'll need `Misc -> Security -> AllowNvramReset -> YES`
If nothing returns then your NVRAM is not working. If a line containing `myvar` and then the current date, your NVRAM is working.

## Enabling emulated NVRAM (with a nvram.plist)
## Emulating NVRAM (with a `nvram.plist`)

To enable emulated NVRAM, you'll need 3 things set:
If you don't have native NVRAM, don't fret. We can set up emulated NVRAM by using a script to save the NVRAM contents to a plist during the shutdown process, which will then be loaded by OpenCore at the next startup.

![](../images/post-install/nvram-md/nvram.png)
To enable emulated NVRAM, you'll need the following set:

Within your config.plist:

* **Booter**:
* **Booter -> Quirks**:
* `DisableVariableWrite`: set to `NO`
* **Misc -> Security**:
* `ExposeSensitiveData`: set to `0x3`
* `ExposeSensitiveData`: set to at least `0x1`
* **NVRAM**:
* `LegacyEnable`: set to `YES`
* `LegacyOverwrite` set to `YES`
* `LegacySchema`: NVRAM variables set(OpenCore compares these to the variables present in nvram.plist)
* `LegacySchema`: NVRAM variables set (OpenCore compares these to the variables present in `nvram.plist`)
* `WriteFlash`: set to `YES`

And within your EFI:

* `OpenRuntime.efi` driver(this is needed for proper sleep, shutdown and other services to work correctly

Now grab the ['LogoutHook.command'](https://github.com/acidanthera/OpenCorePkg/releases)(Inside `/Utilities/LogoutHook/`) and place it somewhere safe (e.g. within your user directory, as shown below):
* `OpenVariableRuntimeDxe.efi` driver
* `OpenRuntime.efi` driver (this is needed for proper sleep, shutdown and other services to work correctly)

`/Users/$(whoami)/LogoutHook/LogoutHook.command`
Make sure to snapshot after to make sure the drivers are listed in your config.plist. Afterwards, make sure that both `OpenVariableRuntimeDxe.efi` and `OpenRuntime.efi` have `LoadEarly` set to `YES`, and that `OpenVariableRuntimeDxe.efi` is placed _before_ `OpenRuntime.efi` in your config .

Open up terminal and run the following:
Now grab the [LogoutHook folder](https://github.com/acidanthera/OpenCorePkg/releases) (inside `Utilities`) and place it somewhere safe (e.g. within your user directory, as shown below):

`sudo defaults write com.apple.loginwindow LogoutHook /Users/$(whoami)/LogoutHook/LogoutHook.command`
`/Users/$(whoami)/LogoutHook/`

And voila! You have emulated NVRAM!
Open up terminal and run the following (one at a time):

Do keep in mind this requires the `nvram` command to support the `-x` flag for this to work correctly which is unavailable on macOS 10.12 and below. If you are installing macOS 10.12 or earlier, you need to copy `nvram.mojave` into the same folder as `LogoutHook.command`, which fixes this by invoking it instead of the system `nvram` command.
```bash
cd /Users/$(whoami)/LogoutHook/
./Launchd.command install
```

Something else to note is that macOS is only able to read nvram.plist but it won't be able to write to nvram.plist unless running the shutdown process. This means running the test above won't work
And voila! You have emulated NVRAM!
Loading

0 comments on commit 766ab95

Please sign in to comment.