Fedora/Gnome: Disable automatic suspend for remote logins

Tips&Tricks

Fedora with the Gnome desktop suspends after 15 minutes if no user is logged into the machine. This does affect remote logins via SSH or the Remote Login RDP functionality. The Gnome settings do not allow changing the "Automatic Suspend" options of the system, but only for each user.

You can inspect the configuration for GDM using these shell commands. The 900 are the timeout in seconds, i.e., 15 minutes.

$ sudo -u gdm dbus-run-session gsettings list-recursively org.gnome.settings-daemon.plugins.power | grep sleep
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'

Setting the timeout to 0 disables the timeout. Disable suspend while on AC power:

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

Disable suspend while on battery power:

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

More details in this forum post.