Apple - Mac on High Sierra won't shutdown cleanly: black screen with mouse

Restarting in safe mode allowed proper shutdown:

Start your Mac, then immediately press and hold the Shift key. The Apple logo appears on your display.

Release the Shift key when you see the login window.

I was able to use safe mode used this to update to 10.13.6 (problem still existed) and 10.14 (problem resolved -- can now shutdown).

The same happened to me after upgrading to 10.14.6.

As referring to the answer here, I tried to shutdown with

sudo shutdown -h now

then terminal stuck with

shutdown: / is busy updating; waiting for lock

then I opened Activity Monitor and just force killed the process named kextd