Prevent Fedora Workstation from suspending

While not using a monitor on my elitedesk I had to prevent GNOME from suspending the computer after 900 seconds. Active SSH connections where also ignored.

Note that this behavior is only for Fedora Workstation 38 and newer. Fedora Server has this disabled by default.

Run this command:

sudo -u gdm dbus-run-session gsettings list-recursively org.gnome.settings-daemon.plugins.power | grep sleep

And you will see something similar to this:

org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 900
org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'suspend'
org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 900
org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type 'suspend'

Run this command to set a new value:

sudo -u gdm dbus-run-session gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 0

0 equals disabled.

Solution as written on the