Ubuntu close lid without suspension
Edit systemd file
sudo vi /etc/systemd/logind.conf
Find and set
HandleLidSwitch=ignore
Restart
systemctl restart systemd-logind.service
Or simply restart your entire system
sudo vi /etc/systemd/logind.conf
HandleLidSwitch=ignore
systemctl restart systemd-logind.service
Or simply restart your entire system