Are OS X shutdown cause and sleep cause numbers listed/explained anywhere? 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.
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:


5


  Correct Shut Down. Shutdown was initiated, from the OS X Shut Down menu or other shutdown command. This normally does not indicate an issue with your system.

3  


  Hard shutdown. Check power button.

0  


  Power disconnected. Check power supply/battery.

-2


  vTypErr = -2, /*invalid queue element*/


Most likely it's a hardware issue such as faulty logic board, a video card or RAM.

Related:


Previous Shutdown Cause: -2
macOs Sierra "previous shutdown cause: -2"?



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:


-60: What is shutdown cause -60?


  Bad master directory block (badMDBErr).

-62: Kernel: &quot;Previous shutdown cause: -62&quot;


  Watchdog timer detected unresponsive application, restarting the system.

-64: Random Kernel Panics with Shutdown Cause: -64
-104: Shutdown cause: -104


  Possibly linked to battery issue.

-108: What is Shutdown Cause -108?


  Likely memory issue.

-112: Shutdown cause -112


  Restart cause logged when it freezes in a hard manner.

-128:


Tracking down hard shutdown cause—software? hardware? overheat?
Shutdown Cause -128


In general, -128 is unknown hardware problem, but commonly it can be related either to memory issue or to the battery time span (at the end of its useful life).




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:


Reset the SMC and Reset NVRAM (which you did).
Run an Apple Hardware Test.
Log a kernel panic.
Install EtreCheck app to find serious problems on your Mac.