Mac Black Screen of Death

After a power outage, my iMac (27″, Late 2012) with macOS Sierra (10.12.2) booted into a black screen with the mouse in the upper left. Notifications seemed to be showing up (as they do on the login screen).

Several leads didn’t pan out. Ones that were basically different kind of resets.

Mark Gibbs tipped me off that it might be a problem with a corrupted /Library/Preferences/com.apple.loginwindow.plist file.

Single User Mode

Booting into single user mode (Command-S during boot) drops you into a terminal, which allowed me to look at the file. Not knowing what it’s supposed to look like, it was hard to tell if the (likely digitally stored) file should look like.

bplist00€	


_RetriesUntilHint\GuestEnabled_OptimizerLastRunForSystem\lastUserName]autoLoginUser_OptimizerLastRunForBuild_HiddenUsersList[AccountInfoXlastUser_autoLoginUserScreenLocked^lastLoginPanic	
XbshirleyXbshirley`°Y_conveyor”\MaximumUsersYAllLoginsYOnConsole—Xbshirley—XloggedIn	#AæFt?È`2?[hvë£Ø?‘„ÂÊÎÙ?",68;DGPQZ

The beginning of that file indicates it’s a property list stored in binary form, so it’s hard to interpret in textual form.

The filesystem is read-only when you boot into single user mode, so by default you can’t delete (or preferably move) the file.

Remount Filesystem

The answer to that I found on Stack Overflow. You can use the UNIX mount command to remount the existing filesystem in a writable state.

sudo /sbin/mount -uw /

Rename File

Once that was the case, I rename the file (incase I needed it for something) and then

cd /Library/Preferences
mv com.apple.loginwindow.plist com.apple.loginwindow.plist.XXX

Once that was done, exiting single user mode and rebooting is as simple as

reboot

A few items were reset from my previous login, but otherwise all was well.