Skip to content

Instantly share code, notes, and snippets.

@lukacat10
Last active May 19, 2023 16:53
Show Gist options
  • Save lukacat10/b6d8796d361eebde33e8b20a2e490094 to your computer and use it in GitHub Desktop.
Save lukacat10/b6d8796d361eebde33e8b20a2e490094 to your computer and use it in GitHub Desktop.
The great guide on sleeping debians

Time to end this sleeping phenomena

Prevent suspend on lock screen timeout:

sudo nano /etc/gdm3/greeter.dconf-defaults

set sleep-inactive-ac-timeout to 0

Note: You might need to restart your computer (or find a way to reload gdm3)

Prevent suspend on closing the lid:

sudo nano /etc/systemd/logind.conf

set HandleLidSwitchExternalPower to ignore
After changing the setting, run:

systemctl restart systemd-logind.service

Prevent suspend on logged in user timeout:

sudo nano gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 0
sudo nano gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type nothing

COMPLETELY DISABLE THE FUNCTIONALITY OF SLEEPING, HIBERNATING, HYBRID:

WARNING: This means you won't be able to perform sleep or hibernation at all!

sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment