Laptop With the Lid Closed

To disable entering the sleep mode I had to edit the /etc/systemd/logind.conf file and modify the line:

	#HandleLidSwitch=suspend
	
	to	

	HandleLidSwitch=ignore

Additionally, ensure that the file also has this line:

LidSwitchIgnoreInhibited=no

Then restart the OS via:

sudo service systemd-logind restart

figture: lid

Related
Personal · Blog · Ubuntu