8

Since the latest update of Gnome / GDM my computer seems to be put into suspend mode when I am idle on the logon screen for about 20 minutes.

This was not the case before the update. Current Version of gnome-session & gdm 3.28.0. I'm running Arch Linux.

The system log, centered around Mar 29 17:21:17 oliver-desktop kernel: PM: suspend exit +/- 200 lines. If you need more, let me know.

I have looked through a lot of the gsettings, none of the ones I tried were able to make gdm behave otherise. Also, the configuration documentation does not hint to any option related to auto-suspend.

founderio
  • 220
  • 2
  • 9

2 Answers2

10

You'll find https://wiki.archlinux.org/index.php/GDM#GDM_auto-suspend_.28GNOME_3.28.29 useful.

GDM auto-suspend (GNOME 3.28)

GDM uses a separate dconf database to control power management. You can make GDM behave the same way as user sessions by copying the user settings to GDM's dconf database.

$ IFS=$'\n'; for x in $(sudo -u YOUR_USER gsettings list-recursively org.gnome.settings-daemon.plugins.power); do eval "sudo -u gdm dbus-launch gsettings set $x"; done; unset IFS

yvbbrjdr
  • 116
  • 1
  • 3
  • I understand that you’re quoting, but, FYI, the `eval` is probably unnecessary.  (And `eval` is often harmful, so it’s best to avoid unnecessary ones, especially in conjunction with ``sudo``.) – Scott - Слава Україні Apr 03 '18 at 03:14
  • Yup. And I don't know why the official wiki uses `eval`. – yvbbrjdr Apr 03 '18 at 07:10
  • Can't test it right now, but this looks excactly like the type of edge case I have. Thank you so much! – founderio Apr 03 '18 at 08:45
  • Tested it now - Yes, it works! – founderio Apr 03 '18 at 20:29
  • It might be worth mentioning that attempting to do this from a terminal whithin a session that is running dbus already might cause issues. If you receive a message like `No protocol specified`, try running from a tty instead. For the record, I manually changed the settings with `sudo -u gdm dbus-launch gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'nothing'` and `sudo -u gdm dbus-launch gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type 'nothing'` instead of the above `eval` method. – founderio Apr 20 '18 at 14:10
  • thanks, not a good default for servers that might have a gdm installed an sure don't want to go hibernated – user1708042 Sep 23 '18 at 19:43
8

I ran into the same issue on Debian testing (Debian 10 "Buster").

I found that this is independent of the power settings made by an unprivileged user within a Gnome login session. It also suspends during an active SSH or VNC session.

The offending settings can be printed to the console. As superuser:

su -s /bin/bash Debian-gdm
unset XDG_RUNTIME_DIR

dbus-launch gsettings get org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type
dbus-launch gsettings get org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout

This prints 'suspend' and '1200', respectively.

To turn off suspension, set:

dbus-launch gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type nothing

I also filed a Debian bug report here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=896083

  • For any Fedora family distro users out there, `dbus-launch` is provided by the package `dbus-x11`, as of time of writing. – cyqsimon Aug 09 '23 at 07:29