On 1/26/06, Robert Persson <[EMAIL PROTECTED]> wrote:
> 'echo mem > /sys/power/state' is what is frustrating. It goes to sleep
> alright, but I can't wake it up. The only thing that does anything is the
> power button, and what that does is send the system into shutdown.
Power is the correct way to awaken the system. If you have a "sleep"
key, edit /etc/acpi/default.sh to account for the power-button press
that shuts down the system. Something like:
case "$group" in
button)
case "$action" in
sleep)
touch /etc/.acpi_ignore_power
echo mem >/sys/power/state
;;
power)
if test -f /etc/.acpi_ignore_power; then
rm -f /etc/.acpi_ignore_power
>/dev/null 2>&1
else
/sbin/shutdown -h now
fi
;;
...
If you don't have a sleep key, put the above commands in a script and
call that instead.
Also, you could emerge sys-fs/hibernate, and edit
/etc/hibernate/hibernate.conf to use /sys/power/state. Hibernate can
also take care of switching to a text console, hacking video modes if
necessary, locking the console or X desktop, and so on.
I actually use hibernate with two different configurations,
hibernate.conf and standby.conf, depending upon whether I press the
sleep or power buttons.
If the
> sleep state is initiated from a console, the screen remains black during the
> brief reawakening.
Some video drivers do not restore correctly. Use hibernate, or text
console, or google 'vbetool'.
> If the sleep state is initiated from the X server then I
> get some kind of funny pattern on the screen of the kind that says that the
> video card is confused.
Which video card and driver? Are you using opensource drivers (which
usually work fine with power management) or proprietary ones?
-Richard
--
[email protected] mailing list