Difficulty

Very easy

Steps

3

Time Required

                          2 minutes            

Sections

1

  • How to determine Mac shutdown causes
  • 3 steps

Flags

Member-Contributed Guide

An awesome member of our community made this guide. It is not managed by iFixit staff.

  • BackmacOS

  • Full Screen

  • Options

  • History

  • Save to Favorites

  • Download PDF

  • Edit

  • Translate

  • Get Shareable Link

  • Embed This Guide

  • Notify Me of Changes

  • Stop Notifications

Introduction

Step 1

              Open Terminal.app               
  • Open Terminal.app

Open Terminal.app

1024

Step 2

              Listing previous shutdowns               
  • Copy and paste the following command in your Terminal window:
  • log show –predicate ’eventMessage contains “Previous shutdown cause”’ –last 24h
  • The “24h” portion of the command can be changed to any number of hours, depending on how far back you need to see.

Copy and paste the following command in your Terminal window:

log show –predicate ’eventMessage contains “Previous shutdown cause”’ –last 24h

The “24h” portion of the command can be changed to any number of hours, depending on how far back you need to see.

Step 3

              Determining Shutdown Causes               
  • The previous shutdown causes in the timeframe you selected will appear as a list.
  • Common shutdown causes include 5 which indicates a normal shutdown, 3 which indicates a hard shutdown (i.e. holding the power button), and 0 which indicates the power was disconnected.
  • A full list of shutdown causes can be found here: Shutdown Causes.
  • Another, more recently updated, list of shutdown causes can be found here: Shutdown causes (from George Garside blog)

The previous shutdown causes in the timeframe you selected will appear as a list.

Common shutdown causes include 5 which indicates a normal shutdown, 3 which indicates a hard shutdown (i.e. holding the power button), and 0 which indicates the power was disconnected.

A full list of shutdown causes can be found here: Shutdown Causes.

Another, more recently updated, list of shutdown causes can be found here: Shutdown causes (from George Garside blog)

Done! You should be able to use these codes to further troubleshoot random shutdowns or other strange events.

Hit the button below if this guide helped solve your issue :)

Cancel: I did not complete this guide.

                                                                                      19 other people completed this guide.                                             

Attached Documents

  • macOS Shutdown Causes
  • PDF - 110.80 kb
  • View

macOS Shutdown Causes

PDF - 110.80 kb

Author

                                      with 3 other contributors 

                    Jonah Aragon                     

Member since: 08/05/2018

4,814 Reputation

                                      5 Guides authored                  



                       Badges:
                       39





                                                        +36 more badges                           

Team

                       Experimax Coon Rapids                        

                                                  Member of Experimax Coon Rapids 



                    Business                     


                                            3 Members                     


                                            15 Guides authored                     

Saurabh Shrivastava - Mar 10, 2020

Reply

For me it says

The attached PDF (and the internet) doesn’t seem to have any information about this code. What’s the source of the codes for the PDF? Maybe they have updated listing for shutdown codes.

octomobiki - Jun 7, 2020

we also have -20 as a cause and have no idea what it means. did you ever find it out?

赤月小黄泉 - Jun 26, 2020

I also have -20 code of shut down after macOS 10.15.5 update with MBP 16inches model.

but no information at all….

UNKNOWN X - Aug 21, 2020

writErr = -20, /I/O System Errors/ its this error for code -20 .. Find all error codes here :- https://krypted.com/lists/comprehensive-

Sorry , that was not related, check this one : - https://georgegarside.com/blog/macos/shu

and, error code 20- T2 security chip initiated shutdown