Stop Fedora hiberanating

option 1

disable

sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

enable

sudo systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target

check

sudo systemctl status sleep.target suspend.target hibernate.target hybrid-sleep.target

note: restart required

source

 option 2

In /etc/systemd/logind.conf add the following lines at the bottom:

HandleSuspendKey=ignore
HandleHibernateKey=ignore
HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore
HandleLidSwitchDocked=ignore

and run

systemctl restart systemd-logind

source