making ubuntu go to sleep when screen closed code example
Example: ubuntu turn of sleep
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target