I am running proxmox on a thinkpad laptop. How can I close the lid but keep proxmox running?

To prevent a laptop running debian from sleeping when you close the lid:

Find the logind.conf file and uncomment the handle lid switch and change it from suspend to ignore

  1. nano /etc/systemd/logind.conf
  2. Find the #HandleLidSwitch=suspend
    1. Change it to HandleLidSwitch=ignore
    2. Save and Exit
  3. Restart systemd logind
    1. systemctl restart systemd-logind
  4. Check its status
    1. systemctl status systemd-logind

Reference Link

I am running proxmox on a thinkpad laptop. How can I close the lid but keep proxmox running?