
[Stolen from https://discussion.fedoraproject.org/t/gnome-suspends-after-15-minutes-of-user-inactivity-even-on-ac-power/79801]
Since Fedora 38, systems with the GNOME desktop environment suspend after 15 minutes of user inactivity, even when plugged into the AC outlet. This affects new installs and some upgraded systems (depending on whether you touched that setting in the past).
Adjusting the login screen (on a server where no one logs in)
If you want to modify the login screen behavior, you can display the current login screen settings with this command:
sudo -u gdm dbus-run-session gsettings list-recursively org.gnome.settings-daemon.plugins.power | grep sleep
Which prints an output like 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'
The sleep-inactive-ac-timeout
is the Plugged in option and sleep-inactive-battery-timeout
is the On Battery Power option. The number is the delay in seconds. You can configure the values like this:
sudo -u gdm dbus-run-session gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 1800
This sets the Plugged in delay to 1800
seconds, i.e. 30 minutes. You can use 0
to disable the automatic suspend completely. You can verify that the option was set by displaying the current values as described above.