Linux keeps going into suspend
I have a desktop machine that keeps going into suspend. I want this machine to never go into suspend.
First execute this
systemctl status sleep.target suspend.target hibernate.target hybrid-sleep.target
You will get four answers – look for the entries “Loaded: loaded”
Now execute
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
and check it again
systemctl status sleep.target suspend.target hibernate.target hybrid-sleep.target
This time you should get “Loaded: masked” in the replies
Tested on Fedora 40