This is closely related to this question: How can I tell Ubuntu to do nothing when I close my laptop lid?.
I would like to stop Ubuntu from suspending or sleeping when the laptop lid is closed, while still turning the screen off to save power. How can I do that?
This is for a Dell Precision 5550 running Ubuntu 20.04 preinstalled.