How Did I Fix That?

A log of solutions to problems I've encountered. No warranties.

What's inside a mystery software package file?

27 March 2019

A package (.pkg file in OS X) is an .xar archive containing a cpio.gz archive of installable files in "Payload", along with a "bill of materials", scripts, etc. To inspect the contents, unpack the .xar into a directory, and then open the Payload file:

mkdir scratch; cd scratch
xar -xf ../mystery.pkg
gunzip -dc Payload | cpio -i

The file hierarchy shows where the contents of the package would be distributed during installation.

Tags: MacOS, software

No sound on my Mac

05 October 2018

Switching the output sound device repeatedly (e.g., going back and forth between external speakers and headphones several times) sometimes kills sound output on my laptop (currently on OS X 10.13 High Sierra). To fix, restart the Core Audio services:

sudo killall coreaudiod
Annoying, but workable.

Tags: MacOS, bug-workaround

Why won't my Mac go to sleep?

29 August 2018

On Mac OS X 10.13 (High Sierra), power management status is reported by:

pmset -g
pmset -g assertions
Items with non-zero assertions (like "UserIsActive") are preventing sleep.

Tags: MacOS