Talk: GNOME suspends after 15 minutes of user inactivity, even on AC power

Not sure if you are asking me. This is an old thread. I’m on Fedora 41 and haven’t had this problem for a long time. Now I dread upgrading to 43 based on your report.

I was very put off by the rationale for the change. Users come first. We don’t use Fedora because it is an OS that pleases corporate security teams, which I’ve had to push back on because corporate security didn’t care about our revenue source – customers. We chose Fedora because it was an OS that empowers users and let’s users decide how they want to use the OS.

I understand setting defaults to meet security standards. But, there must be user centric overrides.

We saw this story play out with Centos. Now I use Rock Linux for servers and will never invest in IBM.

The Linux community will always back the fork that supports users for both workstation and server, and has learned to avoid forks controlled by corporate interests.

I’m trying to replicate the issue. In the meantime, Rafael, you can try to use the same approach that Fedora Server uses. Put this file into /usr/share/glib-2.0/schemas/ and run glib-compile-schemas /usr/share/glib-2.0/schemas/.

Tell us if it changed anything.

1 Like

You can see who the person is replying to by looking into the top right corner of the post, there’s a reply arrow visible in there if it’s a reply to a particular post.

A tad off-topic. But, what top right are you referring to?

Hey Kamil, I deleted the previous logind configuration files, as well as the ~gdm/.config and ~gdm/.cache folders, reloaded the systemctl daemon.

Then, I created the file you suggested, compiled the schemas and rebooted, and the computer hasn’t gone to sleep :smiley: So it seems that way to set the settings is working. Thanks for the help!

@erik777 I suppose you can’t see it in the email, but in the forum webpage you can see the reply indicator showing I was replying to Kamil.

Great. I also reproduced the issue you’re seeing, on bare metal, clean F43 Workstation install, fully updated. I’ll try to figure out how to resolve it without needing to install a file to /usr/share.

When fedora switched to the automatic suspend some time back one of the suggestions was to create a file /etc/systemd/sleep.conf.d/sleep.conf. In that file I placed the following

 Sleep]
AllowSuspend=no
AllowSuspendThenHibernate=no
AllowHibernate=no
AllowHybridSleep=no

This has prevented my system from suspending ever since. No additional changes were required and it works when the system is booted without the need for a user to be logged in.

Just as an additional, I also masked the appropriate services/targets that were related.
The services included systemd-hibernate.service, systemd-hybrid-sleep.service, systemd-suspend.service, & systemd-suspend-then-hibernate.service.
The targets included hibernate.target, sleep.target, hybrid-sleep.target, suspend.target, & suspend-then-hibernate.target.

With later testing I confirmed that the entries in /etc/systemd/sleep.conf.d/sleep.conf were adequate and the mask of the services and targets was overkill

In my case I am running a home media server and it was mandatory that the server be active 24 /7 so automatic suspend was an absolute NO-GO for me.

That is very useful. Thank you. I am more confident about upgrading to F43 now. We probably need a wiki page or formal documentation on it. But, here is a discussion that explains it well:

https://discussion.fedoraproject.org/t/how-to-prevent-laptop-sleeping-after-reboot-before-login/107783

This is not a good general solution, because, IIUIC, it doesn’t just disable automatic suspend, it completely prevents suspend. You might like this approach, but it’s not the same as what many people (including me) want - suspend manually when needed, but not automatically.

1 Like

I’ve adjusted the issue description to document the gschema override approach, even though it’s not very nice (touches /usr/share). I’ve also added a comment to this relevant gdm bug. Hopefully GDM developers will look at it.

2 Likes