xxxxxxxxxx
Edit the /etc/systemd/logind.conf file, add the following lines at the end,
HandleSuspendKey=ignore
HandleHibernateKey=ignore
HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore
HandleLidSwitchDocked=ignore
and finally to restart the systemd process via;
Code:
$ systemctl restart systemd-logind