GNOME automatically sleeps your computer

GNOME, at least on Fedora 38 and on debian 12, will put your computer to sleep if the mouse and keyboard haven't been used for 15 minutes. This makes the rather rash assumption that a computer running GNOME is only doing GNOME things, and only for a person active at the console. There are many things for which this assumption is wrong. Here are some for my desktop computer: - I have a HexChat IRC client running. I want messages captured, even if I am AFK (that's IRC-speak for Away From Keyboard) - I run an SMTP server and I want to receive email all the time. - I run an SSH server so that I can SSH-in, for example, to read my mail - sometimes I do large software builds that take more than 15 minutes. - on occasion I've done long running calculations - I have cron jobs (Window has a similar policy. I've left a computer to do Windows Update (which can take hours!) only to find it had gone to sleep without accomplishing its task.) This change showed up unannouced in Fedora 38 and has created a hubub. I don't see a similar upset in the debian community. <https://discussion.fedoraproject.org/t/gnome-suspends-after-15-minutes-of-user-inactivity-even-on-ac-power/79801> <https://bugzilla.redhat.com/show_bug.cgi?id=2190021> If I look at machines in my family, this policy works for our notebooks but generally does not work for desktops. I don't think that this should be a GNOME function since GNOME doesn't know everything about a machine. It seems like a better fit with systemd. To suppress sleep (but only when on AC power) on Fedora 38, create a file "/etc/dconf/db/site.d/do-not-suspend", owned by root, and put in it these two lines, not indented: [org/gnome/settings-daemon/plugins/power] sleep-inactive-ac-timeout=0 Superstition: you probably need to reboot for this to take effect. That doesn't work in debian. If I remember correctly, this does: Note, you need to do this for user "gdm", the login screen, too. Check setting for $USER that might login at the console: $ sudo -u $USER dbus-run-session gsettings get org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'suspend' Suppress sleep (while on AC power) for $USER: $ sudo -u $USER dbus-run-session gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type nothing

Wow, what an incredibly obnoxious setting to have non GUI configurable. In xfce you can use the Power Manager control panel to tune this. Would `xfce-power-manager-settings` work in gnome? Some of the gnome controls work in xfce. Thu, Aug 24, 2023, at 1:31 PM, D. Hugh Redelmeier via talk wrote:
GNOME, at least on Fedora 38 and on debian 12, will put your computer to sleep if the mouse and keyboard haven't been used for 15 minutes.
This makes the rather rash assumption that a computer running GNOME is only doing GNOME things, and only for a person active at the console.
There are many things for which this assumption is wrong. Here are some for my desktop computer:
- I have a HexChat IRC client running. I want messages captured, even if I am AFK (that's IRC-speak for Away From Keyboard)
- I run an SMTP server and I want to receive email all the time.
- I run an SSH server so that I can SSH-in, for example, to read my mail
- sometimes I do large software builds that take more than 15 minutes.
- on occasion I've done long running calculations
- I have cron jobs
(Window has a similar policy. I've left a computer to do Windows Update (which can take hours!) only to find it had gone to sleep without accomplishing its task.)
This change showed up unannouced in Fedora 38 and has created a hubub. I don't see a similar upset in the debian community. <https://discussion.fedoraproject.org/t/gnome-suspends-after-15-minutes-of-user-inactivity-even-on-ac-power/79801> <https://bugzilla.redhat.com/show_bug.cgi?id=2190021>
If I look at machines in my family, this policy works for our notebooks but generally does not work for desktops.
I don't think that this should be a GNOME function since GNOME doesn't know everything about a machine. It seems like a better fit with systemd.
To suppress sleep (but only when on AC power) on Fedora 38, create a file "/etc/dconf/db/site.d/do-not-suspend", owned by root, and put in it these two lines, not indented:
[org/gnome/settings-daemon/plugins/power] sleep-inactive-ac-timeout=0
Superstition: you probably need to reboot for this to take effect.
That doesn't work in debian. If I remember correctly, this does: Note, you need to do this for user "gdm", the login screen, too.
Check setting for $USER that might login at the console: $ sudo -u $USER dbus-run-session gsettings get org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'suspend'
Suppress sleep (while on AC power) for $USER: $ sudo -u $USER dbus-run-session gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type nothing --- Post to this mailing list talk@gtalug.org Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk

D. Hugh Redelmeier via talk wrote on 2023-08-24 06:31:
GNOME, at least on Fedora 38 and on debian 12, will put your computer to sleep if the mouse and keyboard haven't been used for 15 minutes.
This makes the rather rash assumption that a computer running GNOME is only doing GNOME things, and only for a person active at the console.
I would contend that automatic sleeping is not rash, but to be expected from the majority of users, especially on laptops, and especially newer users who a distro may want to avoid frustrating.
There are many things for which this assumption is wrong. Here are some for my desktop computer:
These tasks are all either advanced-level or server-focused, which most of the time won't even have a keyboard (i.e. VPSs).
I don't think that this should be a GNOME function since GNOME doesn't know everything about a machine.
I hate to defend Gnome devs, but they can't set defaults that will work for 100% of users 100% of the time; they have to make some assumptions. Maybe even enabling telemetry for making informed decisions in exactly this type of situation. I'm gonna side with them here - I find it a reasonable assumption (although maybe 15 minutes is a bit too soon).
To suppress sleep (but only when on AC power) on Fedora 38, create a file "/etc/dconf/db/site.d/do-not-suspend", owned by root, and put in it these two lines, not indented:
[org/gnome/settings-daemon/plugins/power] sleep-inactive-ac-timeout=0
Now *that* is obnoxious if there isn't a method within the default GUI to easily change this behaviour!
That doesn't work in debian. If I remember correctly, this does:
Also obnoxiously obtuse. Is there really no way to tweak this in the GUI? I trust you would've found it were it easy, so I'll chalk it up to another reason to (personally) stay far away from Gnome. Cheers, rb

| From: BCLUG via talk <talk@gtalug.org> | Is there really no way to tweak this in the GUI? There is a way. A user can change what GNOME does when they are logged in settings: Power: (Power Saving Options) Automatic Suspend: off But this has no effect on GDM (the login screen) or any other user. I want a system-wide setting. (There are parallel settings for when operating on AC power and when operating on battery power. I don't think that the GUI exposes that.)

D. Hugh Redelmeier via talk wrote on 2023-09-01 05:54:
Is there really no way to tweak this in the GUI?
There is a way. A user can change what GNOME does when they are logged in
settings: Power: (Power Saving Options) Automatic Suspend: off
Thanks for the feedback Hugh - that seems reasonable.
But this has no effect on GDM (the login screen) or any other user.
Oh, I hadn't considered that. Now I'm wondering why mine (KDE) would do if left at log-in screen. Thinking back, I recently set up a laptop for remote access, returned home, logged in, and it shut down moments later. Neglected to disable power saving shut-downs.
I want a system-wide setting.
Entirely reasonable. rb

On 9/2/23 04:50, BCLUG via talk wrote:
D. Hugh Redelmeier via talk wrote on 2023-09-01 05:54:
Is there really no way to tweak this in the GUI?
There is a way. A user can change what GNOME does when they are logged in
settings: Power: (Power Saving Options) Automatic Suspend: off
But this has no effect on GDM (the login screen) or any other user.
I want a system-wide setting.
There may be a don't start screensaver" setting, for people doing presentations. I remember hunting one down many moons ago, for a talk. It let me close the lid and still run a projector. --dave

I read some of the threads from the first email where the devs are discussing the energy legislation that motivated this decision. The main word of the law is posted here: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/commit/2fdb48fa333363... (The discussion seemed to suggest that desktops might not have the same requirements as laptops but idk the context for that; + there are multiple jurisdictions to comply with.) That said, looks that they're exceeding the requirements by a long shot. The wording uses language like "*default* period of time...shall not exceed 20 minutes" and "*offer* a power management function". Nothing to prohibit change of setting by user. Hopefully they will get around to adding it in someplace. It's bad to have it hidden in a text file. Speaking for myself, I anticipate that I would probably end up totally disabling the power management if it was annoying to adjust. The first time I encountered a situation where it was in my way, I would find out how to turn it off, then immediately forget I could turn it back on. If it's in a panel/widget somewhere you can temporarily extend the allowance when needed. Does wake on lan work in this case? I have almost used it a couple times but never quite needed it. If so, maybe the solution is to have a second device like your phone or router send a packet every 14 (or 16?) minutes. If you have 2 laptops/desktops with the same problem you could stagger to WOL back and forth every 7 minutes. Problem solved. On Sat, Sep 2, 2023, at 11:40 AM, David Collier-Brown via talk wrote:
On 9/2/23 04:50, BCLUG via talk wrote:
D. Hugh Redelmeier via talk wrote on 2023-09-01 05:54:
Is there really no way to tweak this in the GUI?
There is a way. A user can change what GNOME does when they are logged in
settings: Power: (Power Saving Options) Automatic Suspend: off
But this has no effect on GDM (the login screen) or any other user.
I want a system-wide setting.
There may be a don't start screensaver" setting, for people doing presentations. I remember hunting one down many moons ago, for a talk. It let me close the lid and still run a projector.
--dave
--- Post to this mailing list talk@gtalug.org Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk
participants (4)
-
BCLUG
-
bitmap
-
D. Hugh Redelmeier
-
David Collier-Brown