Firmware, the SMC, NVRAM and T2 chip: reset and maintain

Most of your Mac is operated by software which is loaded from your startup volume. But in order to boot it up sufficiently to be able to load that up, and to enable certain hardware features controlling the cooling fans, battery charging, etc., every Mac has firmware and persistent storage for some key settings. These include the EFI firmware, the SMC, NVRAM and (in certain models) the T2 chip.

firmware

Extensible Firmware Interface (EFI)

EFI firmware is the fundamental software that gets your Mac going. All models have updates to patch bugs and support new features, and those are now only delivered as part of macOS updates.

This is why you should install macOS upgrades and updates while your Mac is connected to the internet: during installation, the macOS installer will check whether it needs any EFI or similar updates, and may download and install them then. However, Apple’s general practice is to bundle firmware updaters within macOS updates and security updates. If you don’t maintain and update macOS, then your Mac will not receive those updates, either.

Older Macs, and older updates, are still available through this article, which contains links to updaters if you need them.

Mac Pro models which are compatible with High Sierra and later, but prior to the ‘new’ Late 2013 model, with the designator MacPro5,1, are different when it comes to EFI firmware updates. In these, the update has to be initiated by the user, and doesn’t run automatically during macOS software update.

Because of this, they can only update their EFI firmware when a full installer app is run, and Apple only provides their firmware updates in full installer versions of macOS. To update the EFI firmware in a MacPro5,1, you will therefore have to download the latest full macOS installer app from the App Store, run that, and when prompted hold down the Power button on shutdown to trigger the ‘flash’ process.

When updating the firmware, the MacPro5,1 opens its optical disk drive. If the update were to fail, the Mac will power off leaving the optical drive open, allowing you to insert the firmware restore disk and power it back up to restore its old firmware. When the update is successful, the optical drive closes automatically, and the rest of the update then completes.

(Thanks to David and Alexandre for explaining these quirks to me.)

The System Management Controller (SMC)

The SMC is a custom chip(set) with its own firmware which may sometimes be updated separately from the EFI. This controls many of the extended hardware features like cooling fans. Aside from ensuring that its firmware is kept up to date (as for EFI firmware), the SMC may on occasion need to be reset when one or more of its functions has gone awry, such as the fans are stuck on full blast all the time. Apple explains these in its article on the SMC.

Features which are controlled by the SMC include:

  • the cooling fans; if these seem stuck full on even when your Mac is just idling, then that is suggestive of an SMC problem.
  • accessory lights, such as keyboard backlighting, status indicator light, battery indicator lights on non-removable batteries, those around the I/O ports on recent Mac Pros.
  • power button; if this is not a mechanical problem (older models), suspect the SMC.
  • opening and closing the lid of a notebook.
  • sleeping and shutdown; if your Mac sleeps or shuts down when you don’t think it should, suspect the SMC.
  • battery charging (laptops), and the MagSafe power adaptor light.
  • napping and processor slowing; if your Mac performs very poorly but the CPU is not showing high load, suspect the SMC.
  • Target display mode; if this does not work properly, or it switches unexpectedly, suspect the SMC.
  • recognition of peripherals connected to a USB-C port; if your MacBook or MacBook Pro doesn’t recognise these, suspect the SMC.
  • the Sudden Motion Sensor (SMS), ambient light sensing, and selection of an external video source for some iMacs.

Mac models which include a T2 chip – currently all iMac Pro models, and the 2018 MacBook Pro with a Touch Bar – incorporate SMC functions within that chip. They are discussed below.

How you reset the SMC depends on the Mac, with different routines for laptops with and without a removable battery, and for desktops.

To reset the SMC in a laptop with a non-removable battery (except for MacBook Pro 2018 with Touch Bar):

  1. shut the Mac down.
  2. connect its mains adaptor and ensure that power is being supplied to it.
  3. on the built-in keyboard, hold down Shift-Control-Option on the left side and press the Power button with them held down for 10 seconds.
  4. release all the keys, wait a few seconds, then power up normally (preferably to reset the NVRAM next).

To reset the SMC in a laptop with a user-removable battery (older models):

  1. shut the Mac down.
  2. disconnect any mains adaptor.
  3. remove the battery.
  4. press and hold the power button for 5 seconds.
  5. insert the battery, then connect the mains power adaptor and ensure that power is being supplied to it.
  6. power up normally (preferably to reset the NVRAM next).

To reset the SMC in a desktop (except for iMac Pro):

  1. shut the Mac down.
  2. disconnect all peripherals apart from any Ethernet cable, keyboard, mouse/trackpad, and any display. Then disconnect the mains power cable from the back of the Mac.
  3. wait for 15 seconds, then reconnect the mains cable.
  4. if you are going on to further system diagnostics or testing, leave peripherals disconnected. Otherwise you can reconnect the peripherals that you need.
  5. wait for 5 seconds, then power up normally (preferably to reset the NVRAM next).

Although you do not have to reset the NVRAM straight after resetting the SMC, because of potential overlap between their functions and problems, it is usually wise to do so.

Disconnecting peripherals is an additional measure which is not included in the standard SMC reset procedure. I recommend it because you may well want to have those peripherals clear when you are trying to sort this type of problem out. If you are sure that you will just proceed to reset the SMC (and possibly the NVRAM), you do not need to do that.

T2 chip

Macs with a T2 chip incorporate the SMC, image signal processor, audio controller, SSD controller, and the secure enclave processor in the single chip, which behaves quite differently from regular SMC chips, although signs of malfunction remain the same as those listed above.

To reset the SMC functions in your T2 chip (iMac Pro or MacBook Pro 2018 with Touch Bar):

  • shut the Mac down.
  • once shut down, press and hold its Power button for 10 seconds.
  • after releasing the Power button, wait a few seconds, then press the Power button to start the Mac up.

If that doesn’t work, try one of the two fallback procedures for Macs with T2 chips.

For an iMac Pro:

  • Shut your Mac down.
  • Disconnect its mains power lead for 15 seconds.
  • Reconnect its mains power lead, and wait for 5 seconds.
  • Press the Power button to start it up.

For a MacBook Pro:

  • Shut your Mac down.
  • Once it is shut down, press and hold the right Shift key, the left Option key, and the left Control key for 7 seconds. Then keep holding those keys while you also press and hold the Power button for another 7 seconds.
  • Release those keys and the Power button, and wait a few seconds before pressing the Power button to start it up again.

This procedure is detailed here.

There is one unique issue which can occur in the 2018 MacBook Pro with Touch Bar (T2 chip): if you press the Power button at about the same time that you connect your MacBook Pro to mains power, it can enter a mode in which the fans run at full speed. You will probably need to reset the SMC to fix that.

T2 chips retain sensitive data in their secure enclave. Before selling or otherwise disposing of a Mac with a T2 chip, clear all sensitive data from the secure enclave by starting up in Recovery mode, entering Terminal, and typing the command
xartutil --erase-all
You’ll be prompted to confirm that you want to clear the data. After confirming, quit Terminal and shut down.

T2 chips have their own firmware, which may be updated as part of a macOS update or security update. In the event that firmware update goes wrong, it can trap that Mac into an endless reboot cycle, in which each attempt to start up is terminated by a kernel panic, which initiates the next attempt to reboot.

This article explains how to recover from a failed T2 firmware update.

Non-Volatile Random-Access Memory (NVRAM)

NVRAM, formerly Parameter Random-Access Memory or PRAM, stores some key settings which your Mac cannot obtain from disk during startup. Apple explains it in a separate article about NVRAM.

The NVRAM contains settings for:

  • sound output volume,
  • display resolution, and sometimes other display settings,
  • startup volume (disk),
  • any recent kernel panic, to enable a kernel panic log to be constructed,
  • third-party kernel extension policy (High Sierra only),
  • other model-specific features.

If you are curious, you can use the shell command
nvram -p or nvram -xp
to list all the variables which are stored in your Mac’s NVRAM. 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.

In my iMac17,1, they include:

  • Bluetooth internal controller information,
  • the display configuration,
  • the computer name,
  • EFI recovery information,
  • System audio volume DB,
  • Bluetooth active controller information,
  • System audio output volume,
  • Backlight level,
  • Whether Location Services are enabled,
  • EFI Bluetooth delay setting,
  • Details of the last run of Apple Hardware Test.

When running High Sierra, they should also include the current third-party kernel extension policy.

To reset the NVRAM on any model of Mac:

  1. 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.
  2. If your Mac is running, shut it down.
  3. Position your fingers on the Command, Option, P and R keys ready to press and hold them down.
  4. Power your Mac up using its power button as normal.
  5. If your Mac plays a startup chime (chord), as soon as you hear the startup chime (chord), press and hold those four keys until your Mac restarts and sounds the startup chime a second time.
  6. If your Mac doesn’t play a startup chime (chord), press and hold those keys until the Apple logo appears and disappears for the second time.
  7. Release the keys. If you do not release them now, your Mac will restart again, and may reset the NVRAM a second time.
  8. Allow your Mac to start up normally.

Remember that when you reset the NVRAM, all the above settings will revert to their default. In High Sierra, if you have changed the third-party kernel extension policy using spctl, then you will need to repeat that change of setting.

One simple way to reset both the SMC and NVRAM without keyboard gymnastics is to start up in Single-user Recovery mode using Command-s-r, then enter the two commands
pmset -a restoredefaults
nvram -c

before restarting with reboot. This should also be possible when a hardware password is set. (Thanks to Manoli for suggesting this.)

Resetting the SMC and NVRAM are not panaceas for any problem. They will not fix disk problems, or failing graphics cards. Used appropriately, they can transform a Mac which seems to be dying into one that is in fine fettle.

Information about how to use the NVRAM to change the behaviour of your Mac is here.

[Updated 24 August 2018.]