7

On the desktop login screen (GDM3) my computer will put the screens into power saving mode after 15 seconds of inactivity. I would ideally like to disable power saving in this situation, or at least lengthen the period.

I have tried disabling all power saving options that I can find in gsettings, both for my user and for root, but this has not affected the 15 second timeout.

What else can I try?

I'm running Ubuntu 19.04 with Gnome Shell 3.32.2. I have found various older questions concerned with the same issue, but they all relate to LightDM:

4 Answers4

5

This default setting (suspend at login) affects me in Pop!os 20.04. When away from home I want to login to my home PC, and it is set to boot at 6am. But that's no use when it suspends :)

This is an easy fix:

From: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=893964#22

It's 20 minutes, and is a result of the defaults in gnome-settings-daemon 3.28 changing to comply with European and American power-saving regulations.

there appears to be no way of switching the GDM suspend behaviour off

There's currently no UI for it, but if you append this to /etc/gdm3/greeter.dconf-defaults:

# Automatic suspend
# =================
[org/gnome/settings-daemon/plugins/power]
# - Time inactive in seconds before suspending with AC power
#   1200=20 minutes, 0=never
sleep-inactive-ac-timeout=0
# - What to do after sleep-inactive-ac-timeout
#   'blank', 'suspend', 'shutdown', 'hibernate', 'interactive' or 'nothing'
sleep-inactive-ac-type='nothing'
# - As above but when on battery
# sleep-inactive-battery-timeout=1200
# sleep-inactive-battery-type='suspend'

then reboot (or run "service gdm3 reload" as root), that should put the GDM session back to the pre-3.28 behaviour. The values are in seconds, with 0 meaning never; please adjust as needed.

Note: this still works in Ubuntu 21.10. Also, if you want the screens to go into suspend mode but you don't want to suspend, set a timeout, and set the type to be 'blank'

For changes to take effect, reboot or

sudo systemctl restart gdm3 
2

Create /etc/dconf/profile/gdm and add:

user-db:user
system-db:gdm
file-db:/usr/share/gdm/greeter-dconf-defaults

Create /etc/dconf/db/gdm.d/01-power and add:

[org/gnome/settings-daemon/plugins/power]
sleep-inactive-ac-timeout=0
sleep-inactive-ac-type='nothing'

Run sudo dconf update

vanadium
  • 97,564
0

xset -dpms disables DPMS, meaning you will see a black screen, not an off monitor. xset +dpms re-enables it.

xset s 300 changes the timeout to 300 seconds.

Neither of these commands persist across logout, but you can add them to ~/.xsession.

David
  • 31
-1

Run the following script as root :

#!/bin/bash

cat > /etc/lightdm/lightdm.conf.d/50-dpms.conf <<EOF
echo '[SeatDefaults]
display-setup-script=/usr/local/bin/dpms-stop'
EOF


cat > /usr/local/bin/dpms-stop <<EOF
#!/bin/sh
sudo xhost +si:localuser:lightdm 
sudo su lightdm -s /bin/bash <<HERE
/usr/bin/xset -dpms
exit
HERE
EOF

chmod +x /usr/local/bin/dpms-stop

Then reboot

jmary
  • 666
  • 4
  • 15