NVRAM, formerly known as Parameter Random-Access Memory or PRAM, stores key settings which your Mac can’t obtain from internal disk storage during the early part of the boot process, and some information which can’t otherwise be kept between startups. An example is whether to sound the startup chime. In Intel Macs, these are stored in discrete memory which can be reset to factory defaults, and are explained by Apple in this article. M1 Macs are different, in that there’s no single manoeuvre which resets the contents of NVRAM, nor should you ever want to do so.
The NVRAM contains settings for:
- sound output volume,
- display configuration,
- startup volume (disk),
- any recent kernel panic, to enable a kernel panic log to be constructed,
- other model-specific features.
If you’re curious, NVRAM contents are listed in System Information under Software > Logs > NVRAM contents. Alternatively, you can use the shell command
nvram -xp or
to list all the accessible variables which are stored in your Mac’s NVRAM; on M1 Macs in particular, some of the contents aren’t listed. The output will be formatted slightly differently according to model, and you may find it best to try both, to work out which is more meaningful.
Many of the variables contained in the NVRAM of an M1 Mac aren’t intended to mean anything to the user, nor should they be changed or removed. Among those of interest and potential use are the following (some of which are common to many Intel Macs):
aht-results– details of the last run of Diagnostics as an array of dictionaries, containing the datestamp, result code and more.
auto-boot– a Boolean determining boot behaviour when opening the case. However, changing it from the default may cause boot failure.
backlight-nits– the backlight level, e.g.
boot-args– any arguments to be supplied to the boot command, such as
-vto engage Verbose mode when next booted (supplied as a string). Recent reports suggest that this no longer works, and changes should be avoided.
boot-command– the boot command, normally
boot-volume– three UUIDs specifying the boot volume to be used, in order the GPT partition type, the partition UUID, and the volume group UUID.
fmm-computer-name– the computer name (supplied as a string).
LocationServicesEnabled– whether Location Services are enabled, e.g.
prev-lang:kbd– the initial keyboard language, such as
en-GB:2for British external (supplied as a string).
prev-lang-diags:kbd– the keyboard language used in Diagnostics, such as
en-GBfor British (supplied as a string).
StartupMute– whether to mute the startup chime. Set this to
%00for the chime to sound, or
%01for it to be muted.
SystemAudioVolume– audio output volume, such
%80for normal volume or
%00for fully muted.
Resetting the NVRAM has long been one of the panaceas which can solve all sorts of problems in Intel Macs. However, while it will clear any settings which are damaged or otherwise tripping that Mac up, it won’t fix disk problems, nor failing graphics cards. Used appropriately, it can transform an Intel Mac which seems to be dying into one that is in fine fettle.
To reset the NVRAM on any Intel model:
- If your Mac has a firmware password set, you must turn that off before attempting to reset the NVRAM, or the procedure will fail. To do that, restart in Recovery mode and select the Firmware Password Utility or Startup Security Utility from the Utilities menu.
- If your Mac is running, shut it down. For the procedure to be most reliable, connect any wireless keyboard using its USB charging cable.
- Position your fingers on the Command, Option, P and R keys ready to press and hold them down.
- Power your Mac up using its Power button as normal.
- Immediately after pressing the Power button, press and hold those four keys. If you’re worried about doing this quickly enough, you can hold the four keys down as you press the Power button on most models.
- If your Mac plays a startup chime (chord), hold those four keys until your Mac sounds the startup chime a second time, when you should release them.
- If your Mac doesn’t play a startup chime (chord), hold those keys until the display backlight turns on a second time, or the Apple logo appears and disappears for the second time. That’s typically around 20 seconds.
- Release the keys. If you do not release them now, your Mac will restart again, and may reset the NVRAM a second time.
- Allow your Mac to start up normally.
Remember that when you reset the NVRAM, all its settings will revert to their default, and you may need to correct its display resolution, sound volume, startup disk, time zone, and others.
If you want to be certain that you have reset the NVRAM properly, the most reliable way is to compare its contents before and after resetting. Following successful reset, the NVRAM contains a lot less information in fewer fields.
You currently can’t reset the NVRAM in an M1 Mac.
Several of the more important settings are controlled in System Preference panes now. For example, the Sound Effects tab in the Sound pane lets you set whether the startup chime should be played. Where such a control exists, it’s better to use that to change that variable in NVRAM.
You can alter the value of any variable in NVRAM using the
nvram command in Terminal; for most if not all variables this requires that you assume root privileges using the
sudo command, so you are best prefacing each command with
sudo. Thus, the command
sudo nvram StartupMute=%01
sets that variable to true, and disables the startup chime. Turn it on again with
sudo nvram StartupMute=%00
The % sign indicates that the next two characters are given in hexadecimal, which is the default format; if you’re really smart, you can use XML format with the -x option to
nvram, but that gets more complex. If you’re changing a variable which normally contains a string, you should use a command of the form
sudo nvram fmm-computer-name="Howard%e2%80%99s iMac"
You can also remove a setting from the NVRAM with the
-d option, or by setting it to nothing:
sudo nvram -d MyMistake
sudo nvram MyMistake=
or, to set an empty string for settings such as boot-args:
sudo nvram boot-args=""
Be particularly careful when making any changes to the NVRAM in an M1 Mac: if you make a mistake there’s no way to reset it, and your Mac could be taking a trip to DFU mode before it will work properly again.