Involuntary reboot log 10.14

Couldn’t unlock screen after opening laptop; "e" key and possibly one or two others were unresponsive. Probably should have thought to kill Karabiner-Elements, but instead did a hard reset. First involuntary reboot since updating to Mojave the previous day.

Statistics so far for this machine

  • Failure type: hard reset
  • OS version: 10.14.?
  • Uptime at moment of failure: unknown
  • Kernel panics: 0
  • Hard resets: 14
  • Total failures: 14
  • Start of recording keeping: 31 October 2017
  • Total days to date: 1129
  • Average time between failures: 80.64 days

Summary of events for this machine

  1. 2017-11-16: jammed keyboard on waking from sleep.
  2. 2017-11-16: spontaneous reboot on waking from sleep.
  3. 2018-07-15: frozen mouse pointer.
  4. 2018-11-03: jammed keyboard on waking from sleep.
  5. 2018-11-16: jammed keyboard on waking from sleep.
  6. 2018-11-18: jammed keyboard on waking from sleep.
  7. 2018-11-24: freeze half-way through passphrase entry on waking from sleep.
  8. 2018-11-24: jammed keyboard on waking from sleep.
  9. 2018-11-27: jammed keyboard on waking from sleep (even with Karabiner-Elements partially disabled).
  10. 2018-11-29: jammed keyboard on waking from sleep (even with Karabiner-Elements totally disabled).
  11. 2018-12-03: jammed keyboard on waking from sleep (because key repeat was not turned off; it seems the hook did not run).
  12. 2019-07-06: total freeze on waking from sleep, post-screen-unlock.
  13. 2020-06-22: unable to unlock or make backlight come on.
  14. 2020-12-03: some keys inoperative at lock screen.

Historical data (all machines)

For comparison, previous generations of machines (from most oldest to most recent) that I’ve used have had averages of:

Active? Average uptime Total lifetime Log Model Description
~13.83 days ~540 days #1 — #39 PowerMac G5 personal machine
22.73 days 1,364 days #40 — #60 iMac (17", Early 2006) personal machine
20.06 days 321 days 2.x iMac (27", Late 2009) personal machine
19.11 days 707 days 3.x MacBook Air (13", Late 2010) work machine (Causes)
41.86 days 293 days 4.x MacBook Air (13", Mid-2012) work machine (Causes)
2.0 days 2 days 5.x MacBook (unsure of model) work machine (Causes), loaner laptop
27.176 days 462 days 6.x MacBook Air (13", Mid-2013) work machine (Facebook)
35.0 days 140 days 7.x as above, but with a replacement shell work machine (Facebook)
40.8 days 245 days 8.x MacBook Pro (Retina, 15-inch, Mid 2015) work machine (Facebook)
87.0 days 522 days 9.x MacBook Pro (Haswell, Mid-2015, dual graphics) work machine (Facebook)
80.64 days 1,129 days 10.x MacBook Pro (Haswell, Mid-2015, dual graphics) personal machine
n/a n/a 11.x MacBook Pro 15-Inch "Core i7" 2.6 Touch/2018 work machine (Liferay)

Arch Linux install script

#!/bin/bash

################################################################################
#                                                                              #
#           NOTE: For the latest version of this script, see:                  #
#                                                                              #
#           https://wincent.com/link/arch-linux-install.sh                     #
#                                                                              #
################################################################################

# loadkeys colemak -- (ie. "iyasefjr cyifmae" typing colemak-style on qwerty)
# iwctl device list
# iwctl station wlan0 scan
# iwctl station wlan0 get-networks
# iwctl station wlan0 connect $SSID
# curl -LO https://wincent.com/link/arch-linux-install.sh
# bash arch-linux-install.sh

set -e

function log {
  local LINE="[arch-linux-install] $*"
  echo "$LINE"
  echo "${LINE//?/-}"
}

function ask {
  read -p "$1> "
  eval "export $2=\$REPLY"
}

log "Setup questions:"
ask 'User passphrase' __PASSPHRASE__
ask 'Wireless SSID' __SSID__
ask 'Wireless passphrase' __WIFI_PASSPHRASE__

log "Checking network reachability"
ping -c 3 google.com

log "Setting up NTP"
timedatectl set-ntp true

log "Refreshing packages"
pacman -Syy

log "Partitioning disk"
cat << HERE | sfdisk /dev/nvme0n1
label: gpt
device: /dev/nvme0n1

/dev/nvme0n1p1: size=500MiB, type=uefi
/dev/nvme0n1p2: size=50GiB, type=linux
/dev/nvme0n1p3: type=linux
HERE

log "Formatting partitions"
mkfs.fat -F32 /dev/nvme0n1p1 # /boot/EFI
mkfs.ext4 /dev/nvme0n1p2 # /
mkfs.ext4 -O encrypt -b 4096 /dev/nvme0n1p3 # /home

log "Mounting /dev/nvme0n1p2 at /"
mount /dev/nvme0n1p2 /mnt

log "Mounting /dev/nvme0n1p3 at /home"
mkdir /mnt/home
mount /dev/nvme0n1p3 /mnt/home

log "Creating /etc/fstab"
mkdir /mnt/etc
genfstab -U -p /mnt >> /mnt/etc/fstab

log "Installing base packages"
pacstrap /mnt base base-devel

cat << HERE > /mnt/arch-install-chroot.sh
set -e

function log {
  local LINE="[arch-linux-install] \$*"
  echo "\$LINE"
  echo "\${LINE//?/-}"
}

log "Setting up database for 'pacman -F filename' searching"
pacman -Fy

log "Installing kernel and other packages"
pacman -S --noconfirm linux linux-lts linux-headers linux-lts-headers

log "Installing other packages you want"
pacman -S --noconfirm man-db

log "Preparing ramdisks for kernel boot"
# Note: this might be redundant; pacman already did it?
mkinitcpio -p linux
mkinitcpio -p linux-lts

log "Setting up locale"
sed -i \
  -e 's/^#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' \
  -e 's/^#en_AU.UTF-8 UTF-8/en_AU.UTF-8 UTF-8/' /etc/locale.gen
locale-gen

log "Setting up users"
echo "root:\$__PASSPHRASE__" | chpasswd
useradd -m -g users -G wheel glh
echo "glh:\$__PASSPHRASE__" | chpasswd
echo '%wheel ALL=(ALL) ALL' > /etc/sudoers.d/wheel

log "Setting up boot"
pacman -S --noconfirm grub efibootmgr dosfstools os-prober mtools
mkdir -p /boot/EFI
mount /dev/nvme0n1p1 /boot/EFI
grub-install --target=x86_64-efi --bootloader-id=grub_uefi --recheck
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo
grub-mkconfig -o /boot/grub/grub.cfg

log "Setting up swap"
fallocate -l 2G /swapfile
chmod 600 /swapfile
mkswap /swapfile
echo -e '\n/swapfile none swap sw 0 0' >> /etc/fstab

log "Setting up encryption for /home"
pacman -S --noconfirm fscrypt
fscrypt setup
fscrypt setup /home
echo "auth optional pam_fscrypt.so" >> /etc/pam.d/system-login
echo "session optional pam_fscrypt.so drop_caches lock_policies" >> /etc/pam.d/system-login
echo "password optional pam_fscrypt.so" >> /etc/pam.d/passwd

log "Installing other dependencies"
pacman -S --noconfirm git neovim ruby tmux vi vim xorg-server

pacman -S --noconfirm inetutils # for hostname
pacman -S --noconfirm apcupsd # for auto-shutdown when UPS battery runs low
systemctl enable apcupsd

log "Installing gfx stuff"
pacman -S --noconfirm libva-mesa-driver linux-firmware mesa-vdpau vulkan-radeon xf86-video-amdgpu

log "Installing network support"
pacman -S --noconfirm wpa_supplicant wireless_tools netctl dhcpcd
pacman -S --noconfirm dialog # for wifi-menu, although we're not using it here

NETCTL_PROFILE=\$(echo "\$__SSID__" | tr ' ' '-' | tr '[:upper:]' '[:lower:]')
NETCTL_KEY=\$(wpa_passphrase "\$__SSID__" "\$__WIFI_PASSPHRASE__" | grep psk= | grep -v '#' | cut -d = -f 2)
NETCTL_CONFIG=/etc/netctl/\$NETCTL_PROFILE
NETCTL_SSID=\$(echo "\$__SSID__" | sed 's/ /\\\\ /g')
touch \$NETCTL_CONFIG
chmod 600 \$NETCTL_CONFIG
echo "Description='\$NETCTL_PROFILE'" >> "\$NETCTL_CONFIG"
echo "Interface=wlp4s0" >> "\$NETCTL_CONFIG"
echo "Connection=wireless" >> "\$NETCTL_CONFIG"
echo "Security=wpa" >> "\$NETCTL_CONFIG"
echo "ESSID=\$NETCTL_SSID" >> "\$NETCTL_CONFIG"
echo "IP=dhcp" >> "\$NETCTL_CONFIG"
echo "Key=\\\\\"\$NETCTL_KEY" >> "\$NETCTL_CONFIG"
netctl enable "\$NETCTL_PROFILE"

log "Applying other settings"
pacman -S --noconfirm terminus-font # for 4K display, instead of `setfont -d`
echo FONT=ter-132n >> /etc/vconsole.conf
echo KEYMAP=colemak >> /etc/vconsole.conf

ln -sf /usr/share/zoneinfo/Europe/Madrid /etc/localtime
hwclock --systohc

log "Cloning dotfiles"
sudo -u glh mkdir -p /home/glh/code
sudo -u glh git clone --recursive https://github.com/wincent/wincent.git /home/glh/code/wincent

log "Setting up /etc/motd"
echo "Suggested actions:" >> /etc/motd
echo "  sudo -s" >> /etc/motd
echo "  mkdir /home/glh_" >> /etc/motd
echo "  chown glh:users /home/glh_" >> /etc/motd
echo "  fscrypt encrypt /home/glh_ --user=glh" >> /etc/motd
echo "  exit" >> /etc/motd
echo "  cp -a -T /home/glh /home/glh_" >> /etc/motd
echo "  sudo reboot" >> /etc/motd
echo "" >> /etc/motd
echo "After rebooting:" >> /etc/motd
echo "" >> /etc/motd
echo "  fscrypt status /home/glh_" >> /etc/motd
echo "  sudo mv /home/glh /home/glh_plaintext" >> /etc/motd
echo "  sudo mv /home/glh_ /home/glh" >> /etc/motd
echo "  sudo reboot" >> /etc/motd
echo "" >> /etc/motd
echo "And finally:" >> /etc/motd
echo "" >> /etc/motd
echo "  find /home/glh_plaintext -type f -print0 | xargs -0 shred -n1 --remove=unlink" >> /etc/motd
echo "  sudo rm -rf /home/glh_plaintext" >> /etc/motd
echo "  echo -n | sudo tee /etc/motd" >> /etc/motd

exit
HERE

log "Entering chroot environment"
arch-chroot /mnt /bin/bash arch-install-chroot.sh

log "Finished: rebooting"
rm /mnt/arch-install-chroot.sh

# Ignoring errors about unmounting...
set +e
umount -a

reboot

Involuntary reboot log 10.13

Left machine running Steam overnight with backlight off. Fan was running and machine was working. Backlight wouldn’t come on the next day and machine wouldn’t unlock. Hard reset.

Statistics so far for this machine

  • Failure type: hard reset
  • OS version: 10.13.6
  • Uptime at moment of failure: unknown
  • Kernel panics: 0
  • Hard resets: 13
  • Total failures: 13
  • Start of recording keeping: 31 October 2017
  • Total days to date: 965
  • Average time between failures: 74.23 days

Summary of events for this machine

  1. 2017-11-16: jammed keyboard on waking from sleep.
  2. 2017-11-16: spontaneous reboot on waking from sleep.
  3. 2018-07-15: frozen mouse pointer.
  4. 2018-11-03: jammed keyboard on waking from sleep.
  5. 2018-11-16: jammed keyboard on waking from sleep.
  6. 2018-11-18: jammed keyboard on waking from sleep.
  7. 2018-11-24: freeze half-way through passphrase entry on waking from sleep.
  8. 2018-11-24: jammed keyboard on waking from sleep.
  9. 2018-11-27: jammed keyboard on waking from sleep (even with Karabiner-Elements partially disabled).
  10. 2018-11-29: jammed keyboard on waking from sleep (even with Karabiner-Elements totally disabled).
  11. 2018-12-03: jammed keyboard on waking from sleep (because key repeat was not turned off; it seems the hook did not run).
  12. 2019-07-06: total freeze on waking from sleep, post-screen-unlock.
  13. 2020-06-22: unable to unlock or make backlight come on.

Historical data (all machines)

For comparison, previous generations of machines (from most oldest to most recent) that I’ve used have had averages of:

Active? Average uptime Total lifetime Log Model Description
~13.83 days ~540 days #1 — #39 PowerMac G5 personal machine
22.73 days 1,364 days #40 — #60 iMac (17", Early 2006) personal machine
20.06 days 321 days 2.x iMac (27", Late 2009) personal machine
19.11 days 707 days 3.x MacBook Air (13", Late 2010) work machine (Causes)
41.86 days 293 days 4.x MacBook Air (13", Mid-2012) work machine (Causes)
2.0 days 2 days 5.x MacBook (unsure of model) work machine (Causes), loaner laptop
27.176 days 462 days 6.x MacBook Air (13", Mid-2013) work machine (Facebook)
35.0 days 140 days 7.x as above, but with a replacement shell work machine (Facebook)
40.8 days 245 days 8.x MacBook Pro (Retina, 15-inch, Mid 2015) work machine (Facebook)
87.0 days 522 days 9.x MacBook Pro (Haswell, Mid-2015, dual graphics) work machine (Facebook)
74.23 days 965 days 10.x MacBook Pro (Haswell, Mid-2015, dual graphics) personal machine
n/a n/a 11.x MacBook Pro 15-Inch "Core i7" 2.6 Touch/2018 work machine (Liferay)