4

Just installed Debian 12.0.0.

Upgrade from 11.2 didn't work, so installed clean from Bookworm DVD.

sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

DOES NOT prevent screen from going to black even though

sudo systemctl status sleep.target suspend.target hibernate.target hybrid-sleep.target 

DOES show that they are all masked. This worked perfectly on Debian 11.2 on this machine, and is still working fine on my other Debian 11.2 server.

Creating /etc/systemd/sleep.conf.d/nosuspend.conf AS:

[Sleep]
AllowSuspend=no
AllowHibernation=no
AllowSuspendThenHibernate=no
AllowHybridSleep=no

ALSO HAS NO EFFECT, even after reboot.

This is running on a Dell XPS 8930 with an i7-9700 CPU @ 3.00 GHz, 32 GB RAM, a 1 TB SSD, and two 4 TB HDD's.

Any advice?

4 Answers 4

3

This turns out to be a situation where the command line is apparently not the best way to go. These four steps worked:

  1. Click the far upper right corner power button.
  2. Click the settings gearwheel in the resulting dropdown box.
  3. Click "Power" in the left menu of the resulting popup settings window.
  4. Under "Power Saving Options" select "Never" instead of "5 minutes".
1
3

I fixed it by editing /etc/gdm3/greeter.dconf-defaults, uncommenting the line, changing suspend to blank:

sleep-inactiva-ac-type="blank"

and restarting gdm3:

sudo systemctl restart gdm3

Here's /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=1200
# - What to do after sleep-inactive-ac-timeout
#   'blank', 'suspend', 'shutdown', 'hibernate', 'interactive' or 'nothing'
sleep-inactive-ac-type='blank'
# - As above but when on battery
# sleep-inactive-battery-timeout=1200
# sleep-inactive-battery-type='suspend'
1
  • 1
    Thank you, but No - that made it worse. Before I had to click my username and enter my password. Now I have to click any key to unlock, then click my username and enter my password. Jun 27, 2023 at 14:55
1

Editing greeter.dconf-defaults did the job for me :


# These are the options for the greeter session that can be set 
# through GSettings. Any GSettings setting that is used by the 
# greeter session can be set here.

# Note that you must configure the path used by dconf to store the 
# configuration, not the GSettings path.


# Theming options
# ===============
#  - Change the GTK+ theme
[org/gnome/desktop/interface]
# gtk-theme='Adwaita'
#  - Use another background
[org/gnome/desktop/background]
# picture-uri='file:///usr/share/themes/Adwaita/backgrounds/stripes.jpg'
# picture-options='zoom'
#  - Or no background at all
[org/gnome/desktop/background]
# picture-options='none'
# primary-color='#000000'

# Login manager options
# =====================
[org/gnome/login-screen]
logo='/usr/share/images/vendor-logos/logo-text-version-64.png'

# - Disable user list
# disable-user-list=true
# - Disable restart buttons
# disable-restart-buttons=true
# - Show a login welcome message
# banner-message-enable=true
# banner-message-text='Welcome'

# 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'

Getting a decent editor installed is essential. I use a old versiom of vim here : enter link description here

0

For me, changing one line in /etc/gdm3/greeter.dconf-defaults to

sleep-inactive-ac-timeout=0 

and executing

sudo systemctl reload gdm; sudo systemctl reload gdm3  

solved the problem.

After https://unix.stackexchange.com/a/736305/32825

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .