Black screen with cursor after logging out of guest account on High Sierra When I log out of my guest account, it gets stuck with a black screen and a cursor that I can move around but can't do anything except do a forced restart. In my searching, I have seen an old recommendation to remove the /Library/Preferences/com.apple.loginwindow.plist file (that didn't work for me). I've also seen that someone disabled System Integrity Protection with csrutil disable.

I looked in the Console after restarting and saw the following line:

Apr 24 12:45:55 my-computer com.apple.xpc.launchd[1] 
 (com.apple.xpc.launchd.user.domain.201.100028.Aqua):
 Caller not allowed to perform action: loginwindow.1627,
 action = service removal, code = 150:
 Operation not permitted while System Integrity Protection is engaged,
 uid = 0, euid = 201, gid = 201, egid = 201, asid = 100028


This mentions both loginwindow and System Integrity Protection. Is disabling SIP the only way to fix this?
How I solved this issue on Mac OS 10.13 High Sierra:


Boot into Recovery Mode (Command-R)
Open Terminal, disable SIP (csrutil disable), restart
Login to Guest, logout (it should not hang on a black screen now)
Boot into Recovery Mode (Command-R)
Open Terminal, enable SIP (csrutil enable), restart
Login to Guest, logout (it still works!)