MacOS – Are OS X shutdown cause and sleep cause numbers listed/explained anywhere

macosrestartshutdown

The numbers in which I'm most interested

  • -2
  • 0
  • 3
  • 5

… I might add to that shortlist.

What do those numbers mean; where might we find authoritative explanations?

Somewhere in Apple open source, maybe?

Background

There's a suggested answer for -60, a question about -81, a debatable suggested answer for -108, discussion of -128, -72, -62, -30, -2, 0, 3 … and so on, but unless I'm missing something:

  • nothing like an Apple-provided list of explanations of the commonly seen numbers.

Examples

Three messages recently sent by kernel on a MacBookPro5,2:

2014-03-31 09:04:49.000 kernel[0]: Previous Shutdown Cause: 5
2014-03-31 11:01:24.000 kernel[0]: Previous Sleep Cause: 5
2014-03-31 14:47:00.000 kernel[0]: |Previous Shutdown Cause: -60

Possibly relevant to some cause numbers

Error codes in http://www.opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/MacErrors.h

  • that's in Apple open source for Mac OS X 10.6.2 but not in open source for Mac OS X 10.6.3
  • the source code for 10.6.2 is almost identical to what's installed under MacOSX10.8.sdk
  • it may be sensible to treat some of those error codes as deprecated.

Best Answer

The precise meaning of the codes is not publicly documented, although according to @grgarside's website for Shutdown Causes, the causes for the ones listed in the question are:

For a full up-to-date list, see Shutdown Causes.

See also: List Of Mac OS X Error Codes.


Here on Ask Different, there have been a number of questions about shutdown causes:


If you've got negative numbers very often, Apple is more keen to get your Mac to the repair, as it usually indicates problem with your hardware.


General suggestions in case of further problems: