I found additional help in how to do this from the
firstname.lastname@example.org list. This should work with laptops
without the use of a DE or even X if you can use acpi with pm-utils.
First, invoke acpi_listen, then close and re-open the lid. The event will
be shown onscreen, in my case it is "button/lid LID close" plus a few
Second, write script placed into /etc/acpi/:
echo "echoing from inside script lidclose.sh"
The first two lines are for testing the script and are later removed.
Turns out that the echo line doesn't work.
Second, create this script:
event=button/lid LID close
The names of these two scripts can be anything you like, but be sure to
make them executable. I wrote these as root.
Then run /etc/init.d/acpid restart
Now when I close the lid the laptop goes into sleep as it should. I did
not need to do anything to make the laptop resume from sleep- it does so
upon opening the lid again.
Until I find a smaller and/or better program I will use the
xcfe4-power-manager for blanking the screen (in my case it doesn't work
for putting my laptop into sleep or hibernate mode). I still don't know of
a console-only program that will serve that purpose.
I'm sure others will find a better/more elegant method. But this works for
me. My system: Thinkpad T520 using onboard Intel graphics, Debian with
> On Mon, 06 Feb 2012 08:27:12 +0300, Stayvoid wrote:
>>> This usually has to be configured in whatever power manager you're
>>> using. What DE are you using?
>> I haven't configured Xorg yet. And I'm looking for a universal solution.
>> It shouldn't depend on DE. I want to be able to use it from the shell.
> Then no "on lid close" event has to be in place because this is usually
> done by your desktop utilities.
- Re: Sleep
- From: Stayvoid <email@example.com>