Endless OS - Laptop hangs at shutdown

There could be many different root causes for the issue which are very hard to diagnose remotely. But there’s a workaround - decrease the timeout to some lower value, like e.g. 15 seconds.

Open a Terminal, then enter:

sudo sed -i s/"#DefaultTimeoutStopSec=90s"/DefaultTimeoutStopSec=15s/g /etc/systemd/system.conf
sudo sed -i s/"#DefaultTimeoutAbortSec="/DefaultTimeoutAbortSec=15s/g /etc/systemd/system.conf
sudo systemctl daemon-reload

This will not fix your root issue, but will gracefully complete the shutdown after a timeout of 15 seconds.