Skip to content

Instantly share code, notes, and snippets.

@ferbass
Last active December 7, 2022 04:46
Show Gist options
  • Save ferbass/1e4156b03104d5399bfb13b42f901261 to your computer and use it in GitHub Desktop.
Save ferbass/1e4156b03104d5399bfb13b42f901261 to your computer and use it in GitHub Desktop.
macOS Shutdown Cause

Finding shutdown cause

log show --predicate 'eventMessage contains "Previous shutdown cause"' --last 24h

Software Codes

1            Power adapter disconnected
3            Dirty Shutdown/Sleep resulting from forced restart or shutdown
5            Clean Shutdown/Sleep initiated by the user
6            Undocumented, system initiated
9            Undocumented, system initiated

Intermediate Codes

0            Sudden loss of power or SafeSleep initiated by system

Hardware Codes

-3           Multiple temperature sensors too high
-60          Bad master directory block, serious disk error
-61          Unresponsive app resulting in forced shutdown
-62          Unresponsive app resulting in forced shutdown
-64          Kernel panic, probably due to Firmware issue
-71          Memory too hot
-74          Battery too hot
-75          MagSafe power adaptor communication problem
-78          Incorrect input current from power adapter
-79          Incorrect current from battery
-86          Proximity temperature (heatsink, etc) too high
-95          Proximity temperature (heatsink, etc) too high
-100         Power supply too hot
-101         Display too hot
-103         Battery voltage too low
-104         Unknown battery fault
-127         SMC/PMU forced shutdown for another cause
-128         Unknown, possibly battery at the end of its life, but can also occur when the SMC initiates an automatic restart following a kernel panic; or last reason was not logged

ref: https://discussions.apple.com/thread/251506850?answerId=253053640022#253053640022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment