Put server to sleep (hibernate/suspend) automatically after inactivity?
I've been setting up my first real (albeit small) home server on
in the past days, and I have some problems regarding the
implementation of my
My question boils down to this:
Can I tell the server, using a mechanism available when there is no user
logged in, to automatically go to sleep (suspend to disk/hibernate)
certain amount of inactivity? I.e., I am looking for settings such as
available in the GNOME power manager, but to be used for the system in
(Let me know if the people on debian-laptop might the ones to ask
here, I din't
want to cross-post to two lists.)
I guess one of the problems is the definition of "inactivity" on a
there will probably always be things going on due to some services
Read on for the details and background, which might help in narrowing
criteria for "inactivity". These are my requirements:
1) Main use of machine (for now): file server, mostly for rsync
storing of archive (files used not regularly).
2) Machine to be run 'headless' (without monitor and physical access,
stored away in the basement).
3) Machine to be put in 'suspend to disk' mode when inactive, to be
via magic packet over ethernet (wake-on LAN) when one of the
access (i.e. to perform an rsync backup).
My machine is using an AMD Athlon processor (1 GHz) with 768 MB of
RAM on an
ASUS A7V133 board. I am using two SATA disks on a PCI controller (SiI
to run a software RAID with LVM for Debian etch on it.
I did install a desktop environment (GNOME), too, for various other
and could not get the suspend features of gnome-power-manager to
the settings for "put computer to sleep when it is inactive for ..." do
nothing, and I can't manually suspend the system via the GUI, either
little power plug symbol in the menu in the upper right).
I can, however, suspend the machine with "sudo s2ram -f" or "sudo
I've been searching the internet for solutions to why I can't use the
interface in the GUI, and am puzzled by the plethora of different power
packages etc. that are available and all the problems associated with
I have tried several things suggested to make the GUI method work
my user account is in the admin group in /etc/sudoers , added my
account to the
powerdev group etc.), but nothing helped. When I power up the
machine, I don't
want an automatic login into a desktop session, instead I usually
contact the machine over ssh (and occasionally over VNC) or on other
So ideally I don't need to the GUI solution to work, but I thought
an alternative would be to automatically let the system boot into a
session under a (dedicated) user account and then use the features of
The least ideal solution, I guess, would be to let the clients
the server "I don't need you anymore, go to sleep" (over ssh).
It's a home server, I don't expect more than one or two clients to be
connected simultaneously, for a limited number of purposes such as
the clients could execute commands via sudo. When given the command
the machine could check if another user is using the server or if
person is communicating with the the rsync daemon to see it the
machine can be
put to sleep.
Or is all this too unreliable and complicated? Do you have ideas? The
obviously, is to avoid running a 100 W device all the time when
usually it is
Thanks for your thoughts!
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact email@example.com