You are not logged in.
I updated one of my machines this weekend after a long time without updates, and now the computer is putting itself to sleep whenever the hardware idles. I use this machine locally and remotely and use it as a remote endpoint for communication back to my house, so I would prefer that it not auto-suspend.
I noticed that xfce's power manager had all of the auto-suspend options greyed out, and reading the debug output of xfce4-power-manager shows that GDBus is blocking its inhibiting of systemd sleep:
xfce4-power-manager Unable to inhibit systemd sleep: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Permission denied
In the current circumstance, the system is locally logged out (GDM is running) and remotely logged in (XFCE via vnc+ssh), and the system suspends even when remote activity is ongoing.
Thanks in advance.
Offline
Hello, I have the same problem on manjaro linux after the last update. If no one is logged in, the computer will sleep. I am using a tvheadend server and this behavior is undesirable. / gnome + gdm /. Have you solved it somehow?
solved
sudo -u gdm dbus-launch gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'nothing'
Last edited by vacapetr (2018-04-15 10:29:37)
Offline
The gdm user can't see your personal user's settings, so it's going to autosuspend.
Here are Fedora's instructions for working around this issue.
I'm going to paste them here for posterity, because the workaround is probably going to be removed from the Fedora page soon when that page is updated for the final Fedora 28 release:
GNOME 3.28 now automatically suspends the system after 20 minutes of user inactivity. Even if you disable/adjust this functionality in GNOME Settings, it only applies to your particular user session only, and does not affect the default system behavior, which is used when the local screen shows a GDM screen. This will affect you e.g. when you log out or switch between users, when you just start the machine without logging in and access it remotely (file sharing, ssh), etc. With some desktop environments, like Fluxbox, your system will also immediately suspend when you log out.
You can disable (or configure) auto-suspend system-wide by creating a file /etc/dconf/db/local.d/00-autosuspend with this or similar contents:
[org/gnome/settings-daemon/plugins/power]
# Do not autosuspend
sleep-inactive-ac-type='nothing'
sleep-inactive-battery-type='nothing'and running:
sudo dconf update
Offline
I am having same experience since end of December, 2024 when I updated the system. I fixed it by masking the systemd suspend:
systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
This works, however now I get a message on my screen when coming back from the screensaver, a "permission denied" error because it failed to suspend. The xfce4-power-manager is also tracing error messages if I run it in debug mode, so I know that it is trying very hard to suspend. But I have the switches turned off I think.
Offline