- I’m using a laptop as a server
- I usually close my laptop and connect with SSH and VNC to operate it.
In this situation, if you restart from SSH, it will not restart at all, but if you open the lid, it will restart properly.
solution
First, execute the following to open the configuration file with nanosudo nano /etc/systemd/logind.conf
Next, HandleLidSwitch
remove the #HandleLidSwitch=ignore
attached, set the comment out to uncommented , and press Ctrl + X to save and exit.
Finally, sudo systemctl restart systemd-logind.service
run it and restart the service and you’re done.