I use shutdown -h time command to shutdown my laptop after a particular time. I observed that the laptop doesnt come to a halt after the set time if the lid of my laptop is closed. When i open the lid the next morning it tells " goint to halt". So how do i make ubuntu shotdown at a pre-set time even if the lid is closed.?
To make Ubuntu do nothing when sytem is closed
/etc/systemd/logind.conf file in a text editor as root, for example,
sudo -H gedit /etc/systemd/logind.conf
3.Add a line
HandleLidSwitch=ignore (make sure it's not commented out!),
Restart the systemd daemon with this command:
sudo restart systemd-logind