Can’t say if it’s working out of box or not, because I’m reusing an existing installation. Here is my setup.
sudo nano /etc/systemd/logind.conf
Changed the following lines:
HandleLidSwitch=suspend
HandleLidSwitchExternalPower=suspend
HandleLidSwitchDocked=suspend
Settings:
power > Automatic Suspend , on battery power delay 15 minutes.
My OS is Pop!_OS 22.04 w/ latest updates
Kernel: 6.6.6 (the beast)
One funny thing is that:
if I press suspend button on the OS, it suspends. Then when i close the lid, it will turn it back on…
But if I just straight up closing the lid, it suspends and not turning back on.