Debian This forum is for the discussion of Debian Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
09-17-2019, 06:09 PM
|
#1
|
Member
Registered: Jan 2013
Posts: 42
Rep:
|
How to prevent Debian Buster from hibernating?
One of my servers suffered a hard disk crash so I bit the bullet and fitted a new SSD onto which I did a netinst of Debian 10 and chose the Gnome desktop. In the Settings->Power UI dialog, I've turned off Automatic Suspend but the machine still goes into 'hibernation' (is this the same as 'suspend') after a short time. I have a virtual machine running on this host, so the host has at least one active process all the time.
How can I stop this machine from 'going to sleep'? Any help gratefully received.
|
|
|
09-17-2019, 08:35 PM
|
#2
|
Senior Member
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
|
Hi.
Good choice on distro!
Debian says try:
Code:
sudo systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target
from a simple web search:( How to prevent Debian Buster from hibernating? https://wiki.debian.org/Suspend#Disa...nd_hibernation,) hope it helps? I used KDE which also needs a little messing around stopping it but I do that all through the GUI.
Have fun!
Last edited by jamison20000e; 09-17-2019 at 08:44 PM.
Reason: Typ0s
|
|
|
09-18-2019, 05:09 AM
|
#3
|
Member
Registered: Jan 2013
Posts: 42
Original Poster
Rep:
|
Quote:
Originally Posted by jamison20000e
Good choice on distro!
Debian says try:
Code:
sudo systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target
from a simple web search:( How to prevent Debian Buster from hibernating? https://wiki.debian.org/Suspend#Disa...nd_hibernation,) hope it helps? I used KDE which also needs a little messing around stopping it but I do that all through the GUI.
Have fun!
|
Many thanks for the link. Using the systemctl mask command resulted in the ".target" symlinks being reset to point to /dev/null, which makes a lot of sense.
FWIW, I tried searching the net but only found info on enabling hibernation. [ turns and walks slowly from keyboard!].
FWIW2, I had kludged it by adding an instruction in crontab to echo something to /dev/null every five minutes. That achieved the objective, but didn't seem 'proper'!
Thanks again, Geoff
|
|
1 members found this post helpful.
|
09-18-2019, 06:07 AM
|
#4
|
Senior Member
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
|
Glad it worked.
As for the workaround, I do stuff like that all the time. Who cares about proper if it don't hurt anything!
|
|
|
02-08-2022, 03:52 PM
|
#5
|
LQ Newbie
Registered: Feb 2022
Posts: 1
Rep:
|
On debian 11, gnome settings are not effective, if you are not logged in gnome. Bellow setting is ignored as well and the system is going to sleep after time.
Code:
# /etc/systemd/logind.conf
IdleAction=ignore
Here is workaround, which works for me:
Create service (maybe with another test expression) and enable it.
Code:
# /usr/lib/systemd/system/inhibit-sleep.service
[Unit]
Description=If AC is online, inhibit sleep
Before=sleep.target
[Service]
Type=oneshot
ExecStart=/bin/sh -c 'grep -qv 1 /sys/class/power_supply/AC/online'
[Install]
RequiredBy=sleep.target
|
|
|
All times are GMT -5. The time now is 12:50 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|