2

This PC is often left in a logged out state at the login screen. I have set power options to automatically suspend on idle, and these do work if a user is logged in.

They do not work if the computer is left at the login screen though. Using gdm3 as the login.

How can I enable this?

  • Came here searching for the solution, but on 19.04. Hopefully another comment gives this a bump? – Anville Aug 20 at 1:36
0

This thread might contain your solution:

https://ubuntuforums.org/showthread.php?t=2425058&p=13881017#post13881017

First, I needed to use su to switch to user "gdm":

sudo su - gdm -s /bin/bash

(If running in a non-GUI context, such as ssh, I also needed to run : export $(dbus-launch) )

Then I was able to set some gnome settings as the the user "gdm"

GSETTINGS_BACKEND=dconf gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type suspend

GSETTINGS_BACKEND=dconf gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 120

This sets the GDM3 screen to suspend after 2 minutes idle. Verify the settings with "get" commands:

GSETTINGS_BACKEND=dconf gsettings get org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type

GSETTINGS_BACKEND=dconf gsettings get org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout

These values can also be modified with GUI dconf-editor. Before the su command, you need to run (as your regular user)

xhost +

and then after the change to gdm user via su, you can run:

dconf-editor

Be careful, though, with using this app.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.