I have a cheap USB-C dock that I use to both charge my Carbon X1 and connect it to an external monitor. When I close the laptop lid, I want it to suspend. The developers of Gnome disagree. I tried several hacks before finding this one using ACPI.
This hack grabs the lid switch event before Gnome can get to it.
Put force_lid_suspend in /etc/acpi/events/ and force_lid_suspend.sh in /etc/acpi/
sudo chmod +x /etc/acpi/force_lid_suspend.sh
sudo systemctl enable acpid
sudo systemctl restart acpid