I run into an issue on my laptop that it doesn't sleep when I close my laptop's lid. Here is the solution that I found on the internet.
nvim /etc/systemd/logind.conf
HandleLidSwitchDocked=suspend
HandleLidSwitch=suspend
HandleLidSwitchExternalPower=suspend
sudo systemctl restart systemd-logind
https://bbs.archlinux.org/viewtopic.php?id=205349