Hello,
I am new here. I installed Slitaz just 2 days ago and I am surprised how fast and small it is. Nice.
I have no prblem with wifi, vga as some people have but I would like to solve ony one issue. Is it possible to make sleep my notebook by closing lid? It does not work. I have tried something with pm-utils. It suspend PC but does not wake up. I get just black screen. What is your experience?
Thanx for quick answer...

Suspend on lid close
(10 posts) (2 voices)-
Posted 13 years ago #
-
Hi,
As you have installed pm-utils, I suggest you to try to suspend/resume your notebook from the command line:
# pm-suspend
You certainly have to press the power button to resume from suspend.
If suspend did not work correctly, you will find some valuable information in the log file /var/log/pm-suspend.log.
Check also the output of:
# pm-is-supported --suspend ; echo $?
This command will do some sanity checking and report any errors it finds in your configuration. If it says '0', your configuration is ok.
If suspend/resume is ok, add the following sequence in .config/openbox/rc.xml (current user) and /etc/xdg/openbox/rc.xml (future users) at the end of the keyboard section. Edit both files, search for </keyboard> and insert:
<keybind key="XF86Sleep"> <action name="Execute"> <startupnotify> <enabled>true</enabled> <name>Suspend</name> </startupnotify> <command> dbus-send --system --print-reply --dest=org.freedesktop.Hal /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Suspend int32:0 </command> </action> </keybind>
It will suspend your notebook when the lid closes.
Run
# xev
to find out what key binding to use for laptop lid closure. Its maybe not XF86Sleep.
The dbus-send command:
dbus-send --system --print-reply --dest=org.freedesktop.Hal /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Suspend int32:0
allow a regular user to suspend without the need for a root password.
Posted 13 years ago # -
Thanx for answer
Your solution does work. When I close lid, it suspend my ntb. Problem is it does not resume. As I wrote above, only black screen remains.Posted 13 years ago # -
ok, if you run manually:
# pm-suspend
and suspend/resume is ok, but resume is broken with bindings in Openbox, then it's safer to use acpid.
Install acpid:
# tazpkg get-install acpid
then edit /etc/acpi/button.sh as following:
lid) if [ -e /usr/sbin/pm-suspend ] ; then logger "Event: button/lid - suspending" /usr/sbin/pm-suspend else logger "Event: button/lid - /usr/sbin/pm-suspend not found, skipping.." fi ;; esac
Hope it works.
Posted 13 years ago # -
I'm afraid it won't work, acpid is actually broken and needs fixes.
Posted 13 years ago # -
I see. What happend? Is there any chance to fix it in the future?
Posted 13 years ago # -
Yep! Work in Progress..
Posted 13 years ago # -
Thanx Domcox, just let me know then :)
Posted 13 years ago # -
Hi!
acpid should be fixed.
Changes committed in wok changeset 12209:fa389f5b7eb9.acpid is now configured to allow a notebook to enter in Sleep mode by closing the lid.
--
domPosted 13 years ago # -
Hmm, unfortunately does not work for me. Still black screen after resume...
Posted 13 years ago #
Reply
You must log in to post.